Commit 1210457a authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Update qusage fncton

parent 5dfeff3d
......@@ -852,7 +852,7 @@ scQuSAGE <- function(sc10x,gs,save=FALSE,type,id,ds=0,nm="pops",print="umap"){
}
cell.sample <- c(cell.sample,cell)
}
data <- as.data.frame(as.matrix(GetAssayData(sc10x[,colnames(sc10x) %in% cell.sample],assay="SCT",slot="scale.data")))
data <- as.data.frame(as.matrix(GetAssayData(sc10x[,colnames(sc10x) %in% cell.sample],assay="SCT",slot="data")))
labels <- labels[colnames(sc10x) %in% cell.sample]
#groups <- sort(unique(labels))
groups <- paste0("Cluster_",levels(sc10x@active.ident))
......@@ -920,14 +920,14 @@ scQuSAGE <- function(sc10x,gs,save=FALSE,type,id,ds=0,nm="pops",print="umap"){
max.y.rg <- 0
for (i in groups){
qs <- get(paste0("results.",i))
if (max(qs$path.mean)>max.x.rg){
max.x.rg <- max(qs$path.mean)
if (max(qs$path.mean[!is.nan(qs$path.mean)])>max.x.rg){
max.x.rg <- max(qs$path.mean[!is.nan(qs$path.mean)])
}
if (min(qs$path.mean)<min.x.rg){
min.x.rg <- min(qs$path.mean)
if (min(qs$path.mean[!is.nan(qs$path.mean)])<min.x.rg){
min.x.rg <- min(qs$path.mean[!is.nan(qs$path.mean)])
}
if (max(qs$path.PDF)>max.y.rg){
max.y.rg <- max(qs$path.PDF)
if (max(qs$path.PDF[!is.na(qs$path.PDF)])>max.y.rg){
max.y.rg <- max(qs$path.PDF[!is.na(qs$path.PDF)])
}}
if (type=="sm"){
#Plot correlation plots by geneset
......
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