diff screen.seqs.xml @ 3:6202ff80199f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
author iuc
date Tue, 20 Mar 2018 22:05:32 -0400
parents 8743aecd26a9
children c1feef4d5e34
line wrap: on
line diff
--- a/screen.seqs.xml	Fri Sep 08 14:47:32 2017 -0400
+++ b/screen.seqs.xml	Tue Mar 20 22:05:32 2018 -0400
@@ -7,85 +7,96 @@
     <expand macro="stdio"/>
     <expand macro="version_command"/>
     <command><![CDATA[
-        @SHELL_OPTIONS@
+@SHELL_OPTIONS@
 
-        ## create symlinks to input datasets
-        ln -s "$fasta_in" fasta_in.dat &&
-        ln -s "$names_in" names_in.dat &&
-        ln -s "$groups_in" groups_in.dat &&
-        ln -s "$qfile_in" qfile_in.dat &&
-        ln -s "$count_in" count_in.dat &&
-        ln -s "$alignreport_in" alignreport_in.dat &&
-        ln -s "$taxonomy_in" taxonomy_in.dat &&
-        ln -s "$summary" summary.dat &&
-        ln -s "$contigsreport" contigsreport.dat &&
+## create symlinks to input datasets
+ln -s '$fasta' fasta.dat &&
+ln -s '$names' names.dat &&
+ln -s '$groups' groups.dat &&
+ln -s '$qfile' qfile.dat &&
+ln -s '$count' count.dat &&
+ln -s '$taxonomy' taxonomy.dat &&
+ln -s '$summary' summary.dat &&
+#if $contigsrep.usecontigs == "yes":
+    ln -s '$contigsrep.contigsreport' contigsreport.dat &&
+#end if
+#if $alignrep.usealign == "yes":
+    ln -s '$alignrep.alignreport' alignreport.dat &&
+#end if
 
-        echo 'screen.seqs(
-            fasta=fasta_in.dat
-            #if int($start) > -1:
-                ,start=$start
-            #end if
-            #if int($end) > -1:
-                ,end=$end
-            #end if
-            #if int($minlength) > -1:
-                ,minlength=$minlength
-            #end if
-            #if int($maxlength) > -1:
-                ,maxlength=$maxlength
-            #end if
-            #if int($maxambig) > -1:
-                ,maxambig=$maxambig
-            #end if
-            #if int($maxhomop) > -1:
-                ,maxhomop=$maxhomop
-            #end if
-            #if int($criteria) > -1:
-                ,criteria=$criteria
-            #end if
-            #if $optimize:
-                ,optimize=$optimize
-            #end if
-            #if $qfile_in:
-                ,qfile=qfile_in.dat
-            #end if
-            #if $names_in:
-                ,name=names_in.dat
-            #end if
-            #if $groups_in:
-                ,group=groups_in.dat
-            #end if
-            #if $alignreport_in:
-                ,alignreport=alignreport_in.dat
-            #end if
-            #if $taxonomy_in:
-                ,taxonomy=taxonomy_in.dat
-            #end if
-            #if $count_in:
-                ,count=count_in.dat
-            #end if
-            #if $summary:
-                ,summary=summary.dat
-            #end if
-            #if $contigsreport:
-                ,contigsreport=contigsreport.dat
-            #end if
-            ,processors='"\${GALAXY_SLOTS:-8}"'
-        )'
-        | sed 's/ //g'  ## mothur trips over whitespace
-        | mothur
-        | tee mothur.out.log
+echo 'screen.seqs(
+    fasta=fasta.dat
+    #if int($start) > -1:
+        ,start=$start
+    #end if
+    #if int($end) > -1:
+        ,end=$end
+    #end if
+    #if int($minlength) > -1:
+        ,minlength=$minlength
+    #end if
+    #if int($maxlength) > -1:
+        ,maxlength=$maxlength
+    #end if
+    #if int($maxambig) > -1:
+        ,maxambig=$maxambig
+    #end if
+    #if int($maxhomop) > -1:
+        ,maxhomop=$maxhomop
+    #end if
+    #if int($criteria) > -1:
+        ,criteria=$criteria
+    #end if
+    #if $optimize:
+        ,optimize=$optimize
+    #end if
+    #if $qfile:
+        ,qfile=qfile.dat
+    #end if
+    #if $names:
+        ,name=names.dat
+    #end if
+    #if $groups:
+        ,group=groups.dat
+    #end if
+    #if $taxonomy:
+        ,taxonomy=taxonomy.dat
+    #end if
+    #if $count:
+        ,count=count.dat
+    #end if
+    #if $summary:
+        ,summary=summary.dat
+    #end if
+    #if $contigsrep.usecontigs == "yes":
+        ,contigsreport=contigsreport.dat
+        ,minoverlap=$contigsrep.minoverlap
+        ,ostart=$contigsrep.ostart
+        ,oend=$contigsrep.oend
+        ,mismatches=$contigsrep.mismatches
+    #end if
+    #if $alignrep.usealign == "yes":
+        ,alignreport=alignreport.dat
+        ,minsim=$alignrep.minsim
+        ,minscore=$alignrep.minscore
+        ,maxinsert=$alignrep.maxinsert
+    #end if
+    ,processors='"\${GALAXY_SLOTS:-8}"'
+)'
+| sed 's/ //g'  ## mothur trips over whitespace
+| mothur
+| tee mothur.out.log
     ]]></command>
     <inputs>
-        <param name="fasta_in" type="data" format="fasta,mothur.align" label="fasta - Fasta to screen"/>
-        <param name="start" type="integer" value="-1" label="start - Remove sequences that start after position (ignored when negative)"/>
-        <param name="end" type="integer" value="-1" label="end - Remove sequences that end before position (ignored when negative)"/>
-        <param name="minlength" type="integer" value="-1" label="minlength - Remove sequences shorter than (ignored when negative)"/>
-        <param name="maxlength" type="integer" value="-1" label="maxlength - Remove sequences longer than (ignored when negative)"/>
-        <param name="maxambig" type="integer" value="-1" label="maxambig - Remove sequences with ambiguous bases greater than (ignored when negative)"/>
-        <param name="maxhomop" type="integer" value="-1" label="maxhomop - Remove sequences with homopolymers greater than (ignored when negative)"/>
-        <param name="criteria" type="integer" value="-1" label="criteria - Percent of sequences that an optimize value must match to be retained(ignored when negative)"/>
-        <param name="optimize" type="select" multiple="true" display="checkboxes" label="optimize - Optimize selected paramenters">
+        <param argument="fasta" type="data" format="fasta,mothur.align" label="fasta - Fasta to screen"/>
+        <param argument="start" type="integer" value="-1" label="start - Remove sequences that start after position (ignored when negative)"/>
+        <param argument="end"   type="integer" value="-1" label="end - Remove sequences that end before position (ignored when negative)"/>
+        <param argument="minlength" type="integer" value="10" label="minlength - Remove sequences shorter than (ignored when negative)"/>
+        <param argument="maxlength" type="integer" value="-1" label="maxlength - Remove sequences longer than (ignored when negative)"/>
+        <param argument="maxambig"  type="integer" value="-1" label="maxambig - Remove sequences with ambiguous bases greater than (ignored when negative)"/>
+        <param argument="maxhomop"  type="integer" value="-1" label="maxhomop - Remove sequences with homopolymers greater than (ignored when negative)"/>
+        <param argument="criteria"  type="integer" value="-1" label="criteria - Percent of sequences that an optimize value must match to be retained (ignored when negative)"/>
+        <param argument="optimize"  type="select" multiple="true" display="checkboxes" label="optimize - Optimize selected paramenters">
             <option value="start">start</option>
             <option value="end">end</option>
             <option value="minlength">minlength</option>
@@ -93,57 +104,166 @@
             <option value="maxambig">maxambig</option>
             <option value="maxhomop">maxhomop</option>
         </param>
-        <param name="qfile_in" type="data" format="qual" optional="true" label="qfile - Sequence Quality file to screen"/>
-        <param name="names_in" type="data" format="mothur.names" optional="true" label="name - Sequence Names to screen"/>
-        <param name="groups_in" type="data" format="mothur.groups" optional="true" label="group - Groups to screen"/>
-        <param name="alignreport_in" type="data" format="mothur.align.report" optional="true" label="alignreport - Align Report to screen"/>
-        <param name="summary" type="data" format="mothur.summary" optional="true" label="summary file - as created by summary.seqs" help="saves processing time when screening with parameters in the summary file"/>
-        <param name="contigsreport" type="data" format="tabular" optional="true" label="contigsreport - Contigs Report to screen with" help="this file is created by the make.contigs command. If you provide the contigs report file you can screen your sequences using the following parameters: minoverlap, ostart, oend and mismatches"/>
-        <param name="taxonomy_in" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy to screen"/>
-        <param name="count_in" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
+        <param argument="qfile"   type="data" format="qual" optional="true" label="qfile - Sequence Quality file to screen"/>
+        <param argument="names"   type="data" format="mothur.names" optional="true" label="name - Sequence Names to screen"/>
+        <param argument="groups"  type="data" format="mothur.groups" optional="true" label="group - Groups to screen"/>
+        <param argument="summary" type="data" format="mothur.summary" optional="true" label="summary file - as created by summary.seqs"
+            help="saves processing time when screening with parameters in the summary file"/>
+        <param argument="taxonomy" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy to screen"/>
+        <param argument="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
+        <conditional name="alignrep">
+            <param name="usealign" type="select" label="Perform screening using an alignment report?" help="An alignment report is created by the align.seqs tool.
+                If you provide the alignment report file you can screen your sequences using the following parameters: minsim, minscore, and maxinsert">
+                <option value="yes">Yes</option>
+                <option value="no" selected="true">No</option>
+            </param>
+            <when value="yes">
+                <param argument="alignreport" type="data" format="mothur.align.report" label="alignreport - Align Report to screen with"/>
+                <param argument="minsim"     type="integer" value="-1" min="-1" label="minsim - Minimum similarity to template sequences during alignment"/>
+                <param argument="minscore"   type="integer" value="-1" min="-1" label="minscore - Minimum search score during alignment (ignored when negative)"/>
+                <param argument="maxinsert"  type="integer" value="-1" min="-1" label="maxinsert - Maximum number of insertions during alignment (ignored when negative)"/>
+            </when>
+            <when value="no"/>
+        </conditional>
+        <conditional name="contigsrep">
+            <param name="usecontigs" type="select" label="Perform screening using a contigsreport?" help="A contigsreport is created by the make.contigs tool.
+                If you provide the contigs report file you can screen your sequences using the following parameters: minoverlap, ostart, oend and mismatches">
+                <option value="yes">Yes</option>
+                <option value="no" selected="true">No</option>
+            </param>
+            <when value="yes">
+                <param argument="contigsreport" type="data" format="tabular" label="contigsreport - Contigs Report to screen with"
+                    help="this file is created by the make.contigs command"/>
+                <param argument="minoverlap" type="integer" value="-1" min="-1" label="minoverlap - Minimum overlap length (ignored when negative)"/>
+                <param argument="ostart"     type="integer" value="-1" min="-1" label="ostart - Position the overlap must start by (ignored when negative)"/>
+                <param argument="oend"       type="integer" value="-1" min="-1" label="oend - Position the overlap must end after (ignored when negative)"/>
+                <param argument="mismatches" type="integer" value="-1" min="-1" label="mismatches - Maximum number of mismatches (ignored when negative)"/>
+            </when>
+            <when value="no"/>
+        </conditional>
+        <expand macro="param-savelog"/>
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
-        <data name="fasta_out" format_source="fasta_in" from_work_dir="fasta_in*.good.dat" label="${tool.name} on ${on_string}: good.${fasta_in.datatype.file_ext}"/>
-        <data name="bad_accnos" format="mothur.accnos" from_work_dir="fasta_in*.bad.accnos" label="${tool.name} on ${on_string}: bad.accnos"/>
-        <data name="qfile_out" format_source="qfile_in" from_work_dir="qfile_in*.good.dat" label="${tool.name} on ${on_string}: qfile">
-            <filter>qfile_in</filter>
+        <data name="fasta_out" format_source="fasta" from_work_dir="fasta*.good.dat" label="${tool.name} on ${on_string}: good.${fasta.datatype.file_ext}"/>
+        <data name="bad_accnos" format="mothur.accnos" from_work_dir="fasta*.bad.accnos" label="${tool.name} on ${on_string}: bad.accnos"/>
+        <data name="qfile_out" format_source="qfile" from_work_dir="qfile*.good.dat" label="${tool.name} on ${on_string}: qfile">
+            <filter>qfile</filter>
         </data>
-        <data name="names_out" format="mothur.names" from_work_dir="names_in*.good.dat" label="${tool.name} on ${on_string}: names">
-            <filter>names_in</filter>
+        <data name="names_out" format="mothur.names" from_work_dir="names*.good.dat" label="${tool.name} on ${on_string}: names">
+            <filter>names</filter>
         </data>
-        <data name="groups_out" format="mothur.groups" from_work_dir="groups_in*.good.dat" label="${tool.name} on ${on_string}: groups">
-            <filter>groups_in</filter>
+        <data name="groups_out" format="mothur.groups" from_work_dir="groups*.good.dat" label="${tool.name} on ${on_string}: groups">
+            <filter>groups</filter>
+        </data>
+        <data name="alignreport_out" format="mothur.align.report" from_work_dir="alignreport.good.align.report" label="${tool.name} on ${on_string}: align.report">
+            <filter>alignrep.alignreport</filter>
         </data>
-        <data name="alignreport_out" format="mothur.align.report" from_work_dir="alignreport_in*.good.dat" label="${tool.name} on ${on_string}: align.report">
-            <filter>alignreport_in</filter>
+        <data name="contigsreport_out" format="tabular" from_work_dir="contigsreport.good.contigs.report" label="${tool.name} on ${on_string}: contigs.report">
+            <filter>contigsrep.contigsreport</filter>
         </data>
-        <data name="count_out" format="mothur.count_table" from_work_dir="count_in*.good.dat" label="${tool.name} on ${on_string}: count">
-            <filter>count_in</filter>
+        <data name="count_out" format="mothur.count_table" from_work_dir="count*.good.dat" label="${tool.name} on ${on_string}: count">
+            <filter>count</filter>
         </data>
     </outputs>
     <tests>
         <test>
-            <param name="fasta_in" value="Mock_S280_L001_R1_001_small.trim.contigs.fasta" ftype="fasta"/>
+            <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.fasta" ftype="fasta"/>
             <param name="maxambig" value="0"/>
             <param name="maxlength" value="275"/>
             <output name="fasta_out" file="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta" ftype="fasta"/>
             <output name="bad_accnos" file="Mock_S280_L001_R1_001_small.trim.contigs.bad.accnos" ftype="mothur.accnos"/>
+            <param name="savelog" value="true"/>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with count table -->
+            <param name="fasta" value="amazon.fasta" ftype="mothur.align"/>
+            <param name="count" value="amazon1.count_table"/>
+            <param name="maxambig" value="0"/>
+            <param name="maxlength" value="500"/>
+            <output name="fasta_out" ftype="mothur.align">
+                <assert_contents>
+                    <expand macro="test-fasta-format"/>
+                    <has_text text="U68638"/>
+                    <not_has_text text="U68589"/>
+                </assert_contents>
+            </output>
+            <output name="count_out" ftype="mothur.count_table">
+                <assert_contents>
+                    <expand macro="test-count-format"/>
+                    <has_text text="U68638"/>
+                    <not_has_text text="U68589"/>
+                </assert_contents>
+            </output>
+            <output name="bad_accnos" ftype="mothur.accnos">
+                <assert_contents>
+                    <expand macro="test-accnos-format"/>
+                    <not_has_text text="U68638"/>
+                    <has_text text="U68589"/>
+                    <has_text text="ambig"/>
+                    <has_text text="length"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
-        <test>
-            <param name="fasta_in" value="amazon.fasta" ftype="mothur.align"/>
-            <param name="count_in" value="amazon.count_table"/>
+        <test><!-- test screening with contigsreport -->
+            <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.fasta" ftype="fasta"/>
             <param name="maxambig" value="0"/>
             <param name="maxlength" value="275"/>
-            <output name="fasta_out" md5="d41d8cd98f00b204e9800998ecf8427e" ftype="mothur.align"/>
-            <output name="count_out" md5="5f4a08bbf3ec12f954edbcc6b2a2feee" ftype="mothur.count_table"/>
-            <output name="bad_accnos" md5="66acde5349e34fc97be22032ce68eea5" ftype="mothur.accnos"/>
+            <param name="usecontigs" value="yes"/>
+            <param name="contigsreport" value="Mock_S280_L001_R1_001_small.contigs.report"/>
+            <param name="mismatches" value="18"/>
+            <output name="fasta_out" file="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta" ftype="fasta"/>
+            <output name="bad_accnos" ftype="mothur.accnos">
+                <assert_contents>
+                    <expand macro="test-accnos-format"/>
+                    <has_text text="mismatches"/>
+                    <has_text text="ambig"/>
+                </assert_contents>
+            </output>
+            <output name="contigsreport_out" ftype="tabular">
+                <assert_contents>
+                    <expand macro="test-contigsreport-format"/>
+                    <not_has_text text="M00967_43_000000000-A3JHG_1_1101_22487_4260"/>
+                    <has_text text="M00967_43_000000000-A3JHG_1_1101_15923_3823"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test screening with alignment report -->
+            <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta" ftype="fasta"/>
+            <param name="maxambig" value="0"/>
+            <param name="maxlength" value="275"/>
+            <param name="usealign" value="yes"/>
+            <param name="alignreport" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align.report"/>
+            <param name="minscore" value="100"/>
+            <output name="fasta_out" ftype="fasta">
+                <assert_contents>
+                    <expand macro="test-fasta-format"/>
+                    <not_has_text text="M00967_43_000000000-A3JHG_1_1101_14010_4122"/>
+                    <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
+                </assert_contents>
+            </output>
+            <output name="bad_accnos" ftype="mothur.accnos">
+                <assert_contents>
+                    <expand macro="test-accnos-format"/>
+                    <has_text text="score"/>
+                </assert_contents>
+            </output>
+            <output name="alignreport_out" ftype="mothur.align.report">
+                <assert_contents>
+                    <expand macro="test-alignreport-format"/>
+                    <not_has_text text="M00967_43_000000000-A3JHG_1_1101_14010_4122"/>
+                    <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
     </tests>
-    <help>
-<![CDATA[
+    <help><![CDATA[
 
 @MOTHUR_OVERVIEW@
 
@@ -156,7 +276,6 @@
 .. _align.report: https://www.mothur.org/wiki/Align.seqs
 .. _screen.seqs: https://www.mothur.org/wiki/Screen.seqs
 
-]]>
-    </help>
+    ]]></help>
     <expand macro="citations"/>
 </tool>