Mercurial > repos > sanbi-uwc > mothur_test
diff tools/mothur/remove.rare.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/remove.rare.xml Fri Jun 03 09:32:47 2016 -0400 @@ -0,0 +1,167 @@ +<tool profile="16.07" id="mothur_remove_rare" name="Remove.rare" version="@WRAPPER_VERSION@.0"> + <description>Remove rare OTUs</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="version_command"/> + <command detect_errors="aggressive"><![CDATA[ + echo 'remove.rare( + #if $input.otu.is_of_type("mothur.rabund"): + rabund=$input.otu, + #elif $input.otu.is_of_type("mothur.sabund"): + sabund=$input.otu, + #elif $input.otu.is_of_type("mothur.list"): + list=$input.otu, + #if $input.group: + group=$input.group, + #end if + #if $input.groups: + groups=${ str($input.groups).replace(",","-") }, + #end if + #if $input.count: + count=$input.count, + #end if + #elif $input.otu.is_of_type("mothur.shared"): + shared=$input.otu, + bygroup=$input.bygroup, + #if $input.groups: + groups=${ str($input.groups).replace(",","-") }, + #end if + #end if + #if $input.label: + label=${ str($input.label).replace(",","-") }, + #end if + nseqs=$nseqs + )' + | sed 's/ //g' ## mothur trips over whitespace + | mothur && + + ## move output files to correct destination + prefix="$input.otu" && + #if $input.source == 'list' and $input.group: + prefix2="$input.group" && + mv \${prefix2%.dat}*.pick.* "$pick_group" && + #end if + #if $input.source == 'shared': + mv \${prefix%.dat}*.pick.* . && + #else + mv \${prefix%.dat}*.pick.* "$pick_otu" && + #end if + mv mothur.*.logfile "$logfile" + ]]></command> + <inputs> + <conditional name="input"> + <param name="source" type="select" label="Select Input Format"> + <option value="shared">shared</option> + <option value="list">list</option> + <option value="default">rabund or sabund</option> + </param> + <when value="shared"> + <param name="otu" type="data" format="mothur.shared" label="shared - Otu dataset"/> + <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" multiple="true"> + <options> + <filter type="data_meta" ref="otu" key="groups"/> + </options> + </param> + <param name="bygroup" type="boolean" truevalue="true" falsevalue="false" checked="false" label="bygroup - Remove any OTU that has nseqs or fewer sequences across all groups"/> + <param name="label" type="select" multiple="true" optional="true" label="label - OTU Labels"> + <expand macro="labeloptions"/> + </param> + </when> + <when value="list"> + <param name="otu" type="data" format="mothur.list" label="list - Otu dataset"/> + <param name="group" type="data" optional="true" format="mothur.groups" label="group - Groups"/> + <param name="count" type="data" format="count_table" optional="true" label="count - Count Table" help="If you clustered with a count file, can only supply one of group or count table, not both"/> + <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="label" type="select" multiple="false" optional="true" label="label - OTU Labels"> + <expand macro="labeloptions"/> + </param> + </when> + <when value="default"> + <param name="otu" type="data" format="mothur.list,mothur.rabund,mothur.sabund" label="list,rabund,sabund - Otu dataset"/> + <param name="label" type="select" multiple="true" optional="true" label="label - OTU Labels"> + <expand macro="labeloptions"/> + </param> + </when> + </conditional> + <param name="nseqs" type="integer" value="1" min="0" label="nseqs - Number of sequences cutoff for an otu to be deemed rare"/> + </inputs> + <outputs> + <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/> + <data name="pick_otu" format_source="otu" label="${tool.name} on ${on_string}: pick.${input.otu.ext}"> + <filter>input['source'] != 'shared'</filter> + </data> + <collection name="pick_shared" type="list" label="${tool.name} on ${on_string}: pick.shared per label"> + <filter>input['source'] == 'shared'</filter> + <discover_datasets pattern=".*?\.(?P<designation>.*)\.pick\.dat" format="mothur.shared"/> + </collection> + <data name="pick_group" format="mothur.groups" label="${tool.name} on ${on_string}: pick.groups"> + <filter>input['source'] == 'list'</filter> + </data> + </outputs> + <tests> + <test><!-- test with list --> + <param name="source" value="list"/> + <param name="otu" value="amazon.an.list" ftype="mothur.list"/> + <output name="pick_otu" md5="4779791c9b0ef95a54083ee1a6ad6c8d" ftype="mothur.list"/> + <expand macro="logfile-test"/> + </test> + <test><!-- test with list and group file --> + <param name="source" value="list"/> + <param name="otu" value="amazon.an.list" ftype="mothur.list"/> + <param name="group" value="amazon.groups" ftype="mothur.groups"/> + <param name="groups" value="forest,pasture"/> + <output name="pick_otu" md5="4779791c9b0ef95a54083ee1a6ad6c8d" ftype="mothur.list"/> + <output name="pick_group" md5="9561ba470c769670ab6d92563a44027f" ftype="mothur.groups"/> + <expand macro="logfile-test"/> + </test> + <test><!-- test with shared file --> + <param name="source" value="shared"/> + <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> + <output_collection name="pick_shared" count="36"> + <element name="0.38" md5="e58da633dd16f0cb6472d6c6b3318c9f" ftype="mothur.shared"/> + </output_collection> + <expand macro="logfile-test"/> + </test> + <test><!-- test with shared file and label/group select --> + <param name="source" value="shared"/> + <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> + <param name="bygroup" value="true"/> + <param name="label" value="0.05,0.22,0.41"/> + <param name="groups" value="forest,pasture"/> + <output_collection name="pick_shared" count="3"> + <element name="0.22" md5="46d97e6f97e7909d72d09a1726655539" ftype="mothur.shared"/> + </output_collection> + <expand macro="logfile-test"/> + </test> + <test><!-- test with rabund/sabund file --> + <param name="source" value="default"/> + <param name="otu" value="amazon.an.sabund" ftype="mothur.sabund"/> + <output name="pick_otu" md5="ca842ed3ef543d3dd76fd9089cd87c46" ftype="mothur.sabund"/> + <expand macro="logfile-test"/> + </test> + </tests> + <help> +<![CDATA[ + +@MOTHUR_OVERVIEW@ + +**Command Documenation** + +The remove.rare_ command reads one of the following file types: list_, rabund_, sabund_ or shared_ file. It outputs a new file after removing the rare otus. + +.. _list: http://www.mothur.org/wiki/List_file +.. _sabund: http://www.mothur.org/wiki/Sabund_file +.. _rabund: http://www.mothur.org/wiki/Rabund_file +.. _shared: http://www.mothur.org/wiki/Shared_file +.. _remove.rare: http://www.mothur.org/wiki/Remove.rare + +]]> + </help> + <expand macro="citations"/> +</tool>
