Mercurial > repos > iuc > mothur_get_oturep
view get.oturep.xml @ 0:e6758f2f744b 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:19:22 -0400 |
parents | |
children | 07d536eabf6c |
line wrap: on
line source
<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="stdio"/> <expand macro="version_command"/> <command><![CDATA[ @SHELL_OPTIONS@ ## create symlinks to input datasets ln -s "$otu" otu.dat && #if $method_condition.method_switch == "distance": ln -s "$method_condition.matrix_condition.dist" dist.dat && ln -s "$method_condition.matrix_condition.nameOrCount" nameOrCount.dat && ln -s "$method_condition.fasta" fasta.dat && #if $method_condition.pick.type == "yes": ln -s "$method_condition.pick.group" group.dat && #end if #elif $method_condition.method_switch == "abundance": ln -s "$method_condition.nameOrCount" nameOrCount.dat && #end if echo 'get.oturep( list=otu.dat, #if $sorted: sorted=$sorted, #end if #if $label: label=${ str($label).replace(",","-") }, #end if #if $method_condition.method_switch == "distance": method=distance, #if $method_condition.matrix_condition.matrix_format == "column": column=dist.dat, #if $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.names"): name=nameOrCount.dat, #elif $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.count_table"): count=nameOrCount.dat, #end if #elif $method_condition.matrix_condition.matrix_format == "phylip": phylip=dist.dat, #if $method_condition.matrix_condition.nameOrCount: #if $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.names"): name=nameOrCount.dat, #elif $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.count_table"): count=nameOrCount.dat, #end if #end if #end if #if $method_condition.fasta: fasta=fasta.dat, #end if #if $method_condition.pick.type == "yes": #if $method_condition.pick.group: group=group.dat, #end if #if $method_condition.pick.groups: groups=${ str($method_condition.pick.groups).replace(",","-") }, #end if #end if large=$method_condition.large #elif $method_condition.method_switch == "abundance": method=abundance, #if $method_condition.nameOrCount.is_of_type("mothur.names"): name=nameOrCount.dat #elif $method_condition.nameOrCount.is_of_type("mothur.count_table"): count=nameOrCount.dat #end if #end if )' | sed 's/ //g' ## mothur trips over whitespace | mothur | tee mothur.out.log ]]></command> <inputs> <param name="otu" type="data" format="mothur.list" label="list - OTU List"/> <conditional name="method_condition"> <param name="method_switch" type="select" label="Method to use for the selection of the representative sequences" help="The distance method finds the sequence with the smallest maximum distance to other sequences. The abundance method chooses the most abundant sequence in the OTU as the representative."> <option value="distance" selected="true">distance</option> <option value="abundance">abundance</option> </param> <when value="distance"> <conditional name="matrix_condition"> <param name="matrix_format" type="select" label="Select a Distance Matrix Format" help=""> <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="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/> </when> <when value="phylip"> <param name="dist" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/> <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" optional="true" label="name file or count table - Sequences Name reference"/> </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="large" type="boolean" checked="false" truevalue="true" falsevalue="false" label="large - Distance Matrix is very Large" help="Set this parameter to Yes if your distance matric might not fit in RAM"/> </when> <when value="abundance"> <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/> </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> </inputs> <outputs> <expand macro="logfile-output"/> <collection name="names_out" type="list" label="${tool.name} on ${on_string}: rep.names"> <filter>method_condition['nameOrCount'].ext == "mothur.names"</filter> <filter>method_condition['matrix_condition']['nameOrCount'].ext == "mothur.names"</filter> <discover_datasets pattern=".*?\.(?P<designation>.*)\.rep\.names" format="mothur.names"/> </collection> <collection name="fasta_out" type="list" label="${tool.name} on ${on_string}: rep.fasta"> <filter>method_condition['method_switch'] == "distance"</filter> <filter>method_condition['fasta']</filter> <discover_datasets pattern=".*?\.(?P<designation>.*)\.rep\.fasta" format="fasta"/> </collection> <collection name="count_out" type="list" label="${tool.name} on ${on_string}: rep.count_table"> <filter>method_condition['nameOrCount'].ext == "mothur.count_table"</filter> <filter>method_condition['matrix_condition']['nameOrCount'].ext == "mothur.count_table"</filter> <discover_datasets pattern=".*?\.(?P<designation>.*)\.rep\.count_table" format="mothur.count_table"/> </collection> </outputs> <tests> <!-- test with distance / phylip --> <test> <param name="otu" value="amazon.an.list" ftype="mothur.list"/> <param name="method_switch" value="distance"/> <param name="matrix_format" value="phylip"/> <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/> <param name="nameOrCount" 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 with distance / column / label select --> <test> <param name="otu" value="amazon.an.list" ftype="mothur.list"/> <param name="method_switch" value="distance"/> <param name="matrix_format" value="column"/> <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/> <param name="nameOrCount" 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 with distance / fasta / sorting --> <test> <param name="otu" value="amazon.an.list" ftype="mothur.list"/> <param name="method_switch" value="distance"/> <param name="matrix_format" 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 with distance / group file --> <test> <param name="otu" value="amazon.an.list" ftype="mothur.list"/> <param name="method_switch" value="distance"/> <param name="matrix_format" value="column"/> <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/> <param name="nameOrCount" 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"/> <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 with distance / count table --> <test> <param name="otu" value="amazon.an.list" ftype="mothur.list"/> <param name="method_switch" value="distance"/> <param name="matrix_format" 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="nameOrCount" 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> <!-- test with abundance / count / label --> <!-- It seems that the content of the result file can vary from one execution to another with the same parameters --> <test> <param name="otu" value="amazon.an.list" ftype="mothur.list"/> <param name="method_switch" value="abundance"/> <param name="nameOrCount" value="amazon1.count_table" ftype="mothur.count_table"/> <param name="label" value="0.27,unique"/> <param name="sorted" value="name"/> <output_collection name="count_out" count="2"> <element name="0.27" ftype="mothur.count_table"> <assert_contents> <has_text_matching expression="U68\w+\t36" /> </assert_contents> </element> </output_collection> <expand macro="logfile-test"/> </test> </tests> <help> <![CDATA[ @MOTHUR_OVERVIEW@ **Command Documentation** 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: https://www.mothur.org/wiki/Get.oturep v1.23.0: Updated to Mothur 1.33, added count and method parameter ]]> </help> <expand macro="citations"/> </tool>