diff flash.xml @ 1:d043b54b3bfb draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/flash commit cac63023973d851956b967df436be91aa8729f2e
author iuc
date Wed, 04 Oct 2017 16:03:42 -0400
parents 13e98e2709b8
children b48895989d78
line wrap: on
line diff
--- a/flash.xml	Tue Sep 26 16:42:09 2017 -0400
+++ b/flash.xml	Wed Oct 04 16:03:42 2017 -0400
@@ -1,9 +1,12 @@
 <?xml version="1.0"?>
-<tool id="flash" name="FLASH" version="1.2.11">
+<tool id="flash" name="FLASH" version="@VERSION@.1">
     <description>adjust length of short reads</description>
     <requirements>
-        <requirement type="package" version="1.2.11">flash</requirement>
+        <requirement type="package" version="@VERSION@">flash</requirement>
     </requirements>
+    <macros>
+        <token name="@VERSION@">1.2.11</token>
+    </macros>
     <version_command>flash --version | head -n 1</version_command>
     <command detect_errors="aggressive">
         <![CDATA[
@@ -12,23 +15,41 @@
                 -M $max_overlap
                 -x $max_mismatch_density
                 $allow_outies
-                '$forward' '$reverse'
+                #if $layout.select_layout == 'individual':
+                    '$layout.forward' '$layout.reverse'
+                #else:
+                    '$layout.reads.forward' '$layout.reads.reverse'
+                #end if
         ]]>
     </command>
     <inputs>
-        <param format="fastq" name="forward" type="data" label="Forward reads" />
-        <param format="fastq" name="reverse" type="data" label="Reverse reads" />
+        <conditional name="layout">
+            <param name="select_layout" type="select">
+                <option value="individual">Individual datasets</option>
+                <option value="collection">Paired collection</option>
+            </param>
+            <when value="individual">
+                <param format="fastq" name="forward" type="data" label="Forward reads" />
+                <param format="fastq" name="reverse" type="data" label="Reverse reads" />
+            </when>
+            <when value="collection">
+                <param format="fastq" name="reads" type="data_collection" collection_type="paired" label="Read collection" />
+            </when>
+        </conditional>
         <param name="min_overlap" argument="--min-overlap" type="integer" optional="true" value="10" label="Minimum overlap" help="The minimum required overlap length between two reads to provide a confident overlap." />
         <param name="max_overlap" argument="--max-overlap" type="integer" optional="true" value="65" label="Maximum overlap" help="Maximum overlap length expected in approximately 90% of read pairs. Overlaps longer than the maximum overlap parameter are still considered as good overlaps, but the mismatch density is calculated over the first max_overlap bases in the overlapped region rather than the entire overlap." />
         <param name="max_mismatch_density" argument="--max-mismatch-density" type="float" optional="true" value="0.25" label="Maximum mismatch density" help="Maximum allowed ratio between the number of mismatched base pairs and the overlap length. Two reads will not be combined with a given overlap if that overlap results in a mismatched base density higher than this value." />
         <param name="allow_outies" argument="--allow-outies" type="boolean" truevalue="--allow-outies" falsevalue="" checked="false" label="Combine read pairs in both orientations" help="FLASH uses the same parameters when trying each orientation. If a read pair can be combined in either orientation, the better-fitting one will be chosen using the same scoring algorithm that FLASH normally uses." />
+        <param name="generate_histogram" type="boolean" truevalue="" falsevalue="" checked="false" label="Output a text rendering of the histogram" />
     </inputs>
     <outputs>
         <data format="fastq" name="merged_reads" from_work_dir="out.extendedFrags.fastq" label="${tool.name} on ${on_string}: Merged reads" />
         <data format="fastq" name="unmerged_reads_f" from_work_dir="out.notCombined_1.fastq" label="${tool.name} on ${on_string}: Unmerged forward reads" />
         <data format="fastq" name="unmerged_reads_r" from_work_dir="out.notCombined_2.fastq" label="${tool.name} on ${on_string}: Unmerged reverse reads" />
         <data format="tabular" name="hist" from_work_dir="out.hist" label="${tool.name} on ${on_string}: Unmerged reads tabular histogram" />
-        <data format="txt" name="histogram" from_work_dir="out.histogram" label="${tool.name} on ${on_string}: Unmerged reads histogram" />
+        <data format="txt" name="histogram" from_work_dir="out.histogram" label="${tool.name} on ${on_string}: Unmerged reads histogram">
+            <filter>generate_histogram</filter>
+        </data>
         <data format="tabular" name="hist_in" from_work_dir="out.hist.innie" label="${tool.name} on ${on_string}: Unmerged reads tabular histogram (in)" >
             <filter>allow_outies</filter>
         </data>
@@ -36,26 +57,27 @@
             <filter>allow_outies</filter>
         </data>
         <data format="txt" name="histogram_in" from_work_dir="out.histogram.innie" label="${tool.name} on ${on_string}: Unmerged reads histogram (in)" >
-            <filter>allow_outies</filter>
+            <filter>allow_outies and generate_histogram</filter>
         </data>
         <data format="txt" name="histogram_out" from_work_dir="out.histogram.outie" label="${tool.name} on ${on_string}: Unmerged reads histogram (out)" >
-            <filter>allow_outies</filter>
+            <filter>allow_outies and generate_histogram</filter>
         </data>
     </outputs>
     <tests>
         <test>
             <param name="forward" value="flash_forward_in1.fastq" />
             <param name="reverse" value="flash_reverse_in1.fastq" />
+            <param name="generate_histogram" value="false" />
             <output name="merged_reads" file="flash_merged_out1.fastq" />
             <output name="unmerged_reads_f" file="flash_unmerged_f_out1.fastq" />
             <output name="unmerged_reads_r" file="flash_unmerged_r_out1.fastq" />
             <output name="hist" file="flash_hist_out1.tabular" />
-            <output name="histogram" file="flash_hist_out1.txt" />
         </test>
         <test>
             <param name="forward" value="flash_forward_in2.fastq" />
             <param name="reverse" value="flash_reverse_in2.fastq" />
             <param name="allow_outies" value="true" />
+            <param name="generate_histogram" value="true" />
             <output name="merged_reads" file="flash_merged_out2.fastq" />
             <output name="unmerged_reads_f" file="flash_unmerged_f_out2.fastq" />
             <output name="unmerged_reads_r" file="flash_unmerged_r_out2.fastq" />