diff cluster.split.xml @ 1:bfd4e6980f44 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit ea40e3d84e7850eb4226d6c85f709dcad18d4ba9
author iuc
date Thu, 18 May 2017 18:50:45 -0400
parents e56e12d98ac4
children 063229a11154
line wrap: on
line diff
--- a/cluster.split.xml	Fri Jun 24 16:26:26 2016 -0400
+++ b/cluster.split.xml	Thu May 18 18:50:45 2017 -0400
@@ -4,20 +4,22 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements"/>
+    <expand macro="stdio"/>
     <expand macro="version_command"/>
-    <command detect_errors="aggressive"><![CDATA[
+    <command><![CDATA[
+        @SHELL_OPTIONS@
+
         ## create symlinks to input datasets
-        ln -s "$count" count.dat &&
         #if $splitby.splitmethod == "distance":
             ln -s "$splitby.matrix.dist" splitby.matrix.dist.dat &&
-            ln -s "$splitby.matrix.name" splitby.matrix.name.dat &&
+            ln -s "$splitby.matrix.nameOrCount" splitby.matrix.nameOrCount.dat &&
         #elif $splitby.splitmethod == "classify":
             ln -s "$splitby.dist" splitby.dist.dat &&
-            ln -s "$splitby.name" splitby.name.dat &&
+            ln -s "$splitby.nameOrCount" splitby.nameOrCount.dat &&
             ln -s "$splitby.taxonomy" splitby.taxonomy.dat &&
         #elif $splitby.splitmethod == "fasta":
             ln -s "$splitby.fasta" splitby.fasta.dat &&
-            ln -s "$splitby.name" splitby.name.dat &&
+            ln -s "$splitby.nameOrCount" splitby.nameOrCount.dat &&
             ln -s "$splitby.taxonomy" splitby.taxonomy.dat &&
         #end if
 
@@ -26,32 +28,45 @@
             #if $splitby.splitmethod == "distance":
                 #if $splitby.matrix.format == "column":
                     column=splitby.matrix.dist.dat,
-                    name=splitby.matrix.name.dat,
+                    #if $splitby.matrix.nameOrCount.is_of_type("mothur.names"):
+                        name=splitby.matrix.nameOrCount.dat,
+                    #elif $splitby.matrix.nameOrCount.is_of_type("mothur.count_table"):
+                        count=splitby.matrix.nameOrCount.dat,
+                    #end if
                 #elif $splitby.matrix.format == "phylip":
                     phylip=splitby.matrix.dist.dat,
-                    #if $splitby.matrix.name:
-                        name=splitby.matrix.name.dat,
+                    #if $splitby.matrix.nameOrCount:
+                        #if $splitby.matrix.nameOrCount.is_of_type("mothur.names"):
+                            name=splitby.matrix.nameOrCount.dat,
+                        #elif $splitby.matrix.nameOrCount.is_of_type("mothur.count_table"):
+                            count=splitby.matrix.nameOrCount.dat,
+                        #end if
                     #end if
                 #end if
             #elif $splitby.splitmethod == "classify":
                 column=splitby.dist.dat,
-                name=splitby.name.dat,
                 taxonomy=splitby.taxonomy.dat,
-                #if $splitby.taxlevel > 1:
+                #if $splitby.nameOrCount.is_of_type("mothur.names"):
+                    name=splitby.nameOrCount.dat,
+                #elif $splitby.nameOrCount.is_of_type("mothur.count_table"):
+                    count=splitby.nameOrCount.dat,
+                #end if
+                #if $splitby.taxlevel:
                     taxlevel=$splitby.taxlevel,
                 #end if
             #elif $splitby.splitmethod == "fasta":
                 fasta=splitby.fasta.dat,
-                name=splitby.name.dat,
                 taxonomy=splitby.taxonomy.dat,
-                #if $splitby.taxlevel > 1:
+                #if $splitby.nameOrCount.is_of_type("mothur.names"):
+                    name=splitby.nameOrCount.dat,
+                #elif $splitby.nameOrCount.is_of_type("mothur.count_table"):
+                    count=splitby.nameOrCount.dat,
+                #end if
+                #if $splitby.taxlevel:
                     taxlevel=$splitby.taxlevel,
                 #end if
                 classic=$splitby.classic,
             #end if
-            #if $count:
-                count=count.dat,
-            #end if
             #if $method:
                 method=$method,
             #end if
@@ -68,6 +83,7 @@
         )'
         | sed 's/ //g'  ## mothur trips over whitespace
         | mothur
+        | tee mothur.out.log
     ]]></command>
     <inputs>
         <conditional name="splitby">
@@ -84,29 +100,28 @@
                     </param>
                     <when value="column">
                         <param name="dist" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/>
-                        <param name="name" type="data" format="mothur.names" label="name - Sequences Name reference"/>
+                        <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/>
                     </when>
                     <when value="phylip">
-                        <param name="dist" type="data" format="mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
-                        <param name="name" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
+                        <param name="dist" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
+                        <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" optional="true" label="name file or count table - Sequences Name reference"/>
                     </when>
                 </conditional>
             </when>
             <when value="classify">
                 <param name="dist" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/>
-                <param name="name" type="data" format="mothur.names" label="name - Sequences Name reference"/>
                 <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy (from Classify.seqs)"/>
-                <param name="taxlevel" type="integer" value="1" label="taxlevel - taxonomy level for split (default=1)" help="taxonomy level you want to use to split the distance file, default=1, meaning use the first taxon in each list"/>
+                <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/>
+                <param name="taxlevel" type="integer" value="1" min="1" label="taxlevel - taxonomy level for split (default=1)" help="taxonomy level you want to use to split the distance file, default=1, meaning use the first taxon in each list"/>
             </when>
             <when value="fasta">
-                <param name="fasta" type="data" format="mothur.align" label="fasta - Aligned Sequences" help="must be aligned sequences (mothur.align)"/>
-                <param name="name" type="data" format="mothur.names" label="name - Sequences Name reference"/>
+                <param name="fasta" type="data" format="mothur.align,fasta" label="fasta - Aligned Sequences" help="must be aligned sequences (mothur.align)"/>
                 <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy (from Classify.seqs)"/>
-                <param name="taxlevel" type="integer" value="3" label="taxlevel - taxonomy level for split (default=3)" help="taxonomy level you want to use to split the distance file, default=1, meaning use the first taxon in each list"/>
+                <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/>
+                <param name="taxlevel" type="integer" value="3" min="1" label="taxlevel - taxonomy level for split (default=3)" help="taxonomy level you want to use to split the distance file, default=1, meaning use the first taxon in each list"/>
                 <param name="classic" type="boolean" checked="false" truevalue="true" falsevalue="false" label="classic - Use cluster.classic"/>
             </when>
         </conditional>
-        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
         <param name="method" type="select" label="method - Select a Clustering Method" help="">
             <option value="furthest">Furthest neighbor</option>
             <option value="nearest">Nearest neighbor</option>
@@ -127,8 +142,14 @@
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
-        <data name="rabund" format="mothur.rabund" from_work_dir="splitby.*.rabund" label="${tool.name} on ${on_string}: rabund (Rank Abundance)"/>
-        <data name="sabund" format="mothur.sabund" from_work_dir="splitby.*.sabund" label="${tool.name} on ${on_string}: sabund (Species Abundance)"/>
+        <data name="rabund" format="mothur.rabund" from_work_dir="splitby.*.rabund" label="${tool.name} on ${on_string}: rabund (Rank Abundance)">
+             <filter>splitby['nameOrCount'].ext != "mothur.count_table"</filter>
+             <filter>splitby['matrix']['nameOrCount'].ext != "mothur.count_table"</filter>
+        </data>
+        <data name="sabund" format="mothur.sabund" from_work_dir="splitby.*.sabund" label="${tool.name} on ${on_string}: sabund (Species Abundance)">
+             <filter>splitby['nameOrCount'].ext != "mothur.count_table"</filter>
+             <filter>splitby['matrix']['nameOrCount'].ext != "mothur.count_table"</filter>
+        </data>
         <data name="otulist" format="mothur.list" from_work_dir="splitby.*.list" label="${tool.name} on ${on_string}: list (OTU List)"/>
         <collection name="splitdist" type="list" label="${tool.name} on ${on_string}: split dist">
             <filter>not cluster</filter>
@@ -173,21 +194,30 @@
             </output_collection>
             <expand macro="logfile-test"/>
         </test>
-        <test><!-- test with classify method -->
+        <test><!-- test with classify method (mothur.names input file) -->
             <param name="splitmethod" value="classify"/>
             <param name="format" value="column"/>
             <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
-            <param name="name" value="amazon.names" ftype="mothur.names"/>
+            <param name="nameOrCount" value="amazon.names" ftype="mothur.names"/>
             <param name="taxonomy" value="amazon.wang.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
             <output name="otulist" md5="d6eba624ad79759c530b9bc3285a1361" ftype="mothur.list"/>
             <output name="rabund" md5="2a165e1e40644fccb8cc9f53d8915bc3" ftype="mothur.rabund"/>
             <output name="sabund" md5="7aad8a9ca0eade414d6eba1f8bef960f" ftype="mothur.sabund"/>
             <expand macro="logfile-test"/>
         </test>
+        <test><!-- test with classify method (mothur.count_table input file) -->
+            <param name="splitmethod" value="classify"/>
+            <param name="format" value="column"/>
+            <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
+            <param name="nameOrCount" value="amazon.count_table" ftype="mothur.count_table"/>
+            <param name="taxonomy" value="amazon.wang.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
+            <output name="otulist" md5="c5c28330434d3e773221f635d04d6af9" ftype="mothur.list"/>
+            <expand macro="logfile-test"/>
+        </test>
         <test><!-- test with fasta -->
             <param name="splitmethod" value="fasta"/>
             <param name="fasta" value="amazon.align_head" ftype="mothur.align"/>
-            <param name="name" value="amazon.align_head.names" ftype="mothur.names"/>
+            <param name="nameOrCount" value="amazon.align_head.names" ftype="mothur.names"/>
             <param name="taxonomy" value="amazon.align_head.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
             <param name="cutoff" value="9999"/>
             <output name="otulist" md5="a1279248cf2bc1094e0046b2cff1b785" ftype="mothur.list"/>
@@ -202,11 +232,11 @@
 @MOTHUR_OVERVIEW@
 
 
-**Command Documenation**
+**Command Documentation**
 
 The cluster.split_ command assign sequences to OTUs (Operational Taxonomy Unit).
 
-.. _cluster.split: http://www.mothur.org/wiki/Cluster.split
+.. _cluster.split: https://www.mothur.org/wiki/Cluster.split
 
 v1.28.0: Upgraded to Mothur 1.33, introduced cluster boolean.