diff --git a/R/DIALOGUE.main.R b/R/DIALOGUE.main.R index 0e4cdd1..ca1cc4c 100644 --- a/R/DIALOGUE.main.R +++ b/R/DIALOGUE.main.R @@ -125,7 +125,7 @@ DIALOGUE1<-function(rA,k = 5,main,results.dir = "~/Desktop/DIALOGUE.results/",co if(is.null(specific.pair)){ out<-DIALOGUE1.PMD(X = X,k = k,PMD2 = PMD2,extra.sparse = extra.sparse,seed1 = seed1) emp.p<-DIALOGUE1.PMD.empirical(X,k,n1 = 20,extra.sparse = extra.sparse) - View(emp.p) + write.csv(emp.p, paste0(results.dir,"emp.csv")) if(bypass.emp){ emp.p1<-emp.p emp.p[]<-0.05 diff --git a/R/DIALOGUE.plot.R b/R/DIALOGUE.plot.R index 2d93293..8a54685 100644 --- a/R/DIALOGUE.plot.R +++ b/R/DIALOGUE.plot.R @@ -65,6 +65,8 @@ DIALOGUE.plot.av<-function(R,MCPs,mark.samples = NULL,d = 1,k = R$k["DIALOGUE"], # rownames(m1)<-idx colnames(m1)<-R$cell.types m1<-m1[,R$MCP.cell.types[[i]]] + # remove any columns that are all 0s before calling pairs plot + m1 <- m1[,!sapply(colnames(m1), function(col) all(m1[,col]==0))] if(length(R$MCP.cell.types[[i]])<2){return()} pairs.panels(m1,hist.col = "grey",breaks = 50,bg = col1,pch = pch,ellipses = F, smooth = F,lm = T,stars = T,method = "pearson",