# HG changeset patch # User artbio # Date 1602263211 0 # Node ID 2c1d58f5c296ccfc8a8791d832a162fe43ce4dd1 # Parent fe31d059a48235e8e89633fcdaca401223dc8478 "planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mutational_patterns commit 93dc5ba0403cb447a78e466f568234bd1be9e31a" diff -r fe31d059a482 -r 2c1d58f5c296 mutational_patterns.R --- a/mutational_patterns.R Tue Oct 06 13:33:44 2020 +0000 +++ b/mutational_patterns.R Fri Oct 09 17:06:51 2020 +0000 @@ -246,7 +246,9 @@ coord_flip() + scale_fill_manual(name = "Cosmic\nSignatures", values = cosmic_colors) + labs(x = "Samples", y = "Absolute contribution") + theme_bw() + - theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right") + theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right", + text = element_text(size=8), + axis.text.x = element_text(angle=90, hjust=1)) pc4_data <- pc4$data pc4 <- ggplot(pc4_data, aes(x=Sample, y=Contribution, fill=as.factor(Signature))) + geom_bar(stat="identity", position='fill') + @@ -254,7 +256,9 @@ scale_fill_manual(name = "Cosmic\nSignatures", values = cosmic_colors) + scale_y_continuous(labels = scales::percent_format(accuracy = 1)) + labs(x = "Samples", y = "Relative contribution") + theme_bw() + - theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right") + theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right", + text = element_text(size=8), + axis.text.x = element_text(angle=90, hjust=1)) ##### # ggplot2 alternative if (!is.na(opt$levels)[1]) { # if there are levels to display in graphs @@ -264,7 +268,9 @@ geom_bar(stat="identity", position='stack') + scale_fill_manual(name = "Cosmic\nSignatures", values = cosmic_colors) + labs(x = "Samples", y = "Absolute contribution") + theme_bw() + - theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right") + + theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right", + text = element_text(size=8), + axis.text.x = element_text(angle=90, hjust=1)) + facet_grid(~level, scales = "free_x") pc4_data <- pc4$data pc4_data <- merge (pc4_data, metadata_table[,c(1,3)], by.x="Sample", by.y="element_identifier") @@ -273,7 +279,9 @@ scale_fill_manual(name = "Cosmic\nSignatures", values = cosmic_colors) + scale_y_continuous(labels = scales::percent_format(accuracy = 1)) + labs(x = "Samples", y = "Relative contribution") + theme_bw() + - theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right") + + theme(panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank(), legend.position="right", + text = element_text(size=8), + axis.text.x = element_text(angle=90, hjust=1)) + facet_grid(~level, scales = "free_x") } # Combine the two plots: diff -r fe31d059a482 -r 2c1d58f5c296 mutational_patterns.xml --- a/mutational_patterns.xml Tue Oct 06 13:33:44 2020 +0000 +++ b/mutational_patterns.xml Fri Oct 09 17:06:51 2020 +0000 @@ -1,4 +1,4 @@ - + from genomic variations in vcf files bioconductor-mutationalpatterns diff -r fe31d059a482 -r 2c1d58f5c296 test-data/cosmic_output1.pdf Binary file test-data/cosmic_output1.pdf has changed diff -r fe31d059a482 -r 2c1d58f5c296 test-data/cosmic_output2.pdf Binary file test-data/cosmic_output2.pdf has changed