changeset 10:fed480fea9f0 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bowtie2 commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
author devteam
date Fri, 18 Dec 2015 18:50:22 -0500
parents 2ac3209cff00
children fa69d5a7b8c8
files bowtie2_wrapper.xml test-data/bowtie2-stats.out tool_dependencies.xml
diffstat 3 files changed, 42 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bowtie2_wrapper.xml	Wed Nov 18 09:52:21 2015 -0500
+++ b/bowtie2_wrapper.xml	Fri Dec 18 18:50:22 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="bowtie2" name="Bowtie2" version="2.2.6">
+<tool id="bowtie2" name="Bowtie2" version="2.2.6.1">
     <description>- map reads against reference genome</description>
     <macros>
         <import>read_group_macros.xml</import>
@@ -167,6 +167,11 @@
             ${analysis_type.cline}
         #end if
 
+        ## mapping stats (i.e. stderr from bowtie2)
+        #if $save_mapping_stats
+	  2&gt; "$mapping_stats"
+        #end if
+
         ## output file
         #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ):
           | samtools view -Su - | samtools sort -o - - &gt; $output
@@ -430,6 +435,7 @@
                 <param name="sam_opt" type="boolean" truevalue="true" falsevalue="false" label="Would you like the output to be a SAM file" help="By default, the output from this Bowtie2 wrapper is a sorted BAM file."/>
             </when>
         </conditional>
+        <param name="save_mapping_stats" type="boolean" checked="False" label="Save the bowtie2 mapping statistics to the history" />
     </inputs>
 
     <!-- define outputs -->
@@ -517,6 +523,9 @@
             </conditional>
           </actions>
         </data>
+        <data format="txt" name="mapping_stats" label="${tool.name} on ${on_string}: mapping stats">
+          <filter>save_mapping_stats is True</filter>
+        </data>
 
     </outputs>
 
@@ -550,6 +559,21 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test2.bam" ftype="bam" lines_diff="2"/>
         </test>
+        <test>
+            <!-- basic test on single paired default run with stats-->
+            <param name="type" value="paired"/>
+            <param name="selection" value="no"/>
+            <param name="paired_options_selector" value="no"/>
+            <param name="unaligned_file" value="false"/>
+            <param name="analysis_type_selector" value="simple"/>
+            <param name="source" value="history" />
+            <param name="input_1" value="bowtie2-fq1.fq" ftype="fastqsanger"/>
+            <param name="input_2" value="bowtie2-fq2.fq" ftype="fastqsanger"/>
+            <param name="own_file" value="bowtie2-ref.fasta" />
+            <param name="save_mapping_stats" value="true" />
+            <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>
+            <output name="mapping_stats" file="bowtie2-stats.out" ftype="txt"/>
+        </test>
     </tests>
 
     <help>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bowtie2-stats.out	Fri Dec 18 18:50:22 2015 -0500
@@ -0,0 +1,15 @@
+100 reads; of these:
+  100 (100.00%) were paired; of these:
+    97 (97.00%) aligned concordantly 0 times
+    3 (3.00%) aligned concordantly exactly 1 time
+    0 (0.00%) aligned concordantly >1 times
+    ----
+    97 pairs aligned concordantly 0 times; of these:
+      8 (8.25%) aligned discordantly 1 time
+    ----
+    89 pairs aligned 0 times concordantly or discordantly; of these:
+      178 mates make up the pairs; of these:
+        153 (85.96%) aligned 0 times
+        25 (14.04%) aligned exactly 1 time
+        0 (0.00%) aligned >1 times
+23.50% overall alignment rate
--- a/tool_dependencies.xml	Wed Nov 18 09:52:21 2015 -0500
+++ b/tool_dependencies.xml	Fri Dec 18 18:50:22 2015 -0500
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <tool_dependency>
   <package name="bowtie2" version="2.2.6">
-      <repository changeset_revision="d227341ad20f" name="package_bowtie_2_2_6" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+      <repository changeset_revision="9d2f1e2f5919" name="package_bowtie_2_2_6" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
     <package name="samtools" version="1.2">
-      <repository changeset_revision="192f00129358" name="package_samtools_1_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+      <repository changeset_revision="a55970300738" name="package_samtools_1_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>