From a5051b9d619625c922d5b3b9f74c303c8a9912f5 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Mon, 18 Jun 2018 07:57:55 -0500
Subject: [PATCH] Fix VlnPlot for CCA

---
 r.scripts/sc-TissueMapper.R | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/r.scripts/sc-TissueMapper.R b/r.scripts/sc-TissueMapper.R
index 129a26e..6445613 100644
--- a/r.scripts/sc-TissueMapper.R
+++ b/r.scripts/sc-TissueMapper.R
@@ -819,10 +819,12 @@ scCCA <-  function(sc10x.1,sc10x.2,nm.1="D17",nm.2="D27",cc=FALSE){
   DimPlot(sc10x,reduction.use="cca",group.by="patient",do.return=FALSE,pt.size=0.05)
   dev.off()
   postscript("./analysis/cca/Violin.CCA1.Raw.eps",paper="special",width=10,height=5,horizontal=FALSE)
-  VlnPlot(sc10x,features.plot="CC1",group.by="patient",do.return=FALSE,point.size.use=0.05)
+  plot <- VlnPlot(sc10x,features.plot="CC1",group.by="patient",size.title.use=20,point.size.use=0.05)
+  plot(plot)  
   dev.off()
   postscript("./analysis/cca/Violin.CCA2.Raw.eps",paper="special",width=10,height=5,horizontal=FALSE)
-  VlnPlot(sc10x,features.plot="CC2",group.by="patient",do.return=FALSE,point.size.use=0.05)
+  plot <- VlnPlot(sc10x,features.plot="CC2",group.by="patient",size.title.use=20,point.size.use=0.05)
+  plot(plot)  
   dev.off()
   #postscript("./analysis/cca/Bicor.eps",paper="special",width=10,height=5,horizontal=FALSE)
   #MetageneBicorPlot(sc10x,dims.eval=1:50,grouping.var="patient")
@@ -833,10 +835,12 @@ scCCA <-  function(sc10x.1,sc10x.2,nm.1="D17",nm.2="D27",cc=FALSE){
   gc()
   
   postscript("./analysis/cca/Violin.CCA1.Aligned.eps",paper="special",width=10,height=5,horizontal=FALSE)
-  VlnPlot(sc10x,features.plot="ACC1",group.by="patient",do.return=FALSE,point.size.use=0.05)
+  plot <- VlnPlot(sc10x,features.plot="ACC1",group.by="patient",size.title.use=20,point.size.use=0.05)
+  plot(plot)  
   dev.off()
   postscript("./analysis/cca/Violin.CCA2.Aligned.eps",paper="special",width=10,height=5,horizontal=FALSE)
-  VlnPlot(sc10x,features.plot="ACC2",group.by="patient",do.return=FALSE,point.size.use=0.05)
+  plot <- VlnPlot(sc10x,features.plot="ACC2",group.by="patient",size.title.use=20,point.size.use=0.05)
+  plot(plot)  
   dev.off()
   
   results <- list(
-- 
GitLab