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