diff get.oturep.xml @ 0:d568050a95be draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 180a403421967d36f995941b1a4561349d75cfc5
author iuc
date Fri, 24 Jun 2016 16:33:26 -0400
parents
children 17b63c3cc04d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/get.oturep.xml	Fri Jun 24 16:33:26 2016 -0400
@@ -0,0 +1,200 @@
+<tool profile="16.07" id="mothur_get_oturep" name="Get.oturep" version="@WRAPPER_VERSION@.0">
+    <description>Generate a fasta with a representative sequence for each OTU</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="version_command"/>
+    <command detect_errors="aggressive"><![CDATA[
+        ## create symlinks to input datasets
+        ln -s "$otu" otu.dat &&
+        ln -s "$fasta" fasta.dat &&
+        ln -s "$input.dist" input.dist.dat &&
+        ln -s "$input.name" input.name.dat &&
+        ln -s "$count" count.dat &&
+        #if $pick.type == "yes":
+            ln -s "$pick.group" pick.group.dat &&
+        #end if
+
+        echo 'get.oturep(
+            list=otu.dat,
+            #if $fasta:
+                fasta=fasta.dat,
+            #end if
+            #if $input.source == "column":
+                column=input.dist.dat,
+                name=input.name.dat,
+            #elif $input.source == "phylip":
+                phylip=input.dist.dat,
+                #if $input.name:
+                    name=input.name.dat,
+                #end if
+            #end if
+            #if $label:
+                label=${ str($label).replace(",","-") },
+            #end if
+            #if $pick.type == "yes":
+                #if $pick.group:
+                    group=pick.group.dat,
+                #end if
+                #if $pick.groups:
+                    groups=${ str($pick.groups).replace(",","-") },
+                #end if
+            #end if
+            #if $sorted:
+                sorted=$sorted,
+            #end if
+            #if $count and not $input.name:
+                count=count.dat,
+            #end if
+            method=$method,
+            large=$large
+        )'
+        | sed 's/ //g'  ## mothur trips over whitespace
+        | mothur
+    ]]></command>
+    <inputs>
+        <param name="otu" type="data" format="mothur.list" label="list - OTU List"/>
+        <conditional name="input">
+            <param name="source" type="select" label="Distance Matrix Format">
+                <option value="column">Pairwise Column Distance Matrix</option>
+                <option value="phylip">Phylip Distance Matrix</option>
+            </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"/>
+            </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 - Names"/>
+            </when>
+        </conditional>
+        <param name="fasta" type="data" format="fasta" optional="true" label="fasta - Fasta"/>
+        <conditional name="pick">
+            <param name="type" type="select" label="Parse a group file into abundant and rare groups?" help="">
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no"/>
+            <when value="yes">
+                <param name="group" type="data" format="mothur.groups" label="group - Group file for the OTU List"/>
+                <param name="groups" type="select"  multiple="true" label="groups - Group Selection (all used if none are selected)">
+                    <options>
+                        <filter type="data_meta" ref="group" key="groups"/>
+                    </options>
+                </param>
+            </when>
+        </conditional>
+        <param name="label" type="select" multiple="true" label="label - OTU Labels">
+            <expand macro="labeloptions"/>
+        </param>
+        <param name="sorted" type="select" label="sorted - Sort Sequences by">
+            <option value="">Don't sort</option>
+            <option value="name">Sequence Name</option>
+            <option value="number">Bin Number</option>
+            <option value="size">Bin Size</option>
+            <option value="group">Group</option>
+        </param>
+        <param name="large" type="boolean" checked="false" truevalue="true" falsevalue="false" label="large - Distance Matrix is very Large"/>
+        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count table" help="Cannot supply both a names and count table. Will be ignored if you also supplied a name file. Generated by count.seqs"/>
+        <param name="method" type="select" label="method - select the method of selecting the representative sequence" help="the distance method finds the sequence with the smallest maximum distance to other sequences. The abundance method chooses the abundant sequence in the OTU as the representative. Default=distance">
+            <option value="distance" selected="true">distance</option>
+            <option value="abundance">abundance</option>
+        </param>
+    </inputs>
+    <outputs>
+        <expand macro="logfile-output"/>
+        <collection name="names_out" type="list" label="${tool.name} on ${on_string}: rep.names">
+            <filter>input['name'] or not count</filter>
+            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.names" format="mothur.names"/>
+        </collection>
+        <collection name="fasta_out" type="list" label="${tool.name} on ${on_string}: rep.fasta">
+            <filter>fasta</filter>
+            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.fasta" format="fasta"/>
+        </collection>
+        <collection name="count_out" type="list" label="${tool.name} on ${on_string}: rep.count_table">
+            <filter>count and not input['name']</filter>
+            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.count_table" format="mothur.count_table"/>
+        </collection>
+    </outputs>
+    <tests>
+        <test><!-- test with phylip -->
+            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
+            <param name="source" value="phylip"/>
+            <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
+            <param name="name" value="amazon1.names" ftype="mothur.names"/>
+            <output_collection name="names_out" count="36">
+                <element name="0.27" md5="39ff2858909d49633871d5a625585de5" ftype="mothur.names"/>
+            </output_collection>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with column and label select -->
+            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
+            <param name="source" value="column"/>
+            <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
+            <param name="name" value="amazon1.names" ftype="mothur.names"/>
+            <param name="label" value="unique,0.05,0.27,0.45"/>
+            <output_collection name="names_out" count="4">
+                <element name="0.27" md5="be6dccdd3d4619c3ac465246c826209a" ftype="mothur.names"/>
+            </output_collection>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with fasta and sorting-->
+            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
+            <param name="source" value="phylip"/>
+            <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
+            <param name="fasta" value="amazon.fasta" ftype="fasta"/>
+            <param name="label" value="0.05,0.27"/>
+            <param name="sorted" value="name"/>
+            <output_collection name="names_out" count="2">
+                <element name="0.27" md5="39ff2858909d49633871d5a625585de5" ftype="mothur.names"/>
+            </output_collection>
+            <output_collection name="fasta_out" count="2">
+                <element name="0.27" md5="a9d9622b6f5fcbe8acdc05df5484ffc4" ftype="fasta"/>
+            </output_collection>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with group file -->
+            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
+            <param name="source" value="column"/>
+            <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
+            <param name="name" value="amazon1.names" ftype="mothur.names"/>
+            <param name="label" value="unique,0.05,0.27,0.45"/>
+            <param name="type" value="yes"/>
+            <param name="group" value="amazon.groups" ftype="mothur.groups"/>
+            <param name="groups" value="forest,pasture"/>
+            <param name="count" value="amazon1.count_table" ftype="mothur.count_table"/> <!-- should be ignored as we also supplied name file -->
+            <output_collection name="names_out" count="8">
+                <element name="0.27.pasture" md5="34f87d93fd9ebbefed9754f627f502fd" ftype="mothur.names"/>
+            </output_collection>
+            <expand macro="logfile-test"/>
+        </test>
+        <test><!-- test with count table -->
+            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
+            <param name="source" value="phylip"/>
+            <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
+            <param name="label" value="unique,0.05,0.27"/>
+            <param name="count" value="amazon1.count_table" ftype="mothur.count_table"/>
+            <output_collection name="count_out" count="3">
+                <element name="0.27" md5="6b1afd712825af4bf8cb4ab8304df903" ftype="mothur.count_table"/>
+            </output_collection>
+            <expand macro="logfile-test"/>
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+
+@MOTHUR_OVERVIEW@
+
+
+**Command Documenation**
+
+The get.oturep_ command generates a fasta-formatted sequence file containing only a representative sequence for each OTU.  The opposite of the bin.seqs command.
+
+.. _get.oturep: http://www.mothur.org/wiki/Get.oturep
+
+v1.23.0: Updated to Mothur 1.33, added count and method parameter
+]]>
+    </help>
+    <expand macro="citations"/>
+</tool>