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

Change cell size for cust tSNEs from 5 to 2.5

parent e7069bd2
No related merge requests found
......@@ -856,15 +856,15 @@ sctSNECustCol <- function(sc10x,i,bl,rd){
sc10x@ident <- factor(sc10x@ident,levels=c(bl,rd))
postscript(paste0("./analysis/diy/tSNE_",i,".CustCol.eps"))
if (length(bl)==1 & length(rd)==1){
plot <- TSNEPlot(object=sc10x,pt.size=5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=c(brewer.pal(5,"Blues")[5],brewer.pal(5,"Reds")[5]))
plot <- TSNEPlot(object=sc10x,pt.size=2.5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=c(brewer.pal(5,"Blues")[5],brewer.pal(5,"Reds")[5]))
plot <- plot+theme(axis.text.x=element_text(size=20),axis.text.y=element_text(size=20),axis.title.x=element_text(size=20),axis.title.y=element_text(size=20),legend.text=element_text(size=20))
plot <- plot+guides(colour=guide_legend(override.aes=list(size=10)))
plot(plot)
} else {
if (bl!=""){
plot <- TSNEPlot(object=sc10x,pt.size=5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=c(brewer.pal((length(bl)+1),"Blues")[2:(length(bl)+1)],brewer.pal((length(rd)+1),"Reds")[2:(length(rd)+1)]))
plot <- TSNEPlot(object=sc10x,pt.size=2.5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=c(brewer.pal((length(bl)+1),"Blues")[2:(length(bl)+1)],brewer.pal((length(rd)+1),"Reds")[2:(length(rd)+1)]))
} else {
plot <- TSNEPlot(object=sc10x,pt.size=5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=brewer.pal((length(rd)+1),"Reds")[2:(length(rd)+1)])
plot <- TSNEPlot(object=sc10x,pt.size=2.5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=brewer.pal((length(rd)+1),"Reds")[2:(length(rd)+1)])
}
plot <- plot+theme(axis.text.x=element_text(size=20),axis.text.y=element_text(size=20),axis.title.x=element_text(size=20),axis.title.y=element_text(size=20),legend.text=element_text(size=20))
plot <- plot+guides(colour=guide_legend(override.aes=list(size=10)))
......@@ -876,7 +876,7 @@ sctSNECustCol <- function(sc10x,i,bl,rd){
sctSNEbwCol <- function(sc10x,i,file){
sc10x <- SetAllIdent(object=sc10x,id=i)
postscript(paste0("./analysis/diy/tSNE_",file,"_",i,".bwCol.eps"))
plot <- TSNEPlot(object=sc10x,pt.size=5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=colorRampPalette(c("white","black"))(length(unique(sc10x@ident))+2)[3:(length(unique(sc10x@ident))+2)])
plot <- TSNEPlot(object=sc10x,pt.size=2.5,do.label=FALSE,label.size=10,do.return=TRUE,vector.friendly=FALSE,colors.use=colorRampPalette(c("white","black"))(length(unique(sc10x@ident))+2)[3:(length(unique(sc10x@ident))+2)])
plot <- plot+theme(axis.text.x=element_text(size=20),axis.text.y=element_text(size=20),axis.title.x=element_text(size=20),axis.title.y=element_text(size=20),legend.text=element_text(size=20))
plot <- plot+guides(colour=guide_legend(override.aes=list(size=10)))
plot(plot)
......
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