diff filter.shared.xml @ 2:644b7baba854 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:11:33 -0400
parents bccb5efbc4ee
children e44c38a17c7a
line wrap: on
line diff
--- a/filter.shared.xml	Tue Sep 05 16:54:33 2017 -0400
+++ b/filter.shared.xml	Tue Mar 20 22:11:33 2018 -0400
@@ -7,50 +7,64 @@
     <expand macro="stdio"/>
     <expand macro="version_command"/>
     <command><![CDATA[
-        @SHELL_OPTIONS@
+@SHELL_OPTIONS@
 
-        ## create symlinks to input datasets
-        ln -s "$otu" otu.dat &&
+## create symlinks to input datasets
+ln -s '$otu' otu.dat &&
 
-        echo 'filter.shared(
-            shared=otu.dat,
-            #if $label:
-                label=${ str($label).replace(",","-") },
-            #end if
-            #if $label:
-                groups=${ str($groups).replace(",","-") },
-            #end if
-            minabund=$minabund,
-            minpercent=$minpercent,
-            rarepercent=$rarepercent,
-            keepties=$keepties,
-            minnumsamples=$minnumsamples,
-            minpercentsamples=$minpercentsamples,
-            mintotal=$mintotal,
-            makerare=$makerare
-        )'
-        | sed 's/ //g'  ## mothur trips over whitespace
-        | mothur
-        | tee mothur.out.log
+echo 'filter.shared(
+    shared=otu.dat,
+    #if $label:
+        label=${ str($label).replace(",","-") },
+    #end if
+    #if $label:
+        groups=${ str($groups).replace(",","-") },
+    #end if
+    minabund=$minabund,
+    minpercent=$minpercent,
+    rarepercent=$rarepercent,
+    keepties=$keepties,
+    minnumsamples=$minnumsamples,
+    minpercentsamples=$minpercentsamples,
+    mintotal=$mintotal,
+    makerare=$makerare
+)'
+| sed 's/ //g'  ## mothur trips over whitespace
+| mothur
+| tee mothur.out.log
     ]]></command>
     <inputs>
-        <param name="otu" type="data" format="mothur.shared" label="shared - specify your shared file"/>
-        <param name="label" type="select" optional="true" multiple="true" label="label - OTU Labels" help="If none selected, all labels will be output">
+        <param name="otu" argument="shared" type="data" format="mothur.shared" label="shared - specify your shared file"/>
+        <param argument="label" type="select" optional="true" multiple="true" label="label - OTU Labels" help="If none selected, all labels will be output">
             <expand macro="labeloptions"/>
         </param>
-        <param name="groups" type="select" optional="true" multiple="true" label="Select groups for to include in this grouping">
+        <param argument="groups" type="select" optional="true" multiple="true" label="Select groups for to include in this grouping">
             <options>
                 <filter type="data_meta" ref="otu" key="groups"/>
             </options>
         </param>
-        <param name="minabund" type="integer" value="0" min="0" label="minabund - indicate the minimum abundance required for each sample in a given OTU" help="If any samples abundance falls below the minimum, the OTU is removed. Default=0"/>
-        <param name="minpercent" type="integer" value="0" min="0" max="100" label="minpercent - indicate the minimum relative abundance of an OTU" help="For example, if the OTUs total abundance across all samples is 8, and the total abundance across all OTUs is 1000, and minpercent=1. The OTU's relative abundance is 0.008, the minimum is 0.01, so the OTU will be removed (Default=0)"/>
-        <param name="rarepercent" type="integer" value="0" min="0" max="100" label="rarepercent - indicate the percentage of otus to remove" help="The OTUs chosen to be removed are the rarest.  For example if you have 1000 OTUs, rarepercent=20 would remove the 200 OTUs with the lowest abundance (Default=0)"/>
-        <param name="keepties" type="boolean" truevalue="true" falsevalue="false" checked="true" label="keepties - indicate you want to keep the OTUs with the same abundance as the first 'not rare' OTU" help="For example if you have 10 OTUs, rarepercent=20 abundances of 20, 18, 15, 15, 10, 5, 3, 3, 3, 1. keepties=t, would remove the 10th OTU, but keep the 9th because its abundance ties the 8th OTU. keepties=f would remove OTUs 9 and 10 (Default=T)"/>
-        <param name="minnumsamples" type="integer" value="0" min="0" label="minnumsamples - indicate the minimum number of samples present in an OTU" help="If the number of samples present falls below the minimum, the OTU is removed (Default=0)"/>
-        <param name="minpercentsamples" type="integer" value="0" min="0" max="100" label="minpercentsamples - indicate the minimum percent of sample present in an OTU" help="For example, if the total number of samples is 10, the number present is 3, and the minpercentsamples=50. The OTU's precent of samples is 0.333, the minimum is 0.50, so the OTU will be removed (Default=0)"/>
-        <param name="mintotal" type="integer" value="0" min="0" max="100" label="mintotal - indicate the minimum abundance required for a given OTU" help="If abundance across all samples falls below the minimum, the OTU is removed (Default=0)"/>
-        <param name="makerare" type="boolean" truevalue="true" falsevalue="false" checked="true" label="makerare - indicate you want the abundances of any removed OTUs to be saved and a new rare OTU created with its abundances equal to the sum of the OTUs removed" help="This will preserve the number of reads in your dataset (Default=T)"/>
+        <param argument="minabund" type="integer" value="0" min="0" label="minabund - indicate the minimum abundance required for each sample in a given OTU"
+            help="If any samples abundance falls below the minimum, the OTU is removed"/>
+        <param argument="minpercent" type="integer" value="0" min="0" max="100" label="minpercent - indicate the minimum relative abundance of an OTU"
+            help="For example, if the OTUs total abundance across all samples is 8, and the total abundance across all OTUs is 1000, and minpercent=1.
+            The OTU's relative abundance is 0.008, the minimum is 0.01, so the OTU will be removed"/>
+        <param argument="rarepercent" type="integer" value="0" min="0" max="100" label="rarepercent - indicate the percentage of otus to remove"
+            help="The OTUs chosen to be removed are the rarest.  For example if you have 1000 OTUs, rarepercent=20 would remove the 200 OTUs with the lowest abundance"/>
+        <param argument="keepties" type="boolean" truevalue="true" falsevalue="false" checked="true"
+            label="keepties - indicate you want to keep the OTUs with the same abundance as the first 'not rare' OTU"
+            help="For example if you have 10 OTUs, rarepercent=20 abundances of 20, 18, 15, 15, 10, 5, 3, 3, 3, 1. keepties=t, would remove the 10th OTU,
+            but keep the 9th because its abundance ties the 8th OTU. keepties=f would remove OTUs 9 and 10"/>
+        <param argument="minnumsamples" type="integer" value="0" min="0" label="minnumsamples - indicate the minimum number of samples present in an OTU"
+            help="If the number of samples present falls below the minimum, the OTU is removed"/>
+        <param argument="minpercentsamples" type="integer" value="0" min="0" max="100" label="minpercentsamples - indicate the minimum percent of sample present in an OTU"
+            help="For example, if the total number of samples is 10, the number present is 3, and the minpercentsamples=50. The OTU's precent of samples is 0.333,
+            the minimum is 0.50, so the OTU will be removed (Default=0)"/>
+        <param argument="mintotal" type="integer" value="0" min="0" max="100" label="mintotal - indicate the minimum abundance required for a given OTU"
+            help="If abundance across all samples falls below the minimum, the OTU is removed"/>
+        <param argument="makerare" type="boolean" truevalue="true" falsevalue="false" checked="true"
+            label="makerare - indicate you want the abundances of any removed OTUs to be saved and a new rare OTU created with its abundances equal to the sum of the OTUs removed"
+            help="This will preserve the number of reads in your dataset"/>
+        <expand macro="param-savelog"/>
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
@@ -60,11 +74,16 @@
     </outputs>
     <tests>
         <test><!-- test with defaults -->
-            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
-            <param name="minabund" value="1"/>
-            <output_collection name="filter_shared" count="36">
-                <element name="0.29" md5="db8387475c126110f2ac21066344c933" ftype="mothur.shared"/>
+            <param name="otu" value="esophagus.fn.shared" ftype="mothur.shared"/>
+            <output_collection name="filter_shared" count="4">
+                <element name="0.03" ftype="mothur.shared">
+                    <assert_contents>
+                        <expand macro="test-shared-format"/>
+                        <has_text text="0.03"/>
+                    </assert_contents>
+                </element>
             </output_collection>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
         <test><!-- test with label and group select -->
@@ -73,13 +92,18 @@
             <param name="groups" value="forest,pasture"/>
             <param name="minabund" value="1"/>
             <output_collection name="filter_shared" count="3">
-                <element name="0.29" md5="db8387475c126110f2ac21066344c933" ftype="mothur.shared"/>
+                <element name="0.29" ftype="mothur.shared">
+                    <assert_contents>
+                        <expand macro="test-shared-format"/>
+                        <has_text text="0.29"/>
+                    </assert_contents>
+                </element>
             </output_collection>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
     </tests>
-    <help>
-<![CDATA[
+    <help><![CDATA[
 
 @MOTHUR_OVERVIEW@
 
@@ -89,8 +113,7 @@
 
 .. _filter.shared: https://www.mothur.org/wiki/Filter.shared
 
-]]>
-    </help>
+    ]]></help>
     <citations>
         <citation type="doi">10.1128/AEM.01541-09</citation>
     </citations>