comparison remove.lineage.xml @ 0:152eaafb14ba 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:47:08 -0400
parents
children b4939bc52ca7
comparison
equal deleted inserted replaced
-1:000000000000 0:152eaafb14ba
1 <tool profile="16.07" id="mothur_remove_lineage" name="Remove.lineage" version="@WRAPPER_VERSION@.0">
2 <description>Picks by taxon</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 #import re
10 ## create symlinks to input datasets
11 ln -s "$file.taxonomy" file.taxonomy.dat &&
12 #if $file.filetype == "useconstaxonomy":
13 ln -s "$file.shared" file.shared.dat &&
14 ln -s "$file.list" file.list.dat &&
15 #end if
16 ln -s "$fasta_in" fasta_in.dat &&
17 ln -s "$group_in" group_in.dat &&
18 ln -s "$alignreport_in" alignreport_in.dat &&
19 ln -s "$list_in" list_in.dat &&
20 ln -s "$name_in" name_in.dat &&
21 ln -s "$count" count.dat &&
22
23 echo 'remove.lineage(
24 #if $file.filetype == "usetaxonomy":
25 taxonomy=file.taxonomy.dat
26 #else
27 constaxonomy=file.taxonomy.dat
28 #if $file.shared:
29 ,shared=file.shared.dat
30 #end if
31 #if $file.list:
32 ,list=file.list.dat
33 #end if
34 #end if
35 #if $file.taxons:
36 #set taxonstring=str($file.taxons).replace(",","-")
37 ,taxon='"'$re.sub("(\s|,)+",",",$re.sub("\(\d+\)","", $taxonstring ))'"'
38 #elif $taxon:
39 ,taxon='"'$re.sub("(\s|,)+",",",$re.sub("\(\d+\)","", $taxon.value )).replace(",","-")'"'
40 #end if
41 #if $fasta_in:
42 ,fasta=fasta_in.dat
43 #end if
44 #if $group_in:
45 ,group=group_in.dat
46 #end if
47 #if $alignreport_in:
48 ,alignreport=alignreport_in.dat
49 #end if
50 #if $list_in:
51 ,list=list_in.dat
52 #end if
53 #if $name_in:
54 ,name=name_in.dat
55 ,dups=$dups
56 #end if
57 #if $count:
58 ,count=count.dat
59 #end if
60 )'
61 | sed 's/ //g' ## mothur trips over whitespace
62 | mothur
63 ]]></command>
64 <inputs>
65 <conditional name="file">
66 <param name="filetype" type="select" label="choose which file is used">
67 <option value="usetaxonomy" selected="true">taxonomy</option>
68 <option value="useconstaxonomy">constaxonomy</option>
69 </param>
70 <when value="usetaxonomy">
71 <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy" help="please make sure your file has no quotation marks in it"/>
72 <param name="taxons" type="select" size="120" optional="true" multiple="true" label="Browse Taxons from Taxonomy">
73 <options from_dataset="taxonomy">
74 <column name="name" index="1"/>
75 <column name="value" index="1"/>
76 <filter type="unique_value" name="unique_taxon" column="1"/>
77 <filter type="sort_by" name="sorted_taxon" column="1"/>
78 </options>
79 <sanitizer>
80 <valid initial="default">
81 <add preset="string.printable"/>
82 <add value=";"/>
83 <remove value="&quot;"/>
84 <remove value="&apos;"/>
85 </valid>
86 </sanitizer>
87 </param>
88 </when>
89 <when value="useconstaxonomy">
90 <param name="taxonomy" type="data" format="mothur.cons.taxonomy" label="constaxonomy - Constaxonomy file. Provide either a constaxonomy file or a taxonomy file" help="please make sure your file has no quotation marks in it"/>
91 <param name="taxons" type="select" size="120" optional="true" multiple="true" label="Browse Taxons from Taxonomy">
92 <options from_dataset="taxonomy">
93 <column name="name" index="2"/>
94 <column name="value" index="2"/>
95 <filter type="unique_value" name="unique_taxon" column="2"/>
96 <filter type="sort_by" name="sorted_taxon" column="2"/>
97 </options>
98 <sanitizer>
99 <valid initial="default">
100 <add preset="string.printable"/>
101 <add value=";"/>
102 <remove value="&quot;"/>
103 <remove value="&apos;"/>
104 </valid>
105 </sanitizer>
106 </param>
107 <param name="shared" type="data" format="mothur.shared" label="shared - shared file" optional="true"/>
108 <param name="list" type="data" format="mothur.list" label="list - list file" optional="true"/>
109 </when>
110 </conditional>
111 <param name="taxon" type="text" area="True" size="5x120" label="taxon - Manually select Taxons for filtering" help="If no taxons selected from file, Enter 1 or more taxons separated by dashes here, e.g. Bacteria;Firmicutes;-Bacteria;Actinobacteria; "/>
112 <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
113 <param name="group_in" type="data" format="mothur.groups" optional="true" label="group - Groups"/>
114 <param name="alignreport_in" type="data" format="mothur.align.report" optional="true" label="alignreport - Align Report"/>
115 <param name="list_in" type="data" format="mothur.list" optional="true" label="list - OTU List"/>
116 <param name="name_in" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
117 <param name="dups" type="boolean" truevalue="true" falsevalue="false" checked="true" label="dups - Apply to duplicate names"/>
118 <param name="count" type="data" format="mothur.count_table" optional="true" help="The count file is similar to the name file in that it is used to represent the number of duplicate sequences for a given representative sequence. It can also contain group information"/>
119 </inputs>
120 <outputs>
121 <expand macro="logfile-output"/>
122 <data name="taxonomy_out" format="mothur.seq.taxonomy" from_work_dir="file.taxonomy*.pick.*" label="${tool.name} on ${on_string}: pick.taxonomy"/>
123 <data format_source="fasta_in" name="fasta_out" from_work_dir="fasta_in*.pick.*" label="${tool.name} on ${on_string}: pick.fasta">
124 <filter>fasta_in</filter>
125 </data>
126 <data name="group_out" format="mothur.groups" from_work_dir="group_in*.pick.*" label="${tool.name} on ${on_string}: pick.group">
127 <filter>group_in</filter>
128 </data>
129 <data name="count_out" format="mothur.count_table" from_work_dir="count*.pick.*" label="${tool.name} on ${on_string}: pick.count_table">
130 <filter>count</filter>
131 </data>
132 <collection name="list_out" type="list" label="${tool.name} on ${on_string}: pick.list">
133 <filter>list_in</filter>
134 <discover_datasets pattern="list_in.*?\.(?P&lt;designation&gt;.*)\.pick.*" format="mothur.list"/>
135 </collection>
136 <data name="name_out" format="mothur.names" from_work_dir="name_in*.pick.*" label="${tool.name} on ${on_string}: pick.name">
137 <filter>name_in</filter>
138 </data>
139 <data name="alignreport_out" format="mothur.align.report" from_work_dir="alignreport_in*.pick.*" label="${tool.name} on ${on_string}: pick.align.report">
140 <filter>alignreport_in</filter>
141 </data>
142 </outputs>
143 <tests>
144 <test><!-- test with defaults and single taxon -->
145 <param name="filetype" value="usetaxonomy"/>
146 <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
147 <param name="taxon" value="Bacteria;Firmicutes;"/>
148 <param name="count" value="amazon.count_table"/>
149 <output name="taxonomy_out" md5="a2a72b7f53ef6c907b8c4db906fcf03e"/>
150 <output name="count_out" md5="6f89b3b99f337414d98f70fcda4b248e"/>
151 </test>
152 <test><!-- test with multiple taxons and all additional files -->
153 <param name="filetype" value="usetaxonomy"/>
154 <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
155 <param name="taxon" value="Bacteria;Firmicutes;,Bacteria;Actinobacteria;"/>
156 <param name="group_in" value="abrecovery.groups" ftype="mothur.groups"/>
157 <param name="fasta_in" value="abrecovery.fasta" ftype="fasta"/>
158 <param name="name_in" value="abrecovery.names" ftype="mothur.names"/>
159 <param name="alignreport_in" value="Mock_S280_L001_R1_001_small.contigs.report" ftype="mothur.align.report"/>
160 <param name="list_in" value="amazon.an.list" ftype="mothur.list"/>
161 <output name="taxonomy_out" md5="449200280fa6c332854204fe78a9bd12"/>
162 <output name="group_out" md5="119a2642bd730aad03f7d6c1f8b57a0b" ftype="mothur.groups"/>
163 <output name="fasta_out" md5="2c8415a797011e15f19ad85a9c994551" ftype="fasta"/>
164 <output name="name_out" md5="712b28c3a84d3c16ef202340717e3a91" ftype="mothur.names"/>
165 <output name="alignreport_out" md5="d94be921c3ad1786db3e60dc23c3bc04" ftype="mothur.align.report"/>
166 <output_collection name="list_out" count="36">
167 <element name="0.05" md5="5d4195793e2fc50979b377df468c436a" ftype="mothur.list"/>
168 </output_collection>
169 </test>
170 <test><!-- test with taxons from file -->
171 <param name="filetype" value="usetaxonomy"/>
172 <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
173 <param name="taxons" value="Bacteria(100);Firmicutes(100);Clostridia(100);Clostridiales(100);Lachnospiraceae(100);Dorea(99);,Bacteria(100);Firmicutes(100);Clostridia(100);Clostridiales(100);Lachnospiraceae(100);Roseburia(47);"/>
174 <output name="taxonomy_out" md5="57b4ab4e5b68f8c7d88a0f591c4fe4a1"/>
175 </test>
176 <test><!-- test with constaxonomy file -->
177 <param name="filetype" value="useconstaxonomy"/>
178 <param name="taxonomy" value="example.constaxonomy" ftype="mothur.cons.taxonomy"/>
179 <param name="taxon" value="Bacteria;Bacteroidetes;"/>
180 <output name="taxonomy_out" md5="751fd9b99828998dd909115634027e5e"/>
181 </test>
182 <test><!-- test with constaxonomy file and taxons from file -->
183 <param name="filetype" value="useconstaxonomy"/>
184 <param name="taxonomy" value="example.constaxonomy" ftype="mothur.cons.taxonomy"/>
185 <param name="taxons" value="Bacteria(100);Firmicutes(100);Clostridia(70);Clostridiales(70);Lachnospiraceae(51);unclassified;,Bacteria(100);Proteobacteria(100);Gammaproteobacteria(100);unclassified;unclassified;unclassified;"/>
186 <output name="taxonomy_out" md5="017f53dd82f3e1afcf48778034b51685"/>
187 </test>
188 </tests>
189 <help>
190 <![CDATA[
191
192 @MOTHUR_OVERVIEW@
193
194 **Command Documenation**
195
196 The remove.lineage_ command reads a taxonomy_ file and a taxon and generates a new file that contains only the sequences in the that are not from that taxon. You may also include either a fasta, name_, group_, list_, or align.report_ file to this command and mothur will generate new files for each of those containing only the selected sequences.
197
198 .. _taxonomy: http://www.mothur.org/wiki/Taxonomy_outline
199 .. _name: http://www.mothur.org/wiki/Name_file
200 .. _group: http://www.mothur.org/wiki/Group_file
201 .. _list: http://www.mothur.org/wiki/List_file
202 .. _align.report: http://www.mothur.org/wiki/Align.seqs
203 .. _remove.lineage: http://www.mothur.org/wiki/Remove.lineage
204
205 ]]>
206 </help>
207 <expand macro="citations"/>
208 </tool>