From cbe5d3faef72d7b83efd3e9e4fa948a8bd78d02d Mon Sep 17 00:00:00 2001 From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu> Date: Sun, 20 May 2018 19:46:38 -0500 Subject: [PATCH] When use DWS NE geneset, use 100 bins (instead of 50) for NE-Score (PC1) turning point choice --- r.scripts/sc_PC.Score.NE.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/r.scripts/sc_PC.Score.NE.R b/r.scripts/sc_PC.Score.NE.R index bf657dc..a6c5e00 100755 --- a/r.scripts/sc_PC.Score.NE.R +++ b/r.scripts/sc_PC.Score.NE.R @@ -89,7 +89,11 @@ dev.off() #find first turning point on a KDE of NE1 #hist(GetCellEmbeddings(object=sc10x.Group.Epi,reduction.type="NE",dims.use=1),prob=TRUE) -d1 <- density(GetCellEmbeddings(object=sc10x.Group.Epi,reduction.type="NE",dims.use=1),n=50) +if (opt$u==FALSE){ + d1 <- density(GetCellEmbeddings(object=sc10x.Group.Epi,reduction.type="NE",dims.use=1),n=50) +} else { + d1 <- density(GetCellEmbeddings(object=sc10x.Group.Epi,reduction.type="NE",dims.use=1),n=100) +} #d2 <- density(GetCellEmbeddings(object=sc10x.Group.Epi,reduction.type="NE",dims.use=2)) #lines(d1,col="blue") ts_1 <- ts(d1$y) -- GitLab