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