Commit 857c0bd9 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Make indevidual plots for filtered qc plots

parent d8e3c4e2
......@@ -283,10 +283,11 @@ scQC <- function(sc10x,sp="hu"){
densities.s[[j]] <- density(sc10x.temp$nCount_RNA,sc10x.temp[[i]][,1],n=1000)
plots.s[[j]] <- ggplotGrob(ggplot(data.frame(cbind(sc10x.temp$nCount_RNA,sc10x.temp[[i]][,1])))+geom_point(aes(x=X1,y=X2,color=densities.s[[j]]),size=0.1)+scale_x_continuous(limits=c(0,max.ct))+scale_y_continuous(limits=c(0,max.y))+scale_color_viridis(option="inferno")+labs(x="nCount",y=i,color="Density")+ggtitle(j)+cowplot::theme_cowplot()+theme(plot.title=element_text(size=7.5),axis.title=element_text(size=7.5),axis.text=element_text(size=5,angle=45),legend.position="bottom",legend.title=element_text(size=5,face="bold",vjust=1),legend.text=element_text(size=5,angle=45))+guides(color=guide_colourbar(barwidth=5,barheight=0.5)))
}
}
ggsave(paste0("./analysis/qc/Violin_qc.filtered.",i,".eps"),marrangeGrob(grobs=plots.v,nrow=1,ncol=length(sc10x),top=NULL))
if (i %in% c("nFeature_RNA","percent.mito")){
ggsave(paste0("./analysis/qc/Plot_qc.filtered.",i,".eps"),marrangeGrob(grobs=plots.s,nrow=1,ncol=length(sc10x),top=NULL))
ggsave(paste0("./analysis/qc/Violin_qc.filtered.",i,".",j,".eps"),plot=plots.v[[j]])
if (i %in% c("nFeature_RNA","percent.mito")){
ggsave(paste0("./analysis/qc/Plot_qc.filtered.",i,".",j,".eps"),plot=plots.s[[j]])
}
}
}
......
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