diff tools/mothur/split.groups.xml @ 0:ee4fee239fe7 draft default tip

planemo upload commit 68a4fd4cc5332c57ac39bef73db224425af0706c-dirty
author sanbi-uwc
date Fri, 03 Jun 2016 09:32:47 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/mothur/split.groups.xml	Fri Jun 03 09:32:47 2016 -0400
@@ -0,0 +1,74 @@
+<tool profile="16.07" id="mothur_split_groups" name="Split.groups" version="@WRAPPER_VERSION@.0">
+    <description>Generates a fasta file for each group</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="version_command"/>
+    <command detect_errors="aggressive"><![CDATA[
+        echo 'split.groups(
+            #if $name:
+                name=$name,
+            #end if
+            #if $groups:
+                groups=${ str($groups).replace(",","-") },
+            #end if
+            #if $count:
+                count=$count,
+            #end if
+            fasta=$fasta,
+            group=$group
+        )'
+        | sed 's/ //g'  ## mothur trips over whitespace
+        | mothur &&
+
+        ## move output files to correct destination
+        prefix="$fasta" &&
+        mv mothur.*.logfile "$logfile" &&
+        mv \${prefix%.dat}*.fasta .
+    ]]></command>
+    <inputs>
+        <param name="fasta" type="data" format="fasta" label="fasta - Fasta to split by group"/>
+        <param name="name" type="data" format="mothur.names" label="name - Names to split by group" optional="true"/>
+        <param name="group" type="data" format="mothur.groups" label="group - Groups"/>
+        <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" multiple="true">
+            <options>
+                <filter type="data_meta" ref="group" key="groups"/>
+            </options>
+        </param>
+        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
+    </inputs>
+    <outputs>
+        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
+        <collection name="groupfastas" type="list" label="${tool.name} on ${on_string}: fasta per group">
+            <!-- TODO: format_source on discovered collection elements doesn't seem to work yet, change to format_source="fasta" once it does -->
+            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.fasta" format="fasta"/>
+        </collection>
+    </outputs>
+    <tests>
+        <test>
+            <param name="fasta" value="amazon.fasta" ftype="fasta"/>
+            <param name="group" value="amazon.groups" ftype="mothur.groups"/>
+            <output_collection name="groupfastas" count="2">
+                <element name="pasture" md5="3844bc02ec09acbbf31845ea6ac6632d" ftype="fasta"/>
+                <element name="forest" md5="f0e662d1d82e96b4977864925493dbf5" ftype="fasta"/>
+            </output_collection>
+            <expand macro="logfile-test"/>
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+
+@MOTHUR_OVERVIEW@
+
+**Command Documenation**
+
+The split.groups_ command reads a fasta file and group_ file and generates a fasta file for each group in the groupfile.  A name_ file can also be split into groups.
+
+.. _group: http://www.mothur.org/wiki/Group_file
+.. _name: http://www.mothur.org/wiki/Name_file
+.. _split.groups: http://www.mothur.org/wiki/Split.groups
+]]>
+    </help>
+    <expand macro="citations"/>
+</tool>