Mercurial > repos > iuc > mothur_remove_rare
diff remove.rare.xml @ 0:5480c7cbde6f draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit a9d1e0debcd357d8080a1c6c5f1d206dd45a7a4d
author | iuc |
---|---|
date | Fri, 19 May 2017 05:11:18 -0400 |
parents | |
children | c90c4b4a0fae |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remove.rare.xml Fri May 19 05:11:18 2017 -0400 @@ -0,0 +1,165 @@ +<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="stdio"/> + <expand macro="version_command"/> + <command><![CDATA[ + @SHELL_OPTIONS@ + + ## create symlinks to input datasets + ln -s "$input.otu" input_otu.dat && + #if $input.source == 'list': + ln -s "$input.group" input.group.dat && + ln -s "$input.count" input.count.dat && + #end if + + echo 'remove.rare( + #if $input.otu.is_of_type("mothur.rabund"): + rabund=input_otu.dat, + #elif $input.otu.is_of_type("mothur.sabund"): + sabund=input_otu.dat, + #elif $input.otu.is_of_type("mothur.list"): + list=input_otu.dat, + #if $input.group: + group=input.group.dat, + #end if + #if $input.groups: + groups=${ str($input.groups).replace(",","-") }, + #end if + #if $input.count: + count=input.count.dat, + #end if + #elif $input.otu.is_of_type("mothur.shared"): + shared=input_otu.dat, + 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 + | tee mothur.out.log + ]]></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> + <expand macro="logfile-output"/> + <data name="pick_otu" format_source="otu" from_work_dir="input_otu*.pick.*" 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" from_work_dir="input.group*.pick.*" 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 Documentation** + +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: https://www.mothur.org/wiki/List_file +.. _sabund: https://www.mothur.org/wiki/Sabund_file +.. _rabund: https://www.mothur.org/wiki/Rabund_file +.. _shared: https://www.mothur.org/wiki/Shared_file +.. _remove.rare: https://www.mothur.org/wiki/Remove.rare + +]]> + </help> + <expand macro="citations"/> +</tool>