Mercurial > repos > sanbi-uwc > mothur_test
view tools/mothur/merge.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 source
<tool profile="16.07" id="mothur_merge_groups" name="Merge.groups" version="@WRAPPER_VERSION@.0"> <description>Merge groups in a shared file</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements"/> <expand macro="version_command"/> <command detect_errors="aggressive"><![CDATA[ echo 'merge.groups( #if $design.source == "hist": design=$design_dataset #else: design=$generated_design #end if #if $otu: ,shared=$otu #end if #if $group: ,group=$group #end if #if $groups: ,groups=${ str($groups).replace(",","-") } #end if #if $label: ,label=${ str($label).replace(",","-") } #end if )' | sed 's/ //g' ## mothur trips over whitespace | mothur && ## move output files to correct destination #if $otu: prefix="$otu" && mv \${prefix%.dat}*.merge.* "$merged_shared" && #end if #if $group: prefix="$group" && mv \${prefix%.dat}*.merge.* "$merged_group" && #end if mv mothur.*.logfile "$logfile" ]]></command> <configfiles> <configfile name="generated_design"><![CDATA[ #if $design.source == 'build': #for $grouping in $design.groupings: #set grp_str = $grouping.groups.__str__ #if grp_str != None and len(grp_str) > 0: #for $grp in grp_str.split(','): $grp $grouping.name #end for #end if #end for #end if ]]></configfile> </configfiles> <inputs> <param name="otu" type="data" format="mothur.shared" optional="true" label="shared - OTU Shared Dataset"/> <param name="label" type="select" label="label - Pick OTU Labels to include" optional="true" multiple="true"> <expand macro="labeloptions"/> </param> <param name="group" type="data" format="mothur.groups" optional="true" label="group - Group Dataset"/> <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true"> <options> <filter type="data_meta" ref="otu" key="groups"/> </options> </param> <conditional name="design"> <param name="source" type="select" label="Grouping Design from" help=""> <option value="hist">Your History</option> <option value="build">Build a grouping design</option> </param> <when value="hist"> <param name="design_dataset" type="data" format="tabular" label="design - assign groups to new grouping" help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character)"/> </when> <when value="build"> <repeat name="groupings" title="Grouping"> <param name="name" type="text" label="Name for a new combined grouping"/> <param name="groups" type="select" multiple="true" label="Select groups for to include in this grouping"> <options> <filter type="data_meta" ref="otu" key="groups"/> </options> </param> </repeat> </when> </conditional> </inputs> <outputs> <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/> <data name="merged_shared" format="mothur.shared" label="${tool.name} on ${on_string}: merge.shared"> <filter>otu</filter> </data> <data name="merged_group" format="mothur.groups" label="${tool.name} on ${on_string}: merge.groups"> <filter>group</filter> </data> </outputs> <tests> <test><!-- test with shared file --> <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> <param name="source" value="hist"/> <param name="design_dataset" value="toymothur.design2"/> <output name="merged_shared" md5="60f9e715c948911a61986bf1d1db7747" ftype="mothur.shared"/> <expand macro="logfile-test"/> </test> <test><!-- test with shared file and label and group select --> <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> <param name="label" value="0.05,0.22,0.38"/> <param name="groups" value="forest,pasture"/> <param name="source" value="hist"/> <param name="design_dataset" value="toymothur.design2"/> <output name="merged_shared" md5="11818d535bf88938dc063afca3f95b23" ftype="mothur.shared"/> <expand macro="logfile-test"/> </test> <test><!-- test with group file --> <param name="group" value="amazon.groups" ftype="mothur.groups"/> <param name="source" value="hist"/> <param name="design_dataset" value="toymothur.design2"/> <output name="merged_group" md5="023ebd0668522e9531da5b061e6e9137" ftype="mothur.groups"/> <expand macro="logfile-test"/> </test> <test><!-- test with design creation --> <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> <param name="source" value="build"/> <repeat name="groupings"> <param name="name" value="tardis"/> <param name="groups" value="forest"/> </repeat> <repeat name="groupings"> <param name="name" value="dalek"/> <param name="groups" value="pasture"/> </repeat> <output name="merged_shared" md5="60f9e715c948911a61986bf1d1db7747" ftype="mothur.shared"/> <expand macro="logfile-test"/> </test> </tests> <help> <![CDATA[ @MOTHUR_OVERVIEW@ **Command Documenation** The merge.groups_ command reads a shared_ file and a design file and merges the groups in the shared file that are in the same grouping in the design file. A design file partitions a list of names into groups. It is a tab-delimited file with 2 columns: name and group, e.g. : ======= ======= duck bird cow mammal pig mammal goose bird cobra reptile ======= ======= The Make_Design tool can construct a design file from a Mothur dataset that contains group names. .. _shared: http://www.mothur.org/wiki/Shared_file .. _merge.groups: http://www.mothur.org/wiki/Merge.groups ]]> </help> <expand macro="citations"/> </tool>