diff stacks_shortreads.xml @ 2:43e3eeb2e0ec draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit f55e2407891a3c1f73f14a77b7ddadcd6f5eb1f8"
author iuc
date Wed, 15 Jul 2020 17:42:30 -0400
parents 1974fee35ca7
children c5d7050e4ad7
line wrap: on
line diff
--- a/stacks_shortreads.xml	Mon Sep 30 14:16:13 2019 -0400
+++ b/stacks_shortreads.xml	Wed Jul 15 17:42:30 2020 -0400
@@ -10,11 +10,9 @@
     <command detect_errors="aggressive"><![CDATA[
 @FASTQ_INPUT_FUNCTIONS@
 
-mkdir stacks_inputs stacks_outputs &&
+python '$__tool_directory__'/check_bcfile.py '$barcode' &&
 
-#if $output_log
-    ln -s '$output_log' stacks_outputs/process_shortreads.log &&
-#end if
+mkdir stacks_inputs stacks_outputs &&
 
 #set ($link_command, $inputype) = $fastq_input_nonbatch( $input_type.fqinputs, $input_type.input_type_select, "_R%d_0" )
 $link_command
@@ -40,9 +38,9 @@
         <expand macro="fastq_input_bc_file" multiple="true" listtype="list:paired"/>
         <section name="options_advanced" title="advanced options" expanded="False">
             <expand macro="common_advanced"/>
-            <param argument="--no_read_trimming" type="boolean" checked="false" truevalue="--no_read_trimming" falsevalue="" label="Do not trim low quality reads, just discard them" />
-            <param argument="--mate-pair" name="mate_pair" type="boolean" checked="false" truevalue="--mate-pair" falsevalue="" label="Raw reads are circularized mate-pair data, first read will be reverse complemented" />
-            <param argument="--no_overhang" type="boolean" checked="false" truevalue="--no_overhang" falsevalue="" label="Data does not contain an overhang nucleotide between barcode and seqeunce" />
+            <param argument="--no_read_trimming" type="boolean" checked="false" truevalue="--no_read_trimming" falsevalue="" label="Do not trim low quality reads, just discard them"/>
+            <param argument="--mate-pair" name="mate_pair" type="boolean" checked="false" truevalue="--mate-pair" falsevalue="" label="Raw reads are circularized mate-pair data, first read will be reverse complemented"/>
+            <param argument="--no_overhang" type="boolean" checked="false" truevalue="--no_overhang" falsevalue="" label="Data does not contain an overhang nucleotide between barcode and seqeunce"/>
             <expand macro="rescue_barcode"/>
             <expand macro="process_adapter"/>
         </section>
@@ -51,31 +49,33 @@
     </inputs>
 
     <outputs>
-        <data format="txt" name="output_log" label="${tool.name} on ${on_string} log file" from_work_dir="stacks_outputs/process_shortreads.log" />
+        <data format="txt" name="output_log" label="${tool.name} on ${on_string} log file" from_work_dir="stacks_outputs/process_shortreads.log">
+            <filter>add_log</filter>
+        </data>
         <expand macro="process_outputs"/>
     </outputs>
 
     <tests>
         <!-- test single end, default options -->
-        <test>
+        <test expect_num_outputs="2">
             <param name="input_type|input_type_select" value="single"/>
             <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1.fq"/>
             <param name="input_type|barcode_encoding" value="--inline_null"/>
             <param name="barcode" value="procrad/barcodes"/>
-            <param name="add_log" value="yes" />
+            <param name="add_log" value="yes"/>
             <output name="output_log" file="shortreads/process_shortreads.out" lines_diff="4"/>
             <output_collection name="demultiplexed" count="40">
-                <element name="PopA_01" file="shortreads/PopA_01.fq" ftype="fastqsanger" />
+                <element name="PopA_01" file="shortreads/PopA_01.fq" ftype="fastqsanger"/>
             </output_collection>
         </test>
         <!-- test single end, default options -->
-        <test>
+        <test expect_num_outputs="4">
             <param name="input_type|input_type_select" value="paired"/>
             <param name="input_type|fqinputs">
                 <collection type="list:paired">
                     <element name="reads">
                         <collection type="paired">
-                            <element name="forward" value="procrad/R1.fq" ftype="fastqsanger" />
+                            <element name="forward" value="procrad/R1.fq" ftype="fastqsanger"/>
                             <element name="reverse" value="procrad/R2.fq" ftype="fastqsanger"/>
                         </collection>
                     </element>
@@ -84,22 +84,25 @@
             <param name="input_type|barcode_encoding" value="--inline_null"/>
             <param name="barcode" value="procrad/barcodes"/>
             <param name="capture" value="-D"/>
-            <param name="no_read_trimming" value="--no_read_trimming" />
-            <param name="mate_pair" value="--mate-pair" />
-            <param name="no_overhang" value="--no_overhang" />
+            <param name="no_read_trimming" value="--no_read_trimming"/>
+            <param name="mate_pair" value="--mate-pair"/>
+            <param name="no_overhang" value="--no_overhang"/>
             <param name="outype" value="gzfastq"/>
-            <param name="add_log" value="yes" />
+            <param name="add_log" value="yes"/>
             <assert_command>
-                <has_text text="-D" />
-                <has_text text="--no_read_trimming" />
-                <has_text text="--mate-pair" />
-                <has_text text="--no_overhang" />
+                <has_text text="-D"/>
+                <has_text text="--no_read_trimming"/>
+                <has_text text="--mate-pair"/>
+                <has_text text="--no_overhang"/>
             </assert_command>
-            <output name="output_log" file="shortreads/process_shortreads.out" compare="sim_size"/>
+            <output name="output_log">
+                <assert_contents><has_text text="ATGTAG"/></assert_contents>
+                <assert_contents><has_text text="Sequences not recorded"/></assert_contents>
+            </output>
             <output_collection name="demultiplexed_paired" type="list:paired" count="40">
                 <element name="PopA_01">
-                    <element name="forward" value="shortreads/PopA_01.forward.fq.gz" ftype="fastqsanger.gz" compare="sim_size"/>
-                    <element name="reverse" value="shortreads/PopA_01.reverse.fq.gz" ftype="fastqsanger.gz" compare="sim_size"/>
+                    <element name="forward" value="shortreads/PopA_01.forward.fq.gz" ftype="fastqsanger.gz" compare="sim_size" delta_frac="0.01"/>
+                    <element name="reverse" value="shortreads/PopA_01.reverse.fq.gz" ftype="fastqsanger.gz" compare="sim_size" delta_frac="0.01"/>
                 </element>
             </output_collection>
             <output_collection name="remaining" type="list:paired" count="40">
@@ -161,5 +164,5 @@
 @STACKS_INFOS@
 ]]>
     </help>
-    <expand macro="citation" />
+    <expand macro="citation"/>
 </tool>