Mercurial > repos > thanhlv > customize_metaphlan_database
comparison customize_metaphlan_database.xml @ 0:c0473c69ac9f draft
planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/metaphlan/
author | thanhlv |
---|---|
date | Mon, 13 Feb 2023 11:36:16 +0000 |
parents | |
children | b6e5df1237f2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c0473c69ac9f |
---|---|
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 <assert_contents> | |
195 <has_text text="13076__A0A2I1PE66__CYJ72_10760" /> | |
196 </assert_contents> | |
197 </output> | |
198 <output name="out_json" file="test-db.json" compare="sim_size"> | |
199 <assert_contents> | |
200 <has_text text="13076__A0A2I1PE66__CYJ72_10760" /> | |
201 </assert_contents> | |
202 </output> | |
203 </test> | |
204 <test expect_num_outputs="2"> | |
205 <param name="in_fasta" value="test-db.fasta"/> | |
206 <param name="in_json" value="test-db.json"/> | |
207 <conditional name="op"> | |
208 <param name="operation" value="remove_markers"/> | |
209 <param name="markers" value="marker.txt"/> | |
210 </conditional> | |
211 <output name="out_fasta" file="test-db-without-one-marker.fasta" compare="sim_size"> | |
212 <assert_contents> | |
213 <not_has_text text="13076__A0A2I1PE66__CYJ72_10760" /> | |
214 </assert_contents> | |
215 </output> | |
216 <output name="out_json" file="test-db-without-one-marker.json" compare="sim_size"> | |
217 <assert_contents> | |
218 <not_has_text text="13076__A0A2I1PE66__CYJ72_10760" /> | |
219 </assert_contents> | |
220 </output> | |
221 </test> | |
222 <test expect_num_outputs="2"> | |
223 <param name="in_fasta" value="test-db.fasta"/> | |
224 <param name="in_json" value="test-db.json"/> | |
225 <conditional name="op"> | |
226 <param name="operation" value="keep_markers"/> | |
227 <param name="markers" value="marker.txt"/> | |
228 </conditional> | |
229 <output name="out_fasta" file="test-db-with-one-marker.fasta" compare="sim_size"> | |
230 <assert_contents> | |
231 <has_text text="13076__A0A2I1PE66__CYJ72_10760" /> | |
232 </assert_contents> | |
233 </output> | |
234 <output name="out_json" file="test-db-with-one-marker.json" compare="sim_size"> | |
235 <assert_contents> | |
236 <has_text text="13076__A0A2I1PE66__CYJ72_10760" /> | |
237 </assert_contents> | |
238 </output> | |
239 </test> | |
240 </tests> | |
241 <help><![CDATA[ | |
242 What it does | |
243 ============ | |
244 | |
245 Customize the marker sequences (in fasta format) and metadata (in JSON) for a MetaPhlAn database: | |
246 | |
247 - Add marker | |
248 - Remove markers | |
249 - Keep markers | |
250 | |
251 Inputs | |
252 ====== | |
253 | |
254 MetaphlAn database (can be extracted with dedicated tool) | |
255 | |
256 - Fasta file with marker sequences | |
257 - JSON file with marker metadata | |
258 | |
259 The other inputs depends on the type of customization | |
260 | |
261 - Add marker | |
262 - Fasta file with the sequence of new marker | |
263 - Information about the new marker and related genomes | |
264 | |
265 - Remove markers | |
266 - File with list of markers to remove | |
267 | |
268 - Keep markers | |
269 - File with list of markers to keep | |
270 | |
271 Outputs | |
272 ======= | |
273 | |
274 Customized database (that can be used as input for MetaphlAn tool) | |
275 | |
276 - Fasta file with marker sequences | |
277 - JSON file with marker metadata | |
278 | |
279 ]]></help> | |
280 <expand macro="citations"/> | |
281 </tool> |