Skip to content
Snippets Groups Projects
Commit 46c8acdb authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Remove more as.matrix to prevent memory errors

parent d5bfc948
Branches
Tags
2 merge requests!3Develop,!2Seurat3.0
......@@ -142,8 +142,8 @@ scQC <- function(sc10x,lg=500,hg=2500,hm=0.1,sub=FALSE){
plot2 <- ggplot(data.frame(cbind(sc10x$nCount_RNA,sc10x$percent.mito)))+geom_point(aes(x=X1,y=X2,color=density2),size=0.1)+scale_color_viridis(option="inferno")+geom_hline(yintercept=hm,size=1,color="red")+labs(x="nUMI",y="Percent Mitochondrial",color="Count")+cowplot::theme_cowplot()
grid.arrange(plot1,plot2,nrow=1)
dev.off()
counts.cell.raw <- ncol(as.matrix(GetAssayData(object=sc10x,slot="counts")))
counts.gene.raw <- nrow(as.matrix(GetAssayData(object=sc10x,slot="counts")))
counts.cell.raw <- ncol(GetAssayData(object=sc10x,slot="counts"))
counts.gene.raw <- nrow(GetAssayData(object=sc10x,slot="counts"))
#Filter/normalize data
sc10x.sub <- subset(x=sc10x,subset=nFeature_RNA > lg)
......@@ -168,8 +168,8 @@ scQC <- function(sc10x,lg=500,hg=2500,hm=0.1,sub=FALSE){
plot2 <- ggplot(data.frame(cbind(sc10x.sub$nCount_RNA,sc10x.sub$percent.mito)))+geom_point(aes(x=X1,y=X2,color=density2),size=0.1)+scale_color_viridis(option="inferno")+labs(x="nUMI",y="Percent Mitochondrial",color="Count")+cowplot::theme_cowplot()
grid.arrange(plot1,plot2,nrow=1)
dev.off()
counts.cell.filtered <- ncol(as.matrix(GetAssayData(object=sc10x.sub,slot="counts")))
counts.gene.filtered <- nrow(as.matrix(GetAssayData(object=sc10x.sub,slot="counts")))
counts.cell.filtered <- ncol(GetAssayData(object=sc10x.sub,slot="counts"))
counts.gene.filtered <- nrow(rix(GetAssayData(object=sc10x.sub,slot="counts"))
results <- list(
sc10x=sc10x.sub,
......
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