@@ -64,44 +64,44 @@ if (do == 2) {
6464 geom_violin(trim = FALSE , col = " black" , alpha = cell.transparency ) +
6565 geom_boxplot( fill = box.color , col = " green" , notch = FALSE , outlier.shape = NA , alpha = cell.transparency ) +
6666 xlab(" mito.percent" ) + ylab(" percent of mito genes per cell" ) +
67- stat_summary(fun.y = mean , geom = " point" , size = 2 , color = " black" ) +
67+ stat_summary(fun = mean , geom = " point" , size = 2 , color = " black" ) +
6868 theme_bw() + theme(axis.text.x = element_text(angle = 90 ))
6969 # nGenes
7070 nGenes.plot <- ggplot(DATA ,aes(y = nGenes ,x = col.legend )) +
7171 geom_jitter(color = cell.color , size = cell.size , alpha = cell.transparency ) +
7272 geom_violin(trim = FALSE , col = " black" , alpha = cell.transparency ) +
7373 geom_boxplot( fill = box.color , col = box.line.col , notch = FALSE , outlier.shape = NA , alpha = cell.transparency ) +
7474 xlab(" nGenes" ) + ylab(" number of genes per cell" ) +
75- stat_summary(fun.y = mean , geom = " point" , size = 2 , color = " black" ) +
75+ stat_summary(fun = mean , geom = " point" , size = 2 , color = " black" ) +
7676 theme_bw() + theme(axis.text.x = element_text(angle = 90 ))
7777 # UMIs
7878 UMIsplot <- ggplot(DATA ,aes(y = UMIs ,x = col.legend )) +
7979 geom_jitter(color = cell.color , size = cell.size , alpha = cell.transparency ) +
8080 geom_violin(trim = FALSE , col = " black" , alpha = cell.transparency ) +
8181 geom_boxplot( fill = box.color , col = box.line.col , notch = FALSE , outlier.shape = NA , alpha = cell.transparency ) +
8282 xlab(" UMIs" ) + ylab(" number of UMIs per cell" ) +
83- stat_summary(fun.y = mean , geom = " point" , size = 2 , color = " black" ) +
83+ stat_summary(fun = mean , geom = " point" , size = 2 , color = " black" ) +
8484 theme_bw() + theme(axis.text.x = element_text(angle = 90 ))
8585 # s.phase
8686 s.plot <- ggplot(DATA ,aes(y = S.phase.probability ,x = col.legend )) +
8787 geom_jitter(color = cell.color , size = cell.size , alpha = cell.transparency ) +
8888 geom_violin(trim = FALSE , col = " black" , alpha = cell.transparency ) +
8989 geom_boxplot( fill = box.color , col = box.line.col , notch = FALSE , outlier.shape = NA , alpha = cell.transparency ) +
9090 xlab(" S phase" ) + ylab(" S phase probability" ) +
91- stat_summary(fun.y = mean , geom = " point" , size = 2 , color = " black" ) +
91+ stat_summary(fun = mean , geom = " point" , size = 2 , color = " black" ) +
9292 theme_bw() + theme(axis.text.x = element_text(angle = 90 ))
9393 # g2m.phase.probability
9494 g2m.plot <- ggplot(DATA ,aes(y = g2m.phase.probability ,x = col.legend )) +
9595 geom_jitter(color = cell.color , size = cell.size , alpha = cell.transparency ) +
9696 geom_violin(trim = FALSE , col = " black" , alpha = cell.transparency ) +
9797 geom_boxplot( fill = box.color , col = box.line.col , notch = FALSE , outlier.shape = NA , alpha = cell.transparency ) +
9898 xlab(" G2 and M phase" ) + ylab(" G2 and M phase probability" ) +
99- stat_summary(fun.y = mean , geom = " point" , size = 2 , color = " black" ) +
99+ stat_summary(fun = mean , geom = " point" , size = 2 , color = " black" ) +
100100 theme_bw() + theme(axis.text.x = element_text(angle = 90 ))
101101# scatter plots
102102 if (col.legend [1 ] == " ." ) {
103103 Mito.UMIs <- ggplot(DATA ,aes(y = mito.percent ,x = UMIs ,
104- text = paste(" UMIs =" ,DATA $ UMIs ," ," ,DATA $ CellIds ,sep = " " ))) +
104+ text = paste(" UMIs =" ,UMIs ," ," ,CellIds ,sep = " " ))) +
105105 geom_point(color = cell.color , size = cell.size , alpha = cell.transparency ) +
106106 scale_x_continuous(trans = " log1p" ) +
107107 scale_color_discrete(name = " " ) +
@@ -110,7 +110,7 @@ if (do == 2) {
110110 legend.key = element_rect(fill = back.col )) + theme_bw()
111111 #
112112 Genes.UMIs <- ggplot(DATA ,aes(y = nGenes ,x = UMIs ,
113- text = paste(" nGenes =" ,DATA $ nGenes ," ," ,DATA $ CellIds ,sep = " " ))) +
113+ text = paste(" nGenes =" ,nGenes ," ," ,CellIds ,sep = " " ))) +
114114 geom_point(color = cell.color , size = cell.size , alpha = cell.transparency ) +
115115 scale_x_continuous(trans = " log1p" ) +
116116 scale_y_continuous(trans = " log1p" ) +
@@ -120,7 +120,7 @@ if (do == 2) {
120120 legend.key = element_rect(fill = back.col )) + theme_bw()
121121 } else {
122122 Mito.UMIs <- ggplot(DATA ,aes(y = mito.percent ,x = UMIs , col = col.legend ,
123- text = paste(" UMIs =" ,DATA $ UMIs ," ," ,DATA $ CellIds ,sep = " " ))) +
123+ text = paste(" UMIs =" ,UMIs ," ," ,CellIds ,sep = " " ))) +
124124 geom_point( size = cell.size , alpha = cell.transparency ) +
125125 scale_x_continuous(trans = " log1p" ) +
126126 scale_color_discrete(name = " " ) +
@@ -129,7 +129,7 @@ if (do == 2) {
129129 legend.key = element_rect(fill = back.col )) + theme_bw()
130130 #
131131 Genes.UMIs <- ggplot(DATA ,aes(y = nGenes ,x = UMIs , col = col.legend ,
132- text = paste(" nGenes =" ,DATA $ nGenes ," ," ,DATA $ CellIds ,sep = " " ))) +
132+ text = paste(" nGenes =" ,nGenes ," ," ,CellIds ,sep = " " ))) +
133133 geom_point(size = cell.size , alpha = cell.transparency ) +
134134 scale_x_continuous(trans = " log1p" ) +
135135 scale_y_continuous(trans = " log1p" ) +
0 commit comments