diff remove.groups.xml @ 2:75433aae83fb 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:03:44 -0400
parents e7a69b6134c5
children
line wrap: on
line diff
--- a/remove.groups.xml	Tue Sep 05 17:14:30 2017 -0400
+++ b/remove.groups.xml	Tue Mar 20 22:03:44 2018 -0400
@@ -7,52 +7,60 @@
     <expand macro="stdio"/>
     <expand macro="version_command"/>
     <command><![CDATA[
-        @SHELL_OPTIONS@
+@SHELL_OPTIONS@
 
-        ## create symlinks to input datasets
-        #if $groupnames.source == "other":
-            ln -s "$groupnames.group_in" groupnames_group_in.dat &&
-            ln -s "$groupnames.fasta_in" groupnames_fasta_in.dat &&
-            ln -s "$groupnames.name_in" groupnames_name_in.dat &&
-            ln -s "$groupnames.list_in" groupnames_list_in.dat &&
-            ln -s "$groupnames.taxonomy_in" groupnames_taxonomy_in.dat &&
-        #else
-            ln -s "$groupnames.shared_in" groupnames_shared_in.dat &&
-        #end if
+## create symlinks to input datasets
+#if $groupnames.source == "other":
+    ln -s '$groupnames.group_in' groupnames_group_in.dat &&
+    ln -s '$groupnames.fasta_in' groupnames_fasta_in.dat &&
+    ln -s '$groupnames.name_in' groupnames_name_in.dat &&
+    ln -s '$groupnames.list_in' groupnames_list_in.dat &&
+    ln -s '$groupnames.taxonomy_in' groupnames_taxonomy_in.dat &&
+    ln -s '$groupnames.column_in' groupnames_column_in.dat &&
+    ln -s '$groupnames.phylip_in' groupnames_phylip_in.dat &&
+#else
+    ln -s '$groupnames.shared_in' groupnames_shared_in.dat &&
+#end if
 
-        echo 'remove.groups(
-            #if $groupnames.source == "other":
-                #if $group_in.is_of_type("mothur.groups"):
-                    group=groupnames_group_in.dat
-                #else
-                    count=groupnames_group_in.dat
-                #end if
-                #if $groupnames.fasta_in:
-                    ,fasta=groupnames_fasta_in.dat
-                #end if
-                #if $groupnames.name_in:
-                    ,name=groupnames_name_in.dat
-                #end if
-                #if $groupnames.list_in:
-                    ,list=groupnames_list_in.dat
-                #end if
-                #if $groupnames.taxonomy_in:
-                    ,taxonomy=groupnames_taxonomy_in.dat
-                #end if
-            #else
-                shared=groupnames_shared_in.dat
-            #end if
-            ,groups=${ str($groupnames.groups).replace(",","-") }
-        )'
-        | sed 's/ //g'  ## mothur trips over whitespace
-        | mothur
-        | tee mothur.out.log
+echo 'remove.groups(
+    #if $groupnames.source == "other":
+        #if $group_in.is_of_type("mothur.groups"):
+            group=groupnames_group_in.dat
+        #else
+            count=groupnames_group_in.dat
+        #end if
+        #if $groupnames.fasta_in:
+            ,fasta=groupnames_fasta_in.dat
+        #end if
+        #if $groupnames.name_in:
+            ,name=groupnames_name_in.dat
+        #end if
+        #if $groupnames.list_in:
+            ,list=groupnames_list_in.dat
+        #end if
+        #if $groupnames.taxonomy_in:
+            ,taxonomy=groupnames_taxonomy_in.dat
+        #end if
+        #if $column_in:
+            ,column=groupnames_column_in.dat
+        #end if
+        #if $phylip_in:
+            ,phylip=groupnames_phylip_in.dat
+        #end if
+    #else
+        shared=groupnames_shared_in.dat
+    #end if
+    ,groups=${ str($groupnames.groups).replace(",","-") }
+)'
+| sed 's/ //g'  ## mothur trips over whitespace
+| mothur
+| tee mothur.out.log
     ]]></command>
     <inputs>
         <conditional name="groupnames">
             <param name="source" type="select" label="Select Input Type">
                 <option value="shared">shared file</option>
-                <option value="other">fasta, name, taxonomy, or list with a group file or count table</option>
+                <option value="other">fasta, name, taxonomy, distance matrix or list with a group file or count table</option>
             </param>
             <when value="other">
                 <param name="group_in" type="data" format="mothur.groups,mothur.count_table" label="group or count table - Groups"/>
@@ -65,6 +73,10 @@
                 <param name="name_in" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
                 <param name="list_in" type="data" format="mothur.list" optional="true" label="list - OTU List"/>
                 <param name="taxonomy_in" type="data" format="mothur.seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+                <param name="phylip_in" type="data" format="mothur.lower.dist,mothur.square.dist" optional="true" label="phylip - Distance Matrix you would like to select distances from"
+                    help="must be a phylip-formatted distance matrix"/>
+                <param name="column_in" type="data" format="mothur.pair.dist" optional="true" label="column - Distance Matrix you would like to select distances from"
+                    help="must be a column-formatted distance matrix"/>
             </when>
             <when value="shared">
                 <param name="shared_in" type="data" format="mothur.shared" optional="true" label="shared - OTU Shared"/>
@@ -75,6 +87,7 @@
                 </param>
             </when>
         </conditional>
+        <expand macro="param-savelog"/>
     </inputs>
     <outputs>
         <expand macro="logfile-output"/>
@@ -101,6 +114,12 @@
             <filter>groupnames['source'] == 'shared'</filter>
             <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.pick\.dat" format="mothur.shared"/>
         </collection>
+        <data name="phylip_out" format_source="phylip_in" from_work_dir="groupnames_phylip_in*.pick.*" label="${tool.name} on ${on_string}: pick.phylip">
+            <filter>groupnames['phylip_in']</filter>
+        </data>
+        <data name="column_out" format="mothur.pair.dist" from_work_dir="groupnames_column_in*.pick.*" label="${tool.name} on ${on_string}: pick.column">
+            <filter>groupnames['column_in']</filter>
+        </data>
     </outputs>
     <tests>
         <test><!-- test with shared file -->
@@ -110,6 +129,7 @@
             <output_collection name="shared_out" count="36">
                 <element name="0.26" md5="c5043237225f0292ce1bfbd2766b96ea" ftype="mothur.shared"/>
             </output_collection>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
         <test><!-- test with group file and fasta/names/list/taxonomy files -->
@@ -125,8 +145,30 @@
             <output name="group_out" md5="6d689ead98f3eb1af41f1a78386d0b50" ftype="mothur.groups"/>
             <output name="name_out" md5="55dbcadbb414d95bae8a282a93c10e63" ftype="mothur.names"/>
             <output_collection name="list_out" count="36">
-                <element name="0.26" md5="71282909924de5f43452f1a5dbf623e8" ftype="mothur.list"/>
+                <element name="0.26" md5="3a92ef76cfdca6618b4016f14cbac5b8" ftype="mothur.list"/>
             </output_collection>
+            <param name="savelog" value="true"/>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with distance matrices -->
+            <param name="source" value="other"/>
+            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
+            <param name="column_in" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
+            <param name="phylip_in" value="amazon.dist" ftype="mothur.square.dist"/>
+            <param name="groups" value="pasture"/>
+            <output name="column_out" ftype="mothur.pair.dist">
+                <assert_contents>
+                    <expand macro="test-column-format"/>
+                    <has_text text="U68589"/>
+                </assert_contents>
+            </output>
+            <output name="phylip_out" ftype="mothur.square.dist">
+                <assert_contents>
+                    <expand macro="test-dist-format"/>
+                    <has_text text="U68589"/>
+                </assert_contents>
+            </output>
+            <param name="savelog" value="true"/>
             <expand macro="logfile-test"/>
         </test>
     </tests>
@@ -144,7 +186,6 @@
 .. _taxonomy: https://www.mothur.org/wiki/Taxonomy_outline
 .. _remove.groups: https://www.mothur.org/wiki/Remove.groups
 
-]]>
-    </help>
+    ]]></help>
     <expand macro="citations"/>
 </tool>