Repository 'sr_bowtie_dataset_annotation'
hg clone https://toolshed.g2.bx.psu.edu/repos/artbio/sr_bowtie_dataset_annotation

Changeset 6:8829656d6999 (2019-10-07)
Previous changeset 5:279fdd92a615 (2019-03-24) Next changeset 7:3bddd7ab96e3 (2021-10-24)
Commit message:
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sr_bowtie_dataset_annotation commit 60340e9e0d2795b88e23fd57e1ccb190918bf337"
modified:
barplot.r
sr_bowtie_dataset_annotation.xml
test-data/multisample5_output.pdf
test-data/sample1_output.pdf
test-data/sample_output.pdf
b
diff -r 279fdd92a615 -r 8829656d6999 barplot.r
--- a/barplot.r Sun Mar 24 18:23:00 2019 -0400
+++ b/barplot.r Mon Oct 07 08:40:41 2019 -0400
[
@@ -12,6 +12,7 @@
 library(optparse)
 library(ggplot2)
 library(ggrepel)
+library(RColorBrewer)
 
 
 #Arguments
@@ -39,12 +40,24 @@
 colnames(annotations) = c("sample", "class", "percent_of_reads", "total")
 annotations$percent=round(annotations$percent_of_reads/annotations$total*100, digits=2)
 # ggplot2 plotting
+
+# Define the number of colors you want
+Sasha.Trubetskoy.Palette <- c('#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231',
+                              '#911eb4', '#46f0f0', '#f032e6', '#bcf60c',
+                              '#008080', '#e6beff', '#9a6324', '#fffac8', '#800000',
+                              '#aaffc3', '#808000', '#ffd8b1', '#000075', '#808080')
+nb.cols <- 19  # 10 with colorRampPalette
+# mycolors <- colorRampPalette(brewer.pal(8, "Paired"))(nb.cols)
+mycolors <- Sasha.Trubetskoy.Palette[1:nb.cols]
+
 ggtitle('Class proportions') 
 ggplot(annotations, aes(x=total/2, y = percent_of_reads, fill = class, width = total)) +
        geom_bar(position="fill", stat="identity") + 
-       facet_wrap(~sample, ncol=3 ) + geom_label_repel(aes(label = percent), position = position_fill(vjust = 0.5), size=2,show.legend = F) +
+       facet_wrap(~sample, ncol=3 ) +
+       geom_label_repel(aes(label = percent), position = position_fill(vjust = 0.5), size=2,show.legend = F) +
        coord_polar(theta="y") +
        labs(x = "Class fractions (%)") +
+       scale_fill_manual(values = mycolors) +
        theme(axis.text = element_blank(),
              axis.ticks = element_blank(),
              panel.grid  = element_blank(),
b
diff -r 279fdd92a615 -r 8829656d6999 sr_bowtie_dataset_annotation.xml
--- a/sr_bowtie_dataset_annotation.xml Sun Mar 24 18:23:00 2019 -0400
+++ b/sr_bowtie_dataset_annotation.xml Mon Oct 07 08:40:41 2019 -0400
b
@@ -1,4 +1,4 @@
-<tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.3.0">
+<tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.4.0">
   <description>by iterative alignments with sRbowtie</description>
   <requirements>
         <requirement type="package" version="1.1.2">bowtie</requirement>
b
diff -r 279fdd92a615 -r 8829656d6999 test-data/multisample5_output.pdf
b
Binary file test-data/multisample5_output.pdf has changed
b
diff -r 279fdd92a615 -r 8829656d6999 test-data/sample1_output.pdf
b
Binary file test-data/sample1_output.pdf has changed
b
diff -r 279fdd92a615 -r 8829656d6999 test-data/sample_output.pdf
b
Binary file test-data/sample_output.pdf has changed