From 5419b7d31c10ca141cb53d911566706d8c08273e Mon Sep 17 00:00:00 2001 From: Fupan Yao Date: Tue, 2 Mar 2021 11:44:00 -0500 Subject: [PATCH 1/5] Update NAMESPACE --- NAMESPACE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 15a0369..e03061b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,7 +14,7 @@ importFrom(AUCell,AUCell_buildRankings) importFrom(AUCell,AUCell_calcAUC) importFrom(AUCell,getAUC) importFrom(MineICA,clusterFastICARuns) -importFrom(RcisTarget,importRanking) +importFrom(RcisTarget,importRankings) importFrom(Seurat,CreateAssayObject) importFrom(Seurat,CreateDimReducObject) importFrom(Seurat,DefaultAssay) From 747ecc448ff56b2ba0514ec5376f325068b93328 Mon Sep 17 00:00:00 2001 From: Fupan Yao Date: Thu, 4 Mar 2021 17:36:03 -0500 Subject: [PATCH 2/5] changed tpcor(M) to pcor(t(M)) tpcor crashes on certain system configurations --- R/EstNumModule.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/EstNumModule.R b/R/EstNumModule.R index 9902bc4..e0a01d5 100644 --- a/R/EstNumModule.R +++ b/R/EstNumModule.R @@ -24,7 +24,7 @@ EstNumModule <- function(data.m, default=TRUE, svd.num=NULL){ ns <- ncol(data.m); lambdaMAX <- sigma2*(1+1/Q + 2*sqrt(1/Q)); lambdaMIN <- sigma2*(1+1/Q - 2*sqrt(1/Q)); - C <- coop::tpcor(M) + C <- coop::pcor(t(M)) if(default){ if(ncol(data.m)>50){ From 45075bce7b2082d38e1f2a4097e7dcb3df1ce305 Mon Sep 17 00:00:00 2001 From: Fupan Yao Date: Thu, 4 Mar 2021 18:39:12 -0500 Subject: [PATCH 3/5] Update ModuleTool.R replace tpcor(t(matrix)) to pcor(matrix) --- R/ModuleTool.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ModuleTool.R b/R/ModuleTool.R index 8a39803..63073cf 100644 --- a/R/ModuleTool.R +++ b/R/ModuleTool.R @@ -79,7 +79,7 @@ forceNetwork(Links = subnet,Nodes = NodeInfor,Source="Source",Target="Target", #' @importFrom Seurat GetAssayData #' @examples RunModuleSVD <- function(obj, nu=30,power=0.5){ -moduleExp_scale <- coop::tpcor(t(as.matrix(GetAssayData(obj)))) +moduleExp_scale <- coop::pcor(as.matrix(GetAssayData(obj))) svd.m <- rARPACK::svds(t(moduleExp_scale),k=nu,nu=nu) svd.reduction <- (svd.m$u) %*% diag((svd.m$d)^power) rownames(svd.reduction) <- colnames(moduleExp_scale) From e36a3276dc96a008c9fa135d7ec98f26fcdfab62 Mon Sep 17 00:00:00 2001 From: Fupan Yao Date: Thu, 4 Mar 2021 22:03:38 -0500 Subject: [PATCH 4/5] Update ModuleTool.R replace coop pcor with base cor --- R/ModuleTool.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ModuleTool.R b/R/ModuleTool.R index 63073cf..a399a40 100644 --- a/R/ModuleTool.R +++ b/R/ModuleTool.R @@ -79,7 +79,7 @@ forceNetwork(Links = subnet,Nodes = NodeInfor,Source="Source",Target="Target", #' @importFrom Seurat GetAssayData #' @examples RunModuleSVD <- function(obj, nu=30,power=0.5){ -moduleExp_scale <- coop::pcor(as.matrix(GetAssayData(obj))) +moduleExp_scale <- cor(as.matrix(GetAssayData(obj))) svd.m <- rARPACK::svds(t(moduleExp_scale),k=nu,nu=nu) svd.reduction <- (svd.m$u) %*% diag((svd.m$d)^power) rownames(svd.reduction) <- colnames(moduleExp_scale) From 5983fcc3f4b474aa0e28493e2cfd33a109770961 Mon Sep 17 00:00:00 2001 From: Fupan Yao Date: Thu, 4 Mar 2021 22:04:23 -0500 Subject: [PATCH 5/5] Update EstNumModule.R replace coop:pcor with base cor --- R/EstNumModule.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/EstNumModule.R b/R/EstNumModule.R index e0a01d5..e082e72 100644 --- a/R/EstNumModule.R +++ b/R/EstNumModule.R @@ -24,7 +24,7 @@ EstNumModule <- function(data.m, default=TRUE, svd.num=NULL){ ns <- ncol(data.m); lambdaMAX <- sigma2*(1+1/Q + 2*sqrt(1/Q)); lambdaMIN <- sigma2*(1+1/Q - 2*sqrt(1/Q)); - C <- coop::pcor(t(M)) + C <- cor(t(M)) if(default){ if(ncol(data.m)>50){