diff umi-tools_extract.xml @ 8:3cfd8e1073d7 draft

planemo upload commit f6178c9e071a2158a35b82a3607f6dc8a767675c
author iuc
date Mon, 16 Jul 2018 17:35:16 -0400
parents f77bc14eba31
children 828dba98cdb4
line wrap: on
line diff
--- a/umi-tools_extract.xml	Sat Jul 14 06:14:14 2018 -0400
+++ b/umi-tools_extract.xml	Mon Jul 16 17:35:16 2018 -0400
@@ -1,7 +1,23 @@
-<tool id="umi_tools_extract" name="UMI-tools extract" version="@VERSION@.1">
+<tool id="umi_tools_extract" name="UMI-tools extract" version="@VERSION@.2">
     <description>Extract UMI from fastq files</description>
     <macros>
         <import>macros.xml</import>
+        <macro name="out_conditional">
+            <actions>
+                <conditional name="input_type.type">
+                    <when value="paired_collection" >
+                        <action type="format">
+                            <option type="from_param" name="input_type.input_readpair" param_attribute="forward.ext" />
+                        </action>
+                    </when>
+                    <when value="paired" >
+                        <action type="format">
+                            <option type="from_param" name="input_type.input_read1"  param_attribute="ext" />
+                        </action>
+                    </when>
+                </conditional>
+            </actions>
+        </macro>
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
@@ -137,15 +153,18 @@
         </conditional>
     </inputs>
     <outputs>
-        <data name="out" format_source="input_single">
+        <data name="out" format_source="input_single" label="Reads: ${tool.name} on ${on_string}" >
             <filter>input_type['type'] == "single"</filter>
         </data>
-        <data name="out1" format_source="input_read1">
-            <filter>input_type['type'] !== "single"</filter>
+        <data name="out1" format_source="input_read1" label="Reads1: ${tool.name} on ${on_string}" >
+            <filter>input_type['type'] != "single"</filter>
+            <expand macro="out_conditional" />
         </data>
-        <data name="out2" format_source="input_read2">
-            <filter>input_type['type'] !== "single"</filter>
+        <data name="out2" format_source="input_read2" label="Reads2: ${tool.name} on ${on_string}" >
+            <filter>input_type['type'] != "single"</filter>
+            <expand macro="out_conditional" />
         </data>
+        
         <data name="out_log" format="txt">
             <filter>print_log == True</filter>
         </data>
@@ -159,30 +178,47 @@
             <param name="quality_selector" value="true" />
             <param name="quality_filter_threshold" value="10" />
             <param name="quality_encoding" value="phred33" />
-            <output name="out" file="out_SE.fastq" />
-            <output name="out_log" file="out_single.log" lines_diff="22"/>
+            <output name="out" file="out_SE.fastq" ftype="fastq" />
+            <output name="out_log" >
+                <assert_contents>
+                    <has_text text="Input Reads: 100" />
+                    <has_text text="umi quality: 28" />
+                    <has_text text="Reads output: 72" />
+                </assert_contents>
+            </output>
         </test>
         <test>
             <param name="type" value="paired" />
             <param name="input_read1" value="t_R1.fastq.gz" ftype="fastq.gz" />
             <param name="input_read2" value="t_R2.fastq.gz" ftype="fastq.gz" />
             <param name="bc_pattern" value="NNNXXX" />
-            <output name="out1" file="out_R1.fastq.gz" decompress="true" lines_diff="2" />
-            <output name="out2" file="out_R2.fastq.gz" decompress="true" lines_diff="2" />
-            <output name="out_log" file="out_paired.log" lines_diff="16"/>
+            <output name="out1" file="out_R1.fastq.gz" decompress="true" lines_diff="2" ftype="fastq.gz" />
+            <output name="out2" file="out_R2.fastq.gz" decompress="true" lines_diff="2" ftype="fastq.gz" />
+            <output name="out_log" >
+                <assert_contents>
+                    <has_text text="Input Reads: 100" />
+                    <has_text text="Reads output: 100" />
+                </assert_contents>
+            </output>
         </test>
         <test>
             <param name="type" value="paired_collection" /> <!-- same as before, but uncompressed -->
+            <param name="paired_type" value="no" />
             <param name="input_readpair" >
-                <collection type="paired">
+                <collection type="paired" >
                     <element name="forward" ftype="fastq" value="t_R1.fastq" />
                     <element name="reverse" ftype="fastq" value="t_R2.fastq" />
                 </collection>
             </param>
             <param name="bc_pattern" value="NNNXXX" />
-            <output name="out1" file="out_R1.fastq.gz" decompress="true" lines_diff="2" />
-            <output name="out2" file="out_R2.fastq.gz" decompress="true" lines_diff="2" />
-            <output name="out_log" file="out_paired.log" lines_diff="25" />
+            <output name="out1" file="out_R1.fastq" ftype="fastq" />
+            <output name="out2" file="out_R2.fastq" ftype="fastq" />
+            <output name="out_log" >
+                <assert_contents>
+                    <has_text text="Input Reads: 100" />
+                    <has_text text="Reads output: 100" />
+                </assert_contents>
+            </output>
         </test>
         <test>
             <param name="type" value="paired" />
@@ -192,7 +228,7 @@
             <param name="bc_pattern" value="CCCCCCNNNNNNNNNN" />
             <param name="use_barcodes" value="yes" />
             <param name="filter_barcode_file" value="scrb_seq_barcodes" />
-            <output name="out2" file="scrb_extract.fastq.gz" decompress="true" />
+            <output name="out2" file="scrb_extract.fastq.gz" decompress="true"  ftype="fastq.gz" />
         </test>
         <test><!-- same as above but with regex barcode-->
             <param name="type" value="paired" />
@@ -202,7 +238,16 @@
             <param name="bc_pattern" value="^(?P&lt;cell_1&gt;.{6})(?P&lt;umi_1&gt;.{10})" />
             <param name="use_barcodes" value="yes" />
             <param name="filter_barcode_file" value="scrb_seq_barcodes" />
-            <output name="out2" file="scrb_extract.fastq.gz" decompress="true" />
+            <output name="out2" file="scrb_extract.fastq.gz" decompress="true" ftype="fastq.gz" />
+        </test>
+        <test><!-- CelSeq2 example -->
+            <param name="type" value="paired" />
+            <param name="input_read1" value="read_R1.200.gz" ftype="fastq.gz" />
+            <param name="input_read2" value="read_R2.200.gz" ftype="fastq.gz" />
+            <param name="extract_method" value="string" />
+            <param name="bc_pattern" value="NNNNNNCCCCCC" />
+            <output name="out1" file="read_R1.200_extracted.fastq.gz" ftype="fastq.gz" decompress="true" lines_diff="1" />
+            <output name="out2" file="read_R2.200_extracted.fastq.gz" ftype="fastq.gz" decompress="true" lines_diff="1" />
         </test>
     </tests>
     <help><![CDATA[