Skip to content

Commit 48c2a18

Browse files
committed
new green/purple colours for hms and DESeq plots
1 parent 679e06b commit 48c2a18

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

mimseq/deseq.R

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,19 @@ for (type in c("cyto", "mito")) {
270270
geom_point(size=3) +
271271
xlab(paste0("PC1: ",percentVar[1],"% variance")) +
272272
ylab(paste0("PC2: ",percentVar[2],"% variance")) +
273-
coord_fixed()
274-
ggsave(paste(subdir_anticodon, "qc-pca.png", sep="/"), height = 7, width = 8)
273+
coord_fixed() +
274+
theme_bw()
275+
ggsave(paste(subdir_anticodon, "qc-pca.pdf", sep="/"), height = 7, width = 8)
275276

276277
pcaData_isodecoder <- plotPCA(vsd_isodecoder, intgroup="condition", returnData=TRUE)
277278
percentVar <- round(100 * attr(pcaData_isodecoder, "percentVar"))
278279
ggplot(pcaData_isodecoder, aes(PC1, PC2, color=condition)) +
279280
geom_point(size=3) +
280281
xlab(paste0("PC1: ",percentVar[1],"% variance")) +
281282
ylab(paste0("PC2: ",percentVar[2],"% variance")) +
282-
coord_fixed()
283-
ggsave(paste(subdir_isodecoder, "qc-pca.png", sep="/"), height = 7, width = 8)
283+
coord_fixed() +
284+
theme_bw()
285+
ggsave(paste(subdir_isodecoder, "qc-pca.pdf", sep="/"), height = 7, width = 8)
284286

285287
# Get combinations of coditions for various DE contrasts
286288
ordered_levels = levels(lastlevel(unique(dds_anticodon$condition), control_cond))
@@ -345,7 +347,7 @@ for (type in c("cyto", "mito")) {
345347
scale_x_log10() + scale_y_log10() +
346348
#geom_smooth(method = 'lm', se = TRUE, alpha = 0.5, color = '#3182bd', fill = 'grey') +
347349
geom_abline(intercept = 0, slope = 1, linetype = 'dashed', color = '#3182bd', alpha = 0.8) +
348-
scale_color_manual(paste('Differential expression\n(adj-p <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("FALSE"="darkgrey", "TRUE-1"="#f28f3b", "TRUE1"="#4daf4a")) +
350+
scale_color_manual(paste('Differential expression\n(adj-p <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("FALSE"="darkgrey", "TRUE-1"="#9970ab", "TRUE1"="#55ae61")) +
349351
scale_shape_manual(paste('Differential expression\n(adj-p <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("FALSE"=19, "TRUE-1"=17, "TRUE1"=17)) +
350352
scale_size_manual(values = c(1,2), guide = "none") + theme_bw() +
351353
labs(x = paste('log10', combinations[[i]][2], 'counts', sep = ' '), y = paste('log10', combinations[[i]][1], 'counts', sep = ' ')) +
@@ -356,7 +358,7 @@ for (type in c("cyto", "mito")) {
356358
scale_x_log10() + scale_y_log10() +
357359
#geom_smooth(method = 'lm', se = TRUE, alpha = 0.5, color = '#3182bd', fill = 'grey') +
358360
geom_abline(intercept = 0, slope = 1, linetype = 'dashed', color = '#3182bd', alpha = 0.8) +
359-
scale_color_manual(paste('Differential expression\n(adj-p <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("FALSE"="darkgrey", "TRUE-1"="#f28f3b", "TRUE1"="#4daf4a")) +
361+
scale_color_manual(paste('Differential expression\n(adj-p <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("FALSE"="darkgrey", "TRUE-1"="#9970ab", "TRUE1"="#55ae61")) +
360362
scale_shape_manual(paste('Differential expression\n(adj-p <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("FALSE"=19, "TRUE-1"=17, "TRUE1"=17)) +
361363
scale_size_manual(values = c(1,2), guide = "none") + theme_bw() +
362364
labs(x = paste('log10', combinations[[i]][2], 'counts', sep = ' '), y = paste('log10', combinations[[i]][1], 'counts', sep = ' ')) +
@@ -427,7 +429,7 @@ for (type in c("cyto", "mito")) {
427429

428430
# Heatmaps
429431
# note that all tables and plots only built if DE tables are not empty
430-
col_fun = colorRamp2(c(-3, 0, 3), c("#CC5803", "#f7f7f7", "#36682B"))
432+
col_fun = colorRamp2(c(-3, 0, 3), c("#762a83", "#f7f7f7", "#1b7837"))
431433

432434
# Annotation for baseMean counts
433435
if (nrow(comb_isodecoder) != 0) {

mimseq/modPlot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ if (length(unique(mods$condition)) > 1) {
689689
# only draw if temp consists of something other than 0s
690690
if (length(temp[which(temp != 0)]) > 0) {
691691
# create new variable for adding info about mito to plot names
692-
col_fun = colorRamp2(c(max(abs(temp)), 0, -max(abs(temp))), c("#36682B", "#f7f7f7","#CC5803"))
692+
col_fun = colorRamp2(c(max(abs(temp)), 0, -max(abs(temp))), c("#1b7837", "#f7f7f7","#762a83"))
693693
if (type == "mito") {
694694
write.csv(temp, file=paste(out, "mods_logOR/", paste("organelle", comp,"logOR.csv",sep="_"), sep=""))
695695
pdf(paste(out, 'mods_logOR/', paste("organelle", comp, "logOR.pdf", sep = "_"), sep = ''), width = 14, height = 12)

0 commit comments

Comments
 (0)