Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions R/CompCCAT.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ CompCCAT <- function(exp.m, ppiA.m){

if(classMATRIX=="matrix"){ ## ordinary matrix
ccat.v <- as.vector(cor(exp.m[match(commonEID.v,rownames(exp.m)),],k.v));
}
else if (classMATRIX=="dgCMatrix"){
} else if (classMATRIX=="dgeMatrix"){ # ordinary dense matrix in S4 Matrix representation.
exp.m <- as.matrix(exp.m) # dense S4 matrix representation to base matrix presentation
ccat.v <- as.vector(cor(exp.m[match(commonEID.v,rownames(exp.m)),],k.v))
} else if (classMATRIX=="dgCMatrix"){
ccat.v <- as.vector(corSparse(exp.m[match(commonEID.v,rownames(exp.m)),],Matrix(matrix(k.v,ncol=1))));
}

Expand Down