Commit dbb4d204 authored by Gervaise H. Henry's avatar Gervaise H. Henry 🤠

Change threshold code to match qc thresh

parent 7e720ca8
......@@ -717,7 +717,7 @@ scScore <- function(sc10x,score,geneset,cut.pt=0.9,anchor=FALSE){
h <- hist(data.frame(sc10x[[paste0(score,"1")]])[,paste0(score,"1")],breaks=1000,plot=FALSE)
cutoff.temp <- mean(c(h$mids[which.max(h$counts)],h$mids[-which.max(h$counts)][which.max(h$counts[-which.max(h$counts)])]))
cells.remove <- rownames(sc10x[[paste0(score,"1")]])[sc10x[[paste0(score,"1")]][,1] < cutoff.temp]
sc10x.temp <- subset(sc10x,cells=setdiff(colnames(sc10x),cells.remove))
sc10x.temp <- subset(sc10x,cells=cells.remove,invert=TRUE)
thresh <- list()
thresh[["all"]] <- scThresh(list(all=sc10x.temp),feature=paste0(score,"1"),sub=score)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment