changeset 6:2c1d58f5c296 draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mutational_patterns commit 93dc5ba0403cb447a78e466f568234bd1be9e31a"
author artbio
date Fri, 09 Oct 2020 17:06:51 +0000
parents fe31d059a482
children 34626b2b9907
files mutational_patterns.R mutational_patterns.xml test-data/cosmic_output1.pdf test-data/cosmic_output2.pdf
diffstat 4 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- 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 @@
-<tool id="mutational_patterns" name="Analyse Mutational Patterns/Signatures" version="2.0.0+galaxy6">
+<tool id="mutational_patterns" name="Analyse Mutational Patterns/Signatures" version="2.0.0+galaxy7">
     <description>from genomic variations in vcf files</description>
     <requirements>
         <requirement type="package" version="2.0.0=r40_0">bioconductor-mutationalpatterns</requirement>
Binary file test-data/cosmic_output1.pdf has changed
Binary file test-data/cosmic_output2.pdf has changed