comparison get.oturep.xml @ 1:17b63c3cc04d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit ea40e3d84e7850eb4226d6c85f709dcad18d4ba9
author iuc
date Thu, 18 May 2017 18:09:47 -0400
parents d568050a95be
children 899ef1660676
comparison
equal deleted inserted replaced
0:d568050a95be 1:17b63c3cc04d
2 <description>Generate a fasta with a representative sequence for each OTU</description> 2 <description>Generate a fasta with a representative sequence for each OTU</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <expand macro="stdio"/>
7 <expand macro="version_command"/> 8 <expand macro="version_command"/>
8 <command detect_errors="aggressive"><![CDATA[ 9 <command><![CDATA[
10 @SHELL_OPTIONS@
11
9 ## create symlinks to input datasets 12 ## create symlinks to input datasets
10 ln -s "$otu" otu.dat && 13 ln -s "$otu" otu.dat &&
11 ln -s "$fasta" fasta.dat && 14 #if $method_condition.method_switch == "distance":
12 ln -s "$input.dist" input.dist.dat && 15 ln -s "$method_condition.matrix_condition.dist" dist.dat &&
13 ln -s "$input.name" input.name.dat && 16 ln -s "$method_condition.matrix_condition.nameOrCount" nameOrCount.dat &&
14 ln -s "$count" count.dat && 17 ln -s "$method_condition.fasta" fasta.dat &&
15 #if $pick.type == "yes": 18 #if $method_condition.pick.type == "yes":
16 ln -s "$pick.group" pick.group.dat && 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 &&
17 #end if 23 #end if
18 24
19 echo 'get.oturep( 25 echo 'get.oturep(
20 list=otu.dat, 26 list=otu.dat,
21 #if $fasta: 27 #if $sorted:
22 fasta=fasta.dat, 28 sorted=$sorted,
23 #end if
24 #if $input.source == "column":
25 column=input.dist.dat,
26 name=input.name.dat,
27 #elif $input.source == "phylip":
28 phylip=input.dist.dat,
29 #if $input.name:
30 name=input.name.dat,
31 #end if
32 #end if 29 #end if
33 #if $label: 30 #if $label:
34 label=${ str($label).replace(",","-") }, 31 label=${ str($label).replace(",","-") },
35 #end if 32 #end if
36 #if $pick.type == "yes": 33 #if $method_condition.method_switch == "distance":
37 #if $pick.group: 34 method=distance,
38 group=pick.group.dat, 35 #if $method_condition.matrix_condition.matrix_format == "column":
39 #end if 36 column=dist.dat,
40 #if $pick.groups: 37 #if $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.names"):
41 groups=${ str($pick.groups).replace(",","-") }, 38 name=nameOrCount.dat,
42 #end if 39 #elif $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.count_table"):
43 #end if 40 count=nameOrCount.dat,
44 #if $sorted: 41 #end if
45 sorted=$sorted, 42 #elif $method_condition.matrix_condition.matrix_format == "phylip":
46 #end if 43 phylip=dist.dat,
47 #if $count and not $input.name: 44 #if $method_condition.matrix_condition.nameOrCount:
48 count=count.dat, 45 #if $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.names"):
49 #end if 46 name=nameOrCount.dat,
50 method=$method, 47 #elif $method_condition.matrix_condition.nameOrCount.is_of_type("mothur.count_table"):
51 large=$large 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
52 )' 72 )'
53 | sed 's/ //g' ## mothur trips over whitespace 73 | sed 's/ //g' ## mothur trips over whitespace
54 | mothur 74 | mothur
75 | tee mothur.out.log
55 ]]></command> 76 ]]></command>
56 <inputs> 77 <inputs>
57 <param name="otu" type="data" format="mothur.list" label="list - OTU List"/> 78 <param name="otu" type="data" format="mothur.list" label="list - OTU List"/>
58 <conditional name="input"> 79 <conditional name="method_condition">
59 <param name="source" type="select" label="Distance Matrix Format"> 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.">
60 <option value="column">Pairwise Column Distance Matrix</option> 81 <option value="distance" selected="true">distance</option>
61 <option value="phylip">Phylip Distance Matrix</option> 82 <option value="abundance">abundance</option>
62 </param> 83 </param>
63 <when value="column"> 84 <when value="distance">
64 <param name="dist" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/> 85 <conditional name="matrix_condition">
65 <param name="name" type="data" format="mothur.names" label="name - Sequences Name reference"/> 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"/>
66 </when> 116 </when>
67 <when value="phylip"> 117 <when value="abundance">
68 <param name="dist" type="data" format="mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/> 118 <param name="nameOrCount" type="data" format="mothur.names,mothur.count_table" label="name file or count table - Sequences Name reference"/>
69 <param name="name" type="data" format="mothur.names" optional="true" label="name - Names"/>
70 </when>
71 </conditional>
72 <param name="fasta" type="data" format="fasta" optional="true" label="fasta - Fasta"/>
73 <conditional name="pick">
74 <param name="type" type="select" label="Parse a group file into abundant and rare groups?" help="">
75 <option value="no" selected="true">No</option>
76 <option value="yes">Yes</option>
77 </param>
78 <when value="no"/>
79 <when value="yes">
80 <param name="group" type="data" format="mothur.groups" label="group - Group file for the OTU List"/>
81 <param name="groups" type="select" multiple="true" label="groups - Group Selection (all used if none are selected)">
82 <options>
83 <filter type="data_meta" ref="group" key="groups"/>
84 </options>
85 </param>
86 </when> 119 </when>
87 </conditional> 120 </conditional>
88 <param name="label" type="select" multiple="true" label="label - OTU Labels"> 121 <param name="label" type="select" multiple="true" label="label - OTU Labels">
89 <expand macro="labeloptions"/> 122 <expand macro="labeloptions"/>
90 </param> 123 </param>
93 <option value="name">Sequence Name</option> 126 <option value="name">Sequence Name</option>
94 <option value="number">Bin Number</option> 127 <option value="number">Bin Number</option>
95 <option value="size">Bin Size</option> 128 <option value="size">Bin Size</option>
96 <option value="group">Group</option> 129 <option value="group">Group</option>
97 </param> 130 </param>
98 <param name="large" type="boolean" checked="false" truevalue="true" falsevalue="false" label="large - Distance Matrix is very Large"/>
99 <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count table" help="Cannot supply both a names and count table. Will be ignored if you also supplied a name file. Generated by count.seqs"/>
100 <param name="method" type="select" label="method - select the method of selecting the representative sequence" help="the distance method finds the sequence with the smallest maximum distance to other sequences. The abundance method chooses the abundant sequence in the OTU as the representative. Default=distance">
101 <option value="distance" selected="true">distance</option>
102 <option value="abundance">abundance</option>
103 </param>
104 </inputs> 131 </inputs>
105 <outputs> 132 <outputs>
106 <expand macro="logfile-output"/> 133 <expand macro="logfile-output"/>
107 <collection name="names_out" type="list" label="${tool.name} on ${on_string}: rep.names"> 134 <collection name="names_out" type="list" label="${tool.name} on ${on_string}: rep.names">
108 <filter>input['name'] or not count</filter> 135 <filter>method_condition['nameOrCount'].ext == "mothur.names"</filter>
136 <filter>method_condition['matrix_condition']['nameOrCount'].ext == "mothur.names"</filter>
109 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.names" format="mothur.names"/> 137 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.names" format="mothur.names"/>
110 </collection> 138 </collection>
111 <collection name="fasta_out" type="list" label="${tool.name} on ${on_string}: rep.fasta"> 139 <collection name="fasta_out" type="list" label="${tool.name} on ${on_string}: rep.fasta">
112 <filter>fasta</filter> 140 <filter>method_condition['method_switch'] == "distance"</filter>
141 <filter>method_condition['fasta']</filter>
113 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.fasta" format="fasta"/> 142 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.fasta" format="fasta"/>
114 </collection> 143 </collection>
115 <collection name="count_out" type="list" label="${tool.name} on ${on_string}: rep.count_table"> 144 <collection name="count_out" type="list" label="${tool.name} on ${on_string}: rep.count_table">
116 <filter>count and not input['name']</filter> 145 <filter>method_condition['nameOrCount'].ext == "mothur.count_table"</filter>
146 <filter>method_condition['matrix_condition']['nameOrCount'].ext == "mothur.count_table"</filter>
117 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.count_table" format="mothur.count_table"/> 147 <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.rep\.count_table" format="mothur.count_table"/>
118 </collection> 148 </collection>
119 </outputs> 149 </outputs>
120 <tests> 150 <tests>
121 <test><!-- test with phylip --> 151 <!-- test with distance / phylip -->
122 <param name="otu" value="amazon.an.list" ftype="mothur.list"/> 152 <test>
123 <param name="source" value="phylip"/> 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"/>
124 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/> 156 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
125 <param name="name" value="amazon1.names" ftype="mothur.names"/> 157 <param name="nameOrCount" value="amazon1.names" ftype="mothur.names"/>
126 <output_collection name="names_out" count="36"> 158 <output_collection name="names_out" count="36">
127 <element name="0.27" md5="39ff2858909d49633871d5a625585de5" ftype="mothur.names"/> 159 <element name="0.27" md5="39ff2858909d49633871d5a625585de5" ftype="mothur.names"/>
128 </output_collection> 160 </output_collection>
129 <expand macro="logfile-test"/> 161 <expand macro="logfile-test"/>
130 </test> 162 </test>
131 <test><!-- test with column and label select --> 163 <!-- test with distance / column / label select -->
132 <param name="otu" value="amazon.an.list" ftype="mothur.list"/> 164 <test>
133 <param name="source" value="column"/> 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"/>
134 <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/> 168 <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
135 <param name="name" value="amazon1.names" ftype="mothur.names"/> 169 <param name="nameOrCount" value="amazon1.names" ftype="mothur.names"/>
136 <param name="label" value="unique,0.05,0.27,0.45"/> 170 <param name="label" value="unique,0.05,0.27,0.45"/>
137 <output_collection name="names_out" count="4"> 171 <output_collection name="names_out" count="4">
138 <element name="0.27" md5="be6dccdd3d4619c3ac465246c826209a" ftype="mothur.names"/> 172 <element name="0.27" md5="be6dccdd3d4619c3ac465246c826209a" ftype="mothur.names"/>
139 </output_collection> 173 </output_collection>
140 <expand macro="logfile-test"/> 174 <expand macro="logfile-test"/>
141 </test> 175 </test>
142 <test><!-- test with fasta and sorting--> 176 <!-- test with distance / fasta / sorting -->
143 <param name="otu" value="amazon.an.list" ftype="mothur.list"/> 177 <test>
144 <param name="source" value="phylip"/> 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"/>
145 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/> 181 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
146 <param name="fasta" value="amazon.fasta" ftype="fasta"/> 182 <param name="fasta" value="amazon.fasta" ftype="fasta"/>
147 <param name="label" value="0.05,0.27"/> 183 <param name="label" value="0.05,0.27"/>
148 <param name="sorted" value="name"/> 184 <param name="sorted" value="name"/>
149 <output_collection name="names_out" count="2"> 185 <output_collection name="names_out" count="2">
152 <output_collection name="fasta_out" count="2"> 188 <output_collection name="fasta_out" count="2">
153 <element name="0.27" md5="a9d9622b6f5fcbe8acdc05df5484ffc4" ftype="fasta"/> 189 <element name="0.27" md5="a9d9622b6f5fcbe8acdc05df5484ffc4" ftype="fasta"/>
154 </output_collection> 190 </output_collection>
155 <expand macro="logfile-test"/> 191 <expand macro="logfile-test"/>
156 </test> 192 </test>
157 <test><!-- test with group file --> 193 <!-- test with distance / group file -->
158 <param name="otu" value="amazon.an.list" ftype="mothur.list"/> 194 <test>
159 <param name="source" value="column"/> 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"/>
160 <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/> 198 <param name="dist" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
161 <param name="name" value="amazon1.names" ftype="mothur.names"/> 199 <param name="nameOrCount" value="amazon1.names" ftype="mothur.names"/>
162 <param name="label" value="unique,0.05,0.27,0.45"/> 200 <param name="label" value="unique,0.05,0.27,0.45"/>
163 <param name="type" value="yes"/> 201 <param name="type" value="yes"/>
164 <param name="group" value="amazon.groups" ftype="mothur.groups"/> 202 <param name="group" value="amazon.groups" ftype="mothur.groups"/>
165 <param name="groups" value="forest,pasture"/> 203 <param name="groups" value="forest,pasture"/>
166 <param name="count" value="amazon1.count_table" ftype="mothur.count_table"/> <!-- should be ignored as we also supplied name file -->
167 <output_collection name="names_out" count="8"> 204 <output_collection name="names_out" count="8">
168 <element name="0.27.pasture" md5="34f87d93fd9ebbefed9754f627f502fd" ftype="mothur.names"/> 205 <element name="0.27.pasture" md5="34f87d93fd9ebbefed9754f627f502fd" ftype="mothur.names"/>
169 </output_collection> 206 </output_collection>
170 <expand macro="logfile-test"/> 207 <expand macro="logfile-test"/>
171 </test> 208 </test>
172 <test><!-- test with count table --> 209 <!-- test with distance / count table -->
173 <param name="otu" value="amazon.an.list" ftype="mothur.list"/> 210 <test>
174 <param name="source" value="phylip"/> 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"/>
175 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/> 214 <param name="dist" value="98_sq_phylip_amazon.dist" ftype="mothur.square.dist"/>
176 <param name="label" value="unique,0.05,0.27"/> 215 <param name="label" value="unique,0.05,0.27"/>
177 <param name="count" value="amazon1.count_table" ftype="mothur.count_table"/> 216 <param name="nameOrCount" value="amazon1.count_table" ftype="mothur.count_table"/>
178 <output_collection name="count_out" count="3"> 217 <output_collection name="count_out" count="3">
179 <element name="0.27" md5="6b1afd712825af4bf8cb4ab8304df903" ftype="mothur.count_table"/> 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>
180 </output_collection> 236 </output_collection>
181 <expand macro="logfile-test"/> 237 <expand macro="logfile-test"/>
182 </test> 238 </test>
183 </tests> 239 </tests>
184 <help> 240 <help>
185 <![CDATA[ 241 <![CDATA[
186 242
187 @MOTHUR_OVERVIEW@ 243 @MOTHUR_OVERVIEW@
188 244
189 245
190 **Command Documenation** 246 **Command Documentation**
191 247
192 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. 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.
193 249
194 .. _get.oturep: http://www.mothur.org/wiki/Get.oturep 250 .. _get.oturep: https://www.mothur.org/wiki/Get.oturep
195 251
196 v1.23.0: Updated to Mothur 1.33, added count and method parameter 252 v1.23.0: Updated to Mothur 1.33, added count and method parameter
197 ]]> 253 ]]>
198 </help> 254 </help>
199 <expand macro="citations"/> 255 <expand macro="citations"/>