Mercurial > repos > iuc > mothur_merge_groups
comparison merge.groups.xml @ 0:ed5f1b592d84 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:41:05 -0400 |
| parents | |
| children | 8e771931d548 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:ed5f1b592d84 |
|---|---|
| 1 <tool profile="16.07" id="mothur_merge_groups" name="Merge.groups" version="@WRAPPER_VERSION@.0"> | |
| 2 <description>Merge groups in a shared file</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="version_command"/> | |
| 8 <command detect_errors="aggressive"><![CDATA[ | |
| 9 ## create symlinks to input datasets | |
| 10 ln -s "$otu" otu.dat && | |
| 11 ln -s "$group" group.dat && | |
| 12 #if $design.source == "hist": | |
| 13 ln -s "$design.design_dataset" design_dataset.dat && | |
| 14 #else: | |
| 15 ln -s "$generated_design" generated_design.dat && | |
| 16 #end if | |
| 17 | |
| 18 echo 'merge.groups( | |
| 19 #if $design.source == "hist": | |
| 20 design=design_dataset.dat | |
| 21 #else: | |
| 22 design=generated_design.dat | |
| 23 #end if | |
| 24 #if $otu: | |
| 25 ,shared=otu.dat | |
| 26 #end if | |
| 27 #if $group: | |
| 28 ,group=group.dat | |
| 29 #end if | |
| 30 #if $groups: | |
| 31 ,groups=${ str($groups).replace(",","-") } | |
| 32 #end if | |
| 33 #if $label: | |
| 34 ,label=${ str($label).replace(",","-") } | |
| 35 #end if | |
| 36 )' | |
| 37 | sed 's/ //g' ## mothur trips over whitespace | |
| 38 | mothur | |
| 39 ]]></command> | |
| 40 <configfiles> | |
| 41 <configfile name="generated_design"><![CDATA[ | |
| 42 #if $design.source == 'build': | |
| 43 #for $grouping in $design.groupings: | |
| 44 #set grp_str = $grouping.groups.__str__ | |
| 45 #if grp_str != None and len(grp_str) > 0: | |
| 46 #for $grp in grp_str.split(','): | |
| 47 $grp $grouping.name | |
| 48 #end for | |
| 49 #end if | |
| 50 #end for | |
| 51 #end if | |
| 52 ]]></configfile> | |
| 53 </configfiles> | |
| 54 <inputs> | |
| 55 <param name="otu" type="data" format="mothur.shared" optional="true" label="shared - OTU Shared Dataset"/> | |
| 56 <param name="label" type="select" label="label - Pick OTU Labels to include" optional="true" multiple="true"> | |
| 57 <expand macro="labeloptions"/> | |
| 58 </param> | |
| 59 <param name="group" type="data" format="mothur.groups" optional="true" label="group - Group Dataset"/> | |
| 60 <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true"> | |
| 61 <options> | |
| 62 <filter type="data_meta" ref="otu" key="groups"/> | |
| 63 </options> | |
| 64 </param> | |
| 65 <conditional name="design"> | |
| 66 <param name="source" type="select" label="Grouping Design from" help=""> | |
| 67 <option value="hist">Your History</option> | |
| 68 <option value="build">Build a grouping design</option> | |
| 69 </param> | |
| 70 <when value="hist"> | |
| 71 <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)"/> | |
| 72 </when> | |
| 73 <when value="build"> | |
| 74 <repeat name="groupings" title="Grouping"> | |
| 75 <param name="name" type="text" label="Name for a new combined grouping"/> | |
| 76 <param name="groups" type="select" multiple="true" label="Select groups for to include in this grouping"> | |
| 77 <options> | |
| 78 <filter type="data_meta" ref="otu" key="groups"/> | |
| 79 </options> | |
| 80 </param> | |
| 81 </repeat> | |
| 82 </when> | |
| 83 </conditional> | |
| 84 </inputs> | |
| 85 <outputs> | |
| 86 <expand macro="logfile-output"/> | |
| 87 <data name="merged_shared" format="mothur.shared" from_work_dir="otu*.merge.*" label="${tool.name} on ${on_string}: merge.shared"> | |
| 88 <filter>otu</filter> | |
| 89 </data> | |
| 90 <data name="merged_group" format="mothur.groups" from_work_dir="group*.merge.*" label="${tool.name} on ${on_string}: merge.groups"> | |
| 91 <filter>group</filter> | |
| 92 </data> | |
| 93 </outputs> | |
| 94 <tests> | |
| 95 <test><!-- test with shared file --> | |
| 96 <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> | |
| 97 <param name="source" value="hist"/> | |
| 98 <param name="design_dataset" value="toymothur.design2"/> | |
| 99 <output name="merged_shared" md5="60f9e715c948911a61986bf1d1db7747" ftype="mothur.shared"/> | |
| 100 <expand macro="logfile-test"/> | |
| 101 </test> | |
| 102 <test><!-- test with shared file and label and group select --> | |
| 103 <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> | |
| 104 <param name="label" value="0.05,0.22,0.38"/> | |
| 105 <param name="groups" value="forest,pasture"/> | |
| 106 <param name="source" value="hist"/> | |
| 107 <param name="design_dataset" value="toymothur.design2"/> | |
| 108 <output name="merged_shared" md5="11818d535bf88938dc063afca3f95b23" ftype="mothur.shared"/> | |
| 109 <expand macro="logfile-test"/> | |
| 110 </test> | |
| 111 <test><!-- test with group file --> | |
| 112 <param name="group" value="amazon.groups" ftype="mothur.groups"/> | |
| 113 <param name="source" value="hist"/> | |
| 114 <param name="design_dataset" value="toymothur.design2"/> | |
| 115 <output name="merged_group" md5="023ebd0668522e9531da5b061e6e9137" ftype="mothur.groups"/> | |
| 116 <expand macro="logfile-test"/> | |
| 117 </test> | |
| 118 <test><!-- test with design creation --> | |
| 119 <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/> | |
| 120 <param name="source" value="build"/> | |
| 121 <repeat name="groupings"> | |
| 122 <param name="name" value="tardis"/> | |
| 123 <param name="groups" value="forest"/> | |
| 124 </repeat> | |
| 125 <repeat name="groupings"> | |
| 126 <param name="name" value="dalek"/> | |
| 127 <param name="groups" value="pasture"/> | |
| 128 </repeat> | |
| 129 <output name="merged_shared" md5="60f9e715c948911a61986bf1d1db7747" ftype="mothur.shared"/> | |
| 130 <expand macro="logfile-test"/> | |
| 131 </test> | |
| 132 </tests> | |
| 133 <help> | |
| 134 <![CDATA[ | |
| 135 | |
| 136 @MOTHUR_OVERVIEW@ | |
| 137 | |
| 138 **Command Documenation** | |
| 139 | |
| 140 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. | |
| 141 | |
| 142 A design file partitions a list of names into groups. It is a tab-delimited file with 2 columns: name and group, e.g. : | |
| 143 ======= ======= | |
| 144 duck bird | |
| 145 cow mammal | |
| 146 pig mammal | |
| 147 goose bird | |
| 148 cobra reptile | |
| 149 ======= ======= | |
| 150 | |
| 151 The Make_Design tool can construct a design file from a Mothur dataset that contains group names. | |
| 152 | |
| 153 .. _shared: http://www.mothur.org/wiki/Shared_file | |
| 154 .. _merge.groups: http://www.mothur.org/wiki/Merge.groups | |
| 155 ]]> | |
| 156 </help> | |
| 157 <expand macro="citations"/> | |
| 158 </tool> |
