comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:e6758f2f744b
1 <tool profile="16.07" id="mothur_get_oturep" name="Get.oturep" version="@WRAPPER_VERSION@.0">
2 <description>Generate a fasta with a representative sequence for each OTU</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 #if $method_condition.method_switch == "distance":
15 ln -s "$method_condition.matrix_condition.dist" dist.dat &&
16 ln -s "$method_condition.matrix_condition.nameOrCount" nameOrCount.dat &&
17 ln -s "$method_condition.fasta" fasta.dat &&
18 #if $method_condition.pick.type == "yes":
19 ln -s "$method_condition.pick.group" group.dat &&
20 #end if
21 #elif $method_condition.method_switch == "abundance":
22 ln -s "$method_condition.nameOrCount" nameOrCount.dat &&
23 #end if
24
25 echo 'get.oturep(
26 list=otu.dat,
27 #if $sorted:
28 sorted=$sorted,
29 #end if
30 #if $label:
31 label=${ str($label).replace(",","-") },
32 #end if
33 #if $method_condition.method_switch == "distance":
34 method=distance,
35 #if $method_condition.matrix_condition.matrix_format == "column":
36 column=dist.dat,
37 #if $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.names"):
38 name=nameOrCount.dat,
39 #elif $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.count_table"):
40 count=nameOrCount.dat,
41 #end if
42 #elif $method_condition.matrix_condition.matrix_format == "phylip":
43 phylip=dist.dat,
44 #if $method_condition.matrix_condition.nameOrCount:
45 #if $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.names"):
46 name=nameOrCount.dat,
47 #elif $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.count_table"):
48 count=nameOrCount.dat,
49 #end if
50 #end if
51 #end if
52 #if $method_condition.fasta:
53 fasta=fasta.dat,
54 #end if
55 #if $method_condition.pick.type == "yes":
56 #if $method_condition.pick.group:
57 group=group.dat,
58 #end if
59 #if $method_condition.pick.groups:
60 groups=${ str($method_condition.pick.groups).replace(",","-") },
61 #end if
62 #end if
63 large=$method_condition.large
64 #elif $method_condition.method_switch == "abundance":
65 method=abundance,
66 #if $method_condition.nameOrCount.is_of_type("mothur.names"):
67 name=nameOrCount.dat
68 #elif $method_condition.nameOrCount.is_of_type("mothur.count_table"):
69 count=nameOrCount.dat
70 #end if
71 #end if
72 )'
73 | sed 's/ //g' ## mothur trips over whitespace
74 | mothur
75 | tee mothur.out.log
76 ]]></command>
77 <inputs>
78 <param name="otu" type="data" format="mothur.list" label="list - OTU List"/>
79 <conditional name="method_condition">
80 <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.">
81 <option value="distance" selected="true">distance</option>
82 <option value="abundance">abundance</option>
83 </param>
84 <when value="distance">
85 <conditional name="matrix_condition">
86 <param name="matrix_format" type="select" label="Select a Distance Matrix Format" help="">
87 <option value="column">Pairwise Column Distance Matrix</option>
88 <option value="phylip">Phylip Distance Matrix</option>
89 </param>
90 <when value="column">
91 <param name="dist" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/>
92 <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/>
93 </when>
94 <when value="phylip">
95 <param name="dist" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
96 <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" optional="true" label="name file or count table - Sequences Name reference"/>
97 </when>
98 </conditional>
99 <param name="fasta" type="data" format="fasta" optional="true" label="fasta - Fasta"/>
100 <conditional name="pick">
101 <param name="type" type="select" label="Parse a group file into abundant and rare groups?" help="">
102 <option value="no" selected="true">No</option>
103 <option value="yes">Yes</option>
104 </param>
105 <when value="no"/>
106 <when value="yes">
107 <param name="group" type="data" format="mothur.groups" label="group - Group file for the OTU List"/>
108 <param name="groups" type="select" multiple="true" label="groups - Group Selection (all used if none are selected)">
109 <options>
110 <filter type="data_meta" ref="group" key="groups"/>
111 </options>
112 </param>
113 </when>
114 </conditional>
115 <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"/>
116 </when>
117 <when value="abundance">
118 <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/>
119 </when>
120 </conditional>
121 <param name="label" type="select" multiple="true" label="label - OTU Labels">
122 <expand macro="labeloptions"/>
123 </param>
124 <param name="sorted" type="select" label="sorted - Sort Sequences by">
125 <option value="">Don't sort</option>
126 <option value="name">Sequence Name</option>
127 <option value="number">Bin Number</option>
128 <option value="size">Bin Size</option>
129 <option value="group">Group</option>
130 </param>
131 </inputs>
132 <outputs>
133 <expand macro="logfile-output"/>
134 <collection name="names_out" type="list" label="${tool.name} on ${on_string}: rep.names">
135 <filter>method_condition['nameOrCount'].ext == "mothur.names"</filter>
136 <filter>method_condition['matrix_condition']['nameOrCount'].ext == "mothur.names"</filter>
137 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.names" format="mothur.names"/>
138 </collection>
139 <collection name="fasta_out" type="list" label="${tool.name} on ${on_string}: rep.fasta">
140 <filter>method_condition['method_switch'] == "distance"</filter>
141 <filter>method_condition['fasta']</filter>
142 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.fasta" format="fasta"/>
143 </collection>
144 <collection name="count_out" type="list" label="${tool.name} on ${on_string}: rep.count_table">
145 <filter>method_condition['nameOrCount'].ext == "mothur.count_table"</filter>
146 <filter>method_condition['matrix_condition']['nameOrCount'].ext == "mothur.count_table"</filter>
147 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.count_table" format="mothur.count_table"/>
148 </collection>
149 </outputs>
150 <tests>
151 <!-- test with distance / phylip -->
152 <test>
153 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
154 <param name="method_switch" value="distance"/>
155 <param name="matrix_format" value="phylip"/>
156 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
157 <param name="nameOrCount" value="amazon1.names" ftype="mothur.names"/>
158 <output_collection name="names_out" count="36">
159 <element name="0.27" md5="39ff2858909d49633871d5a625585de5" ftype="mothur.names"/>
160 </output_collection>
161 <expand macro="logfile-test"/>
162 </test>
163 <!-- test with distance / column / label select -->
164 <test>
165 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
166 <param name="method_switch" value="distance"/>
167 <param name="matrix_format" value="column"/>
168 <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
169 <param name="nameOrCount" value="amazon1.names" ftype="mothur.names"/>
170 <param name="label" value="unique,0.05,0.27,0.45"/>
171 <output_collection name="names_out" count="4">
172 <element name="0.27" md5="be6dccdd3d4619c3ac465246c826209a" ftype="mothur.names"/>
173 </output_collection>
174 <expand macro="logfile-test"/>
175 </test>
176 <!-- test with distance / fasta / sorting -->
177 <test>
178 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
179 <param name="method_switch" value="distance"/>
180 <param name="matrix_format" value="phylip"/>
181 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
182 <param name="fasta" value="amazon.fasta" ftype="fasta"/>
183 <param name="label" value="0.05,0.27"/>
184 <param name="sorted" value="name"/>
185 <output_collection name="names_out" count="2">
186 <element name="0.27" md5="39ff2858909d49633871d5a625585de5" ftype="mothur.names"/>
187 </output_collection>
188 <output_collection name="fasta_out" count="2">
189 <element name="0.27" md5="a9d9622b6f5fcbe8acdc05df5484ffc4" ftype="fasta"/>
190 </output_collection>
191 <expand macro="logfile-test"/>
192 </test>
193 <!-- test with distance / group file -->
194 <test>
195 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
196 <param name="method_switch" value="distance"/>
197 <param name="matrix_format" value="column"/>
198 <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
199 <param name="nameOrCount" value="amazon1.names" ftype="mothur.names"/>
200 <param name="label" value="unique,0.05,0.27,0.45"/>
201 <param name="type" value="yes"/>
202 <param name="group" value="amazon.groups" ftype="mothur.groups"/>
203 <param name="groups" value="forest,pasture"/>
204 <output_collection name="names_out" count="8">
205 <element name="0.27.pasture" md5="34f87d93fd9ebbefed9754f627f502fd" ftype="mothur.names"/>
206 </output_collection>
207 <expand macro="logfile-test"/>
208 </test>
209 <!-- test with distance / count table -->
210 <test>
211 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
212 <param name="method_switch" value="distance"/>
213 <param name="matrix_format" value="phylip"/>
214 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
215 <param name="label" value="unique,0.05,0.27"/>
216 <param name="nameOrCount" value="amazon1.count_table" ftype="mothur.count_table"/>
217 <output_collection name="count_out" count="3">
218 <element name="0.27" md5="6b1afd712825af4bf8cb4ab8304df903" ftype="mothur.count_table"/>
219 </output_collection>
220 <expand macro="logfile-test"/>
221 </test>
222 <!-- test with abundance / count / label -->
223 <!-- It seems that the content of the result file can vary from one execution to another with the same parameters -->
224 <test>
225 <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
226 <param name="method_switch" value="abundance"/>
227 <param name="nameOrCount" value="amazon1.count_table" ftype="mothur.count_table"/>
228 <param name="label" value="0.27,unique"/>
229 <param name="sorted" value="name"/>
230 <output_collection name="count_out" count="2">
231 <element name="0.27" ftype="mothur.count_table">
232 <assert_contents>
233 <has_text_matching expression="U68\w+\t36" />
234 </assert_contents>
235 </element>
236 </output_collection>
237 <expand macro="logfile-test"/>
238 </test>
239 </tests>
240 <help>
241 <![CDATA[
242
243 @MOTHUR_OVERVIEW@
244
245
246 **Command Documentation**
247
248 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.
249
250 .. _get.oturep: https://www.mothur.org/wiki/Get.oturep
251
252 v1.23.0: Updated to Mothur 1.33, added count and method parameter
253 ]]>
254 </help>
255 <expand macro="citations"/>
256 </tool>