changeset 24:cd8b7d755af8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bowtie2 commit 2c7869d210d1316e0eb3c9e9f926e1f18332c1ac
author iuc
date Thu, 04 Apr 2019 09:39:19 -0400
parents 5e52e98ff239
children 739b008acace
files bowtie2_wrapper.xml
diffstat 1 files changed, 33 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/bowtie2_wrapper.xml	Wed Jun 06 17:23:14 2018 -0400
+++ b/bowtie2_wrapper.xml	Thu Apr 04 09:39:19 2019 -0400
@@ -1,11 +1,11 @@
-<tool id="bowtie2" name="Bowtie2" version="2.3.4.2" profile="18.01">
+<tool id="bowtie2" name="Bowtie2" version="2.3.4.3" profile="18.01">
     <description>- map reads against reference genome</description>
     <macros>
         <import>bowtie2_macros.xml</import>
     </macros>
     <requirements>
-        <requirement type="package" version="2.3.4">bowtie2</requirement>
-        <requirement type="package" version="1.8">samtools</requirement>
+        <requirement type="package" version="2.3.4.1">bowtie2</requirement>
+        <requirement type="package" version="1.9">samtools</requirement>
     </requirements>
     <version_command>bowtie2 --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
@@ -310,7 +310,7 @@
 #else if $sam_options.reorder:
     | samtools view -bS - -o '$output'
 #else:
-    > '$output_sam'
+    > '$output'
 #end if
 
 ## rename unaligned sequence files
@@ -619,10 +619,10 @@
                 <expand macro="dbKeyActions" />
             </actions>
         </data>
-        <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (BAM)">
-          <filter>analysis_type['analysis_type_selector'] == "simple" or analysis_type['sam_opt'] is False</filter>
+        <data format="bam" name="output" label="${tool.name} on ${on_string}: alignments">
           <change_format>
               <when input="sam_options.reorder" value="--reorder" format="qname_input_sorted.bam" />
+              <when input="sam_options.sam_opt" value="true" format="sam" />
           </change_format>
           <actions>
             <conditional name="reference_genome.source">
@@ -643,27 +643,6 @@
             <expand macro="dbKeyActions" />
           </actions>
         </data>
-        <data format="sam" name="output_sam" label="${tool.name} on ${on_string}: aligned reads (SAM)">
-          <filter>analysis_type['analysis_type_selector'] == "full" and analysis_type['sam_opt'] is True</filter>
-          <actions>
-            <conditional name="reference_genome.source">
-              <when value="indexed">
-                <action type="metadata" name="dbkey">
-                  <option type="from_data_table" name="bowtie2_indexes" column="1" offset="0">
-                    <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
-                    <filter type="param_value" ref="reference_genome.index" column="0"/>
-                  </option>
-                </action>
-              </when>
-              <when value="history">
-                <action type="metadata" name="dbkey">
-                  <option type="from_param" name="reference_genome.own_file" param_attribute="dbkey" />
-                </action>
-              </when>
-            </conditional>
-            <expand macro="dbKeyActions" />
-          </actions>
-        </data>
         <data format="txt" name="mapping_stats" label="${tool.name} on ${on_string}: mapping stats">
           <filter>save_mapping_stats is True</filter>
           <actions>
@@ -672,7 +651,7 @@
         </data>
     </outputs>
     <tests>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on paired-end datasets -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -684,7 +663,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on paired collection -->
             <param name="type" value="paired_collection"/>
             <param name="paired_options_selector" value="no"/>
@@ -700,7 +679,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on paired-end datasets with read group info -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -715,7 +694,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test2.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="2">
             <!-- test on paired-end datasets with stats output -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -733,7 +712,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on interleaved dataset -->
             <param name="type" value="paired_interleaved"/>
             <!-- <param name="paired_options_selector" value="no"/> -->
@@ -747,7 +726,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test_il.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on fastqsanger.gz paired-end datasets -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -759,7 +738,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on fastqsanger.bz2 paired-end datasets -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -771,7 +750,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on fasta paired-end datasets -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -783,7 +762,7 @@
             <param name="own_file" value="bowtie2-ref.fasta" />
             <output name="output" file="bowtie2-test_fasta_in.bam" ftype="bam" lines_diff="2"/>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <!-- test on fasta paired-end datasets with bam_native as output -->
             <param name="type" value="paired"/>
             <param name="paired_options_selector" value="no"/>
@@ -797,6 +776,24 @@
             <param name="reorder" value="true" />
             <output name="output" file="bowtie2-test_fasta_in_bam_qname_input_sorted.bam" ftype="qname_input_sorted.bam" compare="sim_size"/>
         </test>
+        <test expect_num_outputs="1">
+            <!-- test on fasta paired-end datasets with sam as output -->
+            <param name="type" value="paired"/>
+            <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.fa" ftype="fasta"/>
+            <param name="input_2" value="bowtie2-fq2.fa" ftype="fasta"/>
+            <param name="own_file" value="bowtie2-ref.fasta" />
+            <param name="sam_options_selector" value="yes" />
+            <param name="sam_options|sam_opt" value="true" />
+            <output name="output" ftype="sam">
+                <assert_contents>
+                    <has_text text="M01368:8:000000000-A3GHV:1:1101:6911:8255" />
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help><![CDATA[
 **Bowtie2 Overview**