/
remove.groups.xml
192 lines (185 loc) · 9.95 KB
/
remove.groups.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<tool profile="16.07" id="mothur_remove_groups" name="Remove.groups" version="@WRAPPER_VERSION@.0">
<description>Remove groups from groups,fasta,names,list,taxonomy</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="biotools"/>
<expand macro="requirements"/>
<expand macro="stdio"/>
<expand macro="version_command"/>
<command><![CDATA[
@SHELL_OPTIONS@
## create symlinks to input datasets
#if $groupnames.source == "other":
ln -s '$groupnames.group_in' groupnames_group_in.dat &&
ln -s '$groupnames.fasta_in' groupnames_fasta_in.dat &&
ln -s '$groupnames.name_in' groupnames_name_in.dat &&
ln -s '$groupnames.list_in' groupnames_list_in.dat &&
ln -s '$groupnames.taxonomy_in' groupnames_taxonomy_in.dat &&
ln -s '$groupnames.column_in' groupnames_column_in.dat &&
ln -s '$groupnames.phylip_in' groupnames_phylip_in.dat &&
#else
ln -s '$groupnames.shared_in' groupnames_shared_in.dat &&
#end if
echo 'remove.groups(
#if $groupnames.source == "other":
#if $group_in.is_of_type("mothur.groups"):
group=groupnames_group_in.dat
#else
count=groupnames_group_in.dat
#end if
#if $groupnames.fasta_in:
,fasta=groupnames_fasta_in.dat
#end if
#if $groupnames.name_in:
,name=groupnames_name_in.dat
#end if
#if $groupnames.list_in:
,list=groupnames_list_in.dat
#end if
#if $groupnames.taxonomy_in:
,taxonomy=groupnames_taxonomy_in.dat
#end if
#if $column_in:
,column=groupnames_column_in.dat
#end if
#if $phylip_in:
,phylip=groupnames_phylip_in.dat
#end if
#else
shared=groupnames_shared_in.dat
#end if
,groups=${ str($groupnames.groups).replace(",","-") }
)'
| sed 's/ //g' ## mothur trips over whitespace
| mothur
| tee mothur.out.log
]]></command>
<inputs>
<conditional name="groupnames">
<param name="source" type="select" label="Select Input Type">
<option value="shared">shared file</option>
<option value="other">fasta, name, taxonomy, distance matrix or list with a group file or count table</option>
</param>
<when value="other">
<param name="group_in" type="data" format="mothur.groups,mothur.count_table" label="group or count table - Groups"/>
<param name="groups" type="select" label="groups - Pick groups to remove" multiple="true" optional="false">
<options>
<filter type="data_meta" ref="group_in" key="groups"/>
</options>
</param>
<param name="fasta_in" type="data" format="mothur.align,fasta" optional="true" label="fasta - Fasta Sequences"/>
<param name="name_in" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
<param name="list_in" type="data" format="mothur.list" optional="true" label="list - OTU List"/>
<param name="taxonomy_in" type="data" format="mothur.seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
<param name="phylip_in" type="data" format="mothur.lower.dist,mothur.square.dist" optional="true" label="phylip - Distance Matrix you would like to select distances from"
help="must be a phylip-formatted distance matrix"/>
<param name="column_in" type="data" format="mothur.pair.dist" optional="true" label="column - Distance Matrix you would like to select distances from"
help="must be a column-formatted distance matrix"/>
</when>
<when value="shared">
<param name="shared_in" type="data" format="mothur.shared" optional="true" label="shared - OTU Shared"/>
<param name="groups" type="select" label="groups - Pick groups to remove" multiple="true" optional="false">
<options>
<filter type="data_meta" ref="shared_in" key="groups"/>
</options>
</param>
</when>
</conditional>
<expand macro="param-savelog"/>
</inputs>
<outputs>
<expand macro="logfile-output"/>
<data name="fasta_out" format_source="fasta_in" from_work_dir="groupnames_fasta_in*.pick.*" label="${tool.name} on ${on_string}: pick.fasta">
<filter>groupnames['source'] == 'other' and groupnames['fasta_in']</filter>
</data>
<data name="group_out" format="mothur.groups" from_work_dir="groupnames_group_in*.pick.*" label="${tool.name} on ${on_string}: pick.groups">
<filter>groupnames['source'] == 'other' and groupnames['group_in'].ext == 'mothur.groups'</filter>
</data>
<data name="count_out" format="mothur.count_table" from_work_dir="groupnames_group_in*.pick.*" label="${tool.name} on ${on_string}: pick.count_table">
<filter>groupnames['source'] == 'other' and groupnames['group_in'].ext == 'mothur.count_table'</filter>
</data>
<data name="name_out" format="mothur.names" from_work_dir="groupnames_name_in*.pick.*" label="${tool.name} on ${on_string}: pick.names">
<filter>groupnames['source'] == 'other' and groupnames['name_in']</filter>
</data>
<data name="taxonomy_out" format="mothur.seq.taxonomy" from_work_dir="groupnames_taxonomy_in*.pick.*" label="${tool.name} on ${on_string}: pick.taxonomy">
<filter>groupnames['source'] == 'other' and groupnames['taxonomy_in']</filter>
</data>
<collection name="list_out" type="list" label="${tool.name} on ${on_string}: pick.list">
<filter>groupnames['source'] == 'other' and groupnames['list_in']</filter>
<discover_datasets pattern=".*?\.(?P<designation>.*)\.pick\.dat" format="mothur.list"/>
</collection>
<collection name="shared_out" type="list" label="${tool.name} on ${on_string}: pick.shared">
<filter>groupnames['source'] == 'shared'</filter>
<discover_datasets pattern=".*?\.(?P<designation>.*)\.pick\.dat" format="mothur.shared"/>
</collection>
<data name="phylip_out" format_source="phylip_in" from_work_dir="groupnames_phylip_in*.pick.*" label="${tool.name} on ${on_string}: pick.phylip">
<filter>groupnames['phylip_in']</filter>
</data>
<data name="column_out" format="mothur.pair.dist" from_work_dir="groupnames_column_in*.pick.*" label="${tool.name} on ${on_string}: pick.column">
<filter>groupnames['column_in']</filter>
</data>
</outputs>
<tests>
<test><!-- test with shared file -->
<param name="source" value="shared"/>
<param name="shared_in" value="amazon.an.shared"/>
<param name="groups" value="pasture"/>
<output_collection name="shared_out" count="36">
<element name="0.26" md5="c5043237225f0292ce1bfbd2766b96ea" ftype="mothur.shared"/>
</output_collection>
<param name="savelog" value="true"/>
<expand macro="logfile-test"/>
</test>
<test><!-- test with group file and fasta/names/list/taxonomy files -->
<param name="source" value="other"/>
<param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
<param name="fasta_in" value="amazon.fasta" ftype="fasta"/>
<param name="name_in" value="amazon.names" ftype="mothur.names"/>
<param name="list_in" value="amazon.an.list" ftype="mothur.list"/>
<param name="taxonomy_in" value="amazon.wang.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
<param name="groups" value="pasture"/>
<output name="fasta_out" md5="f0e662d1d82e96b4977864925493dbf5" ftype="fasta"/>
<output name="taxonomy_out" md5="8fcaadcb5ad40873e270ad7e2cebe7fa" ftype="mothur.seq.taxonomy"/>
<output name="group_out" md5="6d689ead98f3eb1af41f1a78386d0b50" ftype="mothur.groups"/>
<output name="name_out" md5="55dbcadbb414d95bae8a282a93c10e63" ftype="mothur.names"/>
<output_collection name="list_out" count="36">
<element name="0.26" md5="3a92ef76cfdca6618b4016f14cbac5b8" ftype="mothur.list"/>
</output_collection>
<param name="savelog" value="true"/>
<expand macro="logfile-test"/>
</test>
<test><!-- test with distance matrices -->
<param name="source" value="other"/>
<param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
<param name="column_in" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
<param name="phylip_in" value="amazon.dist" ftype="mothur.square.dist"/>
<param name="groups" value="pasture"/>
<output name="column_out" ftype="mothur.pair.dist">
<assert_contents>
<expand macro="test-column-format"/>
<has_text text="U68589"/>
</assert_contents>
</output>
<output name="phylip_out" ftype="mothur.square.dist">
<assert_contents>
<expand macro="test-dist-format"/>
<has_text text="U68589"/>
</assert_contents>
</output>
<param name="savelog" value="true"/>
<expand macro="logfile-test"/>
</test>
</tests>
<help><![CDATA[
@MOTHUR_OVERVIEW@
**Command Documentation**
The remove.groups_ command removes sequences from a specific group or set of groups from the following file types: fasta, name_, group_, list_, taxonomy_.
.. _name: https://www.mothur.org/wiki/Name_file
.. _group: https://www.mothur.org/wiki/Group_file
.. _list: https://www.mothur.org/wiki/List_file
.. _taxonomy: https://www.mothur.org/wiki/Taxonomy_outline
.. _remove.groups: https://www.mothur.org/wiki/Remove.groups
]]></help>
<expand macro="citations"/>
</tool>