comparison customize_metaphlan_database.xml @ 0:a6c3f4f439f7 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metaphlan/ commit 1e543a44ceffd8e4c5537b9015606ab3b90a114c"
author iuc
date Mon, 19 Apr 2021 20:56:51 +0000
parents
children 487da152fb43
comparison
equal deleted inserted replaced
-1:000000000000 0:a6c3f4f439f7
1 <tool id="customize_metaphlan_database" name="Customize the marker sequences and metadata" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>from the MetaPhlAn database</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="edam_ontology"/>
7 <expand macro="requirements">
8 <requirement type="package" version="1.3">seqtk</requirement>
9 </expand>
10 <version_command>metaphlan -v</version_command>
11 <command detect_errors="aggressive"><![CDATA[
12 python '$__tool_directory__/customizemetadata.py'
13 $op.operation
14
15 #if $op.operation == "add_marker"
16 --in_json '$in_json'
17 --out_json '$out_json'
18 --name $op.name
19 --m_length $op.m_length
20 #for $s in $op.genomes
21 --g_length $s.g_length
22 #if str($s.gca) != ''
23 --gca '$s.gca'
24 #else
25 --gca ''
26 #end if
27 --k_name '$s.k_name'
28 --k_id $s.k_id
29 --p_name '$s.p_name'
30 --p_id $s.p_id
31 --c_name '$s.c_name'
32 --c_id $s.c_id
33 --o_name '$s.o_name'
34 --o_id $s.o_id
35 --f_name '$s.f_name'
36 --f_id $s.f_id
37 --g_name '$s.g_name'
38 --g_id $s.g_id
39 --s_name '$s.s_name'
40 --s_id $s.s_id
41 --t_name '$s.t_name'
42 #end for
43 &&
44 cat
45 '$in_fasta'
46 '$op.marker_seq'
47 > '$out_fasta'
48
49 #else if $op.operation == "remove_markers"
50 --in_json '$in_json'
51 --markers '$op.markers'
52 --out_json '$out_json'
53 --kept_markers 'kept_makers'
54 &&
55 seqtk subseq
56 '$in_fasta'
57 'kept_makers'
58 > '$out_fasta'
59
60 #else if $op.operation == "keep_markers"
61 --in_json '$in_json'
62 --markers '$op.markers'
63 --out_json '$out_json'
64 &&
65 seqtk subseq
66 '$in_fasta'
67 '$op.markers'
68 > '$out_fasta'
69 #end if
70 ]]></command>
71 <inputs>
72 <param name="in_fasta" type="data" format="fasta" label="Marker sequences"/>
73 <param argument="--in_json" type="data" format="json" label="Marker metadata"/>
74 <conditional name="op">
75 <param name="operation" type="select" label="Customization">
76 <option value="add_marker" selected="true">Add new marker</option>
77 <option value="remove_markers">Remove markers</option>
78 <option value="keep_markers">Keep markers, others will be removed</option>
79 </param>
80 <when value="add_marker">
81 <param name="marker_seq" type="data" format="fasta" label="Sequences of the new markers"/>
82 <param argument="--name" type="text" label="Name of the new marker"/>
83 <param argument="--m_length" type="integer" value="" label="Length of the new marker"/>
84 <repeat name="genomes" min="1" title="Taxonomy of the genomes from which the new marker has been extracted">
85 <param argument="--g_length" type="integer" min="0" value="" label="Length of the genome"/>
86 <param argument="--gca" type="text" optional="true" label="GenBank assemblies id (GCA) of the genome"/>
87 <param argument="--k_name" type="text" label="Kingdom: Name">
88 <sanitizer invalid_char="">
89 <valid initial="string.ascii_letters,string.digits">
90 <add value="_" />
91 </valid>
92 </sanitizer>
93 </param>
94 <param argument="--k_id" type="integer" min="0" value="" label="Kingdom: NCBI id"/>
95 <param argument="--p_name" type="text" label="Phylum: Name">
96 <sanitizer invalid_char="">
97 <valid initial="string.ascii_letters,string.digits">
98 <add value="_" />
99 </valid>
100 </sanitizer>
101 </param>
102 <param argument="--p_id" type="integer" min="0" value="" label="Phylum: NCBI id"/>
103 <param argument="--c_name" type="text" label="Class: Name">
104 <sanitizer invalid_char="">
105 <valid initial="string.ascii_letters,string.digits">
106 <add value="_" />
107 </valid>
108 </sanitizer>
109 </param>
110 <param argument="--c_id" type="integer" min="0" value="" label="Class: NCBI id"/>
111 <param argument="--o_name" type="text" label="Order: Name">
112 <sanitizer invalid_char="">
113 <valid initial="string.ascii_letters,string.digits">
114 <add value="_" />
115 </valid>
116 </sanitizer>
117 </param>
118 <param argument="--o_id" type="integer" min="0" value="" label="Order: NCBI id"/>
119 <param argument="--f_name" type="text" label="Family: Name">
120 <sanitizer invalid_char="">
121 <valid initial="string.ascii_letters,string.digits">
122 <add value="_" />
123 </valid>
124 </sanitizer>
125 </param>
126 <param argument="--f_id" type="integer" min="0" value="" label="Family: NCBI id"/>
127 <param argument="--g_name" type="text" label="Genus: Name">
128 <sanitizer invalid_char="">
129 <valid initial="string.ascii_letters,string.digits">
130 <add value="_" />
131 </valid>
132 </sanitizer>
133 </param>
134 <param argument="--g_id" type="integer" min="0" value="" label="Genus: NCBI id"/>
135 <param argument="--s_name" type="text" label="Species: Name">
136 <sanitizer invalid_char="">
137 <valid initial="string.ascii_letters,string.digits">
138 <add value="_" />
139 </valid>
140 </sanitizer>
141 </param>
142 <param argument="--s_id" type="integer" min="0" value="" label="Species: NCBI id"/>
143 <param argument="--t_name" type="text" label="Strain: Name">
144 <sanitizer invalid_char="">
145 <valid initial="string.ascii_letters,string.digits">
146 <add value="_" />
147 </valid>
148 </sanitizer>
149 </param>
150 </repeat>
151 </when>
152 <when value="remove_markers">
153 <param argument="--markers" type="data" format="tabular,txt" label="List of markers to remove" help="1 marker per line"/>
154 </when>
155 <when value="keep_markers">
156 <param argument="--markers" type="data" format="tabular,txt" label="List of markers to keep" help="1 marker per line"/>
157 </when>
158 </conditional>
159 </inputs>
160 <outputs>
161 <data name="out_fasta" format="fasta" label="${tool.name} on ${on_string}: Markers sequences" />
162 <data name="out_json" format="json" label="${tool.name} on ${on_string}: Marker metadata" />
163 </outputs>
164 <tests>
165 <test expect_num_outputs="2">
166 <param name="in_fasta" value="test-db-without-one-marker.fasta"/>
167 <param name="in_json" value="test-db-without-one-marker.json"/>
168 <conditional name="op">
169 <param name="operation" value="add_marker"/>
170 <param name="marker_seq" value="marker_sequence.fasta"/>
171 <param name="name" value="13076__A0A2I1PE66__CYJ72_10760"/>
172 <param name="m_length" value="540"/>
173 <repeat name="genomes">
174 <param name="g_length" value="2411251"/>
175 <param name="gca" value="GCA_002847845"/>
176 <param name="k_name" value="Bacteria"/>
177 <param name="k_id" value="2"/>
178 <param name="p_name" value="Bacilli"/>
179 <param name="p_id" value="1239"/>
180 <param name="c_name" value="Negativicutes"/>
181 <param name="c_id" value="91061"/>
182 <param name="o_name" value="Lactobacillales"/>
183 <param name="o_id" value="186826"/>
184 <param name="f_name" value="Aerococcaceae"/>
185 <param name="f_id" value="186827"/>
186 <param name="g_name" value="Globicatella"/>
187 <param name="g_id" value="13075"/>
188 <param name="s_name" value="Globicatella_sanguinis"/>
189 <param name="s_id" value="13076"/>
190 <param name="t_name" value="GCA_002847845"/>
191 </repeat>
192 </conditional>
193 <output name="out_fasta" file="test-db.fasta" compare="sim_size">
194 <has_text text="13076__A0A2I1PE66__CYJ72_10760" />
195 </output>
196 <output name="out_json" file="test-db.json" compare="sim_size">
197 <has_text text="13076__A0A2I1PE66__CYJ72_10760" />
198 </output>
199 </test>
200 <test expect_num_outputs="2">
201 <param name="in_fasta" value="test-db.fasta"/>
202 <param name="in_json" value="test-db.json"/>
203 <conditional name="op">
204 <param name="operation" value="remove_markers"/>
205 <param name="markers" value="marker.txt"/>
206 </conditional>
207 <output name="out_fasta" file="test-db-without-one-marker.fasta" compare="sim_size">
208 <not_has_text text="13076__A0A2I1PE66__CYJ72_10760" />
209 </output>
210 <output name="out_json" file="test-db-without-one-marker.json" compare="sim_size">
211 <not_has_text text="13076__A0A2I1PE66__CYJ72_10760" />
212 </output>
213 </test>
214 <test expect_num_outputs="2">
215 <param name="in_fasta" value="test-db.fasta"/>
216 <param name="in_json" value="test-db.json"/>
217 <conditional name="op">
218 <param name="operation" value="keep_markers"/>
219 <param name="markers" value="marker.txt"/>
220 </conditional>
221 <output name="out_fasta" file="test-db-with-one-marker.fasta" compare="sim_size">
222 <has_text text="13076__A0A2I1PE66__CYJ72_10760" />
223 </output>
224 <output name="out_json" file="test-db-with-one-marker.json" compare="sim_size">
225 <has_text text="13076__A0A2I1PE66__CYJ72_10760" />
226 </output>
227 </test>
228 </tests>
229 <help><![CDATA[
230 What it does
231 ============
232
233 Customize the marker sequences (in fasta format) and metadata (in JSON) for a MetaPhlAn database:
234
235 - Add marker
236 - Remove markers
237 - Keep markers
238
239 Inputs
240 ======
241
242 MetaphlAn database (can be extracted with dedicated tool)
243
244 - Fasta file with marker sequences
245 - JSON file with marker metadata
246
247 The other inputs depends on the type of customization
248
249 - Add marker
250 - Fasta file with the sequence of new marker
251 - Information about the new marker and related genomes
252
253 - Remove markers
254 - File with list of markers to remove
255
256 - Keep markers
257 - File with list of markers to keep
258
259 Outputs
260 =======
261
262 Customized database (that can be used as input for MetaphlAn tool)
263
264 - Fasta file with marker sequences
265 - JSON file with marker metadata
266
267 ]]></help>
268 <expand macro="citations"/>
269 </tool>