diff classify.seqs.xml @ 3:5b53b77232dc 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:14:35 -0400
parents cc9c7b550c29
children 65b370206748
line wrap: on
line diff
--- a/classify.seqs.xml	Wed Sep 13 17:11:50 2017 -0400
+++ b/classify.seqs.xml	Tue Mar 20 22:14:35 2018 -0400
@@ -7,121 +7,127 @@
     <expand macro="stdio"/>
     <expand macro="version_command"/>
     <command><![CDATA[
-        @SHELL_OPTIONS@
+@SHELL_OPTIONS@
 
-        ## enable mothur to find blast
-        loc=`which mothur` && ln -s "\${loc%/mothur}"/* . &&
+## enable mothur to find blast
+ln -s `dirname \$(which mothur)`/* . &&
 
-        ## create symlinks to input datasets
-        ln -s "$fasta" fasta.dat &&
-        ln -s "$alignment.template" alignment.template.dat &&
-        ln -s "$tax.taxonomy" tax.taxonomy.dat &&
-        ln -s "$count" count.dat &&
-        ln -s "$name" name.dat &&
+## create symlinks to input datasets
+ln -s '$fasta' fasta.dat &&
+ln -s '$alignment.template' alignment.template.dat &&
+ln -s '$tax.taxonomy' tax.taxonomy.dat &&
+ln -s '$count' count.dat &&
+ln -s '$name' name.dat &&
 
-        echo 'classify.seqs(
-            fasta=fasta.dat,
-            reference=alignment.template.dat,
-            taxonomy=tax.taxonomy.dat,
-            method=$classify.method,
-            #if $classify.method == "wang":
-                ksize=$classify.ksize,
-                iters=$classify.iters,
-                cutoff=$classify.cutoff,
-                probs=$classify.probs,
-            #elif $classify.method == "knn":
-                numwanted=$classify.numwanted,
-                search=$classify.search.algorithm,
-                #if $classify.search.algorithm == "kmer":
-                    ksize=$classify.search.ksize,
-                #elif $classify.search.algorithm == "blast":
-                    match=$classify.search.match,
-                    mismatch=$classify.search.mismatch,
-                    gapopen=$classify.search.gapopen,
-                    gapextend=$classify.search.gapextend,
-                #end if
-            #end if
-            #if $count:
-                count=count.dat,
-            #end if
-            #if $name:
-                name=name.dat,
-            #end if
-            relabund=$relabund,
-            processors='\${GALAXY_SLOTS:-8}'
-        )'
-        | sed 's/ //g'  ## mothur trips over whitespace
-        | ./mothur
-        | tee mothur.out.log
+echo 'classify.seqs(
+    fasta=fasta.dat,
+    reference=alignment.template.dat,
+    taxonomy=tax.taxonomy.dat,
+    method=$classify.method,
+    #if $classify.method == "wang":
+        ksize=$classify.ksize,
+        iters=$classify.iters,
+        cutoff=$classify.cutoff,
+        probs=$classify.probs,
+    #elif $classify.method == "knn":
+        numwanted=$classify.numwanted,
+        search=$classify.search.algorithm,
+        #if $classify.search.algorithm == "kmer":
+            ksize=$classify.search.ksize,
+        #elif $classify.search.algorithm == "blast":
+            match=$classify.search.match,
+            mismatch=$classify.search.mismatch,
+            gapopen=$classify.search.gapopen,
+            gapextend=$classify.search.gapextend,
+        #end if
+    #end if
+    #if $count:
+        count=count.dat,
+    #end if
+    #if $name:
+        name=name.dat,
+    #end if
+    relabund=$relabund,
+    output=$output,
+    printlevel=$printlevel,
+    processors='\${GALAXY_SLOTS:-8}'
+)'
+| sed 's/ //g'  ## mothur trips over whitespace
+| ./mothur
+| tee mothur.out.log
     ]]></command>
     <inputs>
-        <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+        <param argument="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
         <conditional name="alignment">
-            <param name="source" type="select" label="Select Reference Template from" help="">
+            <param name="source" type="select" label="Select Reference Template from">
                 <option value="hist">History</option>
                 <option value="ref">Cached Reference</option>
             </param>
             <when value="ref">
-                <param name="template" type="select" label="reference - Select an alignment database " help="">
+                <param argument="reference" name="template" type="select" label="reference - Select an alignment database " help="">
                     <options from_data_table="mothur_aligndb">
                     </options>
                 </param>
             </when>
             <when value="hist">
-                <param name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/>
+                <param argument="reference" name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/>
             </when>
         </conditional>
         <conditional name="tax">
-            <param name="source2" type="select" label="Select Taxonomy from" help="">
+            <param name="source2" type="select" label="Select Taxonomy from">
                 <option value="ref">Cached Reference</option>
                 <option value="hist">History</option>
             </param>
             <when value="ref">
-                <param name="taxonomy" type="select" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy reference">
+                <param argument="taxonomy" type="select" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy reference">
                     <options from_data_table="mothur_taxonomy"/>
                 </param>
             </when>
             <when value="hist">
-                <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy reference"/>
+                <param argument="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy reference"/>
             </when>
         </conditional>
         <conditional name="classify">
-            <param name="method" type="select" label="method - Select a classification method" help="">
+            <param argument="method" type="select" label="method - Select a classification method">
                 <option value="wang" selected="true">Wang (default)</option>
                 <option value="knn">K-Nearest Neighbor (knn)</option>
             </param>
             <when value="wang">
-                <param name="ksize" type="integer" value="8" min="1" label="ksize - kmer length"/>
-                <param name="iters" type="integer" value="100" min="1" label="iters - iterations to do when calculating the bootstrap confidence score"/>
-                <param name="cutoff" type="integer" value="0" min="0" label="cutoff - specify a bootstrap confidence threshold for your taxonomy"/>
-                <param name="probs" type="boolean" falsevalue="false" truevalue="true" checked="true" label="probs - Show probabilities"/>
+                <param argument="ksize" type="integer" value="8" min="1" label="ksize - kmer length"/>
+                <param argument="iters" type="integer" value="100" min="1" label="iters - iterations to do when calculating the bootstrap confidence score"/>
+                <param argument="cutoff" type="integer" value="80" min="0" label="cutoff - specify a bootstrap confidence threshold for your taxonomy"/>
+                <param argument="probs" type="boolean" falsevalue="false" truevalue="true" checked="true" label="probs - Show probabilities"/>
             </when>
             <when value="knn">
-                <param name="numwanted" type="integer" value="10" label="numwanted - the number of sequence matches you want with the knn method"/>
+                <param argument="numwanted" type="integer" value="10" label="numwanted - the number of sequence matches you want with the knn method"/>
                 <conditional name="search">
-                    <param name="algorithm" type="select" label="algorithm - " help="">
+                    <param argument="search" name="algorithm" type="select" label="algorithm - " help="">
                         <option value="kmer" selected="true">Kmer (default)</option>
                         <option value="blast">BLAST</option>
                         <option value="suffix">Suffix Tree</option>
                         <option value="distance">Distance</option>
                     </param>
                     <when value="kmer">
-                        <param name="ksize" type="integer" value="8" min="1" label="ksize - kmer length"/>
+                        <param argument="ksize" type="integer" value="8" min="1" label="ksize - kmer length"/>
                     </when>
                     <when value="blast">
-                        <param name="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
-                        <param name="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
-                        <param name="gapopen" type="integer" value="-2" label="gapopen - Pairwise alignment penalty for opening a gap"/>
-                        <param name="gapextend" type="integer" value="-1" label="gapextend - Pairwise alignment penalty for extending a gap"/>
+                        <param argument="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
+                        <param argument="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
+                        <param argument="gapopen" type="integer" value="-2" label="gapopen - Pairwise alignment penalty for opening a gap"/>
+                        <param argument="gapextend" type="integer" value="-1" label="gapextend - Pairwise alignment penalty for extending a gap"/>
                     </when>
                     <when value="suffix"/>
                     <when value="distance"/>
                 </conditional>
             </when>
         </conditional>
-        <param name="count" type="data" format="mothur.count_table" label="count file" optional="true"/>
-        <param name="name" type="data" format="mothur.names" label="names file" optional="true"/>
-        <param name="relabund" type="boolean" falsevalue="false" truevalue="true" checked="false" label="relabund - allows you to indicate that you want the summary files to be relative abundances rather than raw abundances. default=f"/>
+        <param argument="count" type="data" format="mothur.count_table" optional="true" label="count file"/>
+        <param argument="name" type="data" format="mothur.names" optional="true" label="names file"/>
+        <param argument="relabund" type="boolean" falsevalue="false" truevalue="true" checked="false"
+            label="relabund - allows you to indicate that you want the summary files to be relative abundances rather than raw abundances"/>
+        <expand macro="param-output"/>
+        <expand macro="param-printlevel"/>
+        <expand macro="param-savelog"/>
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
@@ -136,14 +142,27 @@
             <param name="template" value="abrecovery.fasta" ftype="fasta"/>
             <param name="source2" value="hist"/>
             <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
-            <output name="tax_summary" md5="d6f02a20cdf415fb84e394d0dab2314f" ftype="mothur.tax.summary"/>
+            <output name="tax_summary" ftype="mothur.tax.summary">
+                <assert_contents>
+                    <expand macro="test-taxsummary-format"/>
+                    <has_text text="Root"/>
+                    <has_text text="Bacteria"/>
+                </assert_contents>
+            </output>
             <output name="taxonomy_out" ftype="mothur.seq.taxonomy">
                 <assert_contents>
                     <has_text text="Bacteria"/>
                     <has_text text="U68589"/>
                 </assert_contents>
             </output>
-            <output name="tree_sum" md5="a6ae5cc82edd181082dd23f348b621d9" ftype="tabular"/>
+            <output name="tree_sum" md5="b44a392a719cf083e5a26d45904926c6" ftype="tabular">
+                <assert_contents>
+                    <has_text text="@WRAPPER_VERSION@"/>
+                    <has_text text="Root"/>
+                    <has_text text="Bacteria"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
         <test><!-- test with knn method -->
@@ -153,8 +172,20 @@
             <param name="source2" value="hist"/>
             <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
             <param name="method" value="knn"/>
-            <output name="tax_summary" md5="4931072238dcf29344f4a1e3332f3415" ftype="mothur.tax.summary"/>
-            <output name="taxonomy_out" md5="1080c7676c1a1f4f429c7d8df6a62f47" ftype="mothur.seq.taxonomy"/>
+            <output name="tax_summary" ftype="mothur.tax.summary">
+                <assert_contents>
+                    <expand macro="test-taxsummary-format"/>
+                    <has_text text="Root"/>
+                    <has_text text="Bacteria"/>
+                </assert_contents>
+            </output>
+            <output name="taxonomy_out" ftype="mothur.seq.taxonomy">
+                <assert_contents>
+                    <has_text text="Bacteria"/>
+                    <has_text text="U68589"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
         <test><!-- test with knn method and blast algorithm -->
@@ -165,13 +196,24 @@
             <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
             <param name="method" value="knn"/>
             <param name="algorithm" value="blast"/>
-            <output name="tax_summary" md5="4d6e1fa3be9abe5f57b0660fe5ae5887" ftype="mothur.tax.summary"/>
-            <output name="taxonomy_out" md5="1296e2a2c8efd58f9c840760bed55042" ftype="mothur.seq.taxonomy"/>
+            <output name="tax_summary" ftype="mothur.tax.summary">
+                <assert_contents>
+                    <expand macro="test-taxsummary-format"/>
+                    <has_text text="Root"/>
+                    <has_text text="Bacteria"/>
+                </assert_contents>
+            </output>
+            <output name="taxonomy_out" ftype="mothur.seq.taxonomy">
+                <assert_contents>
+                    <has_text text="Bacteria"/>
+                    <has_text text="AY457914"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
     </tests>
-    <help>
-<![CDATA[
+    <help><![CDATA[
 
 @MOTHUR_OVERVIEW@
 
@@ -183,7 +225,7 @@
 
 
 v1.22.0: Updated for Mothur 1.33. Added count parameter (1.28), added relabund parameter (1.33), bayesian term changed to wang.
-]]>
-    </help>
+
+    ]]></help>
     <expand macro="citations"/>
 </tool>