comparison extract_kraken_reads.xml @ 1:f329328da134 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/krakentools commit f37828f1d6b9c53cc2e7ea334ee9a2fb8dbd8711
author iuc
date Tue, 20 Jun 2023 20:03:09 +0000
parents 519e0835abd7
children
comparison
equal deleted inserted replaced
0:519e0835abd7 1:f329328da134
13 13
14 ##set input 14 ##set input
15 #if $library.type == 'paired': 15 #if $library.type == 'paired':
16 #set input_1 = $library.input_1 16 #set input_1 = $library.input_1
17 #set input_2 = $library.input_2 17 #set input_2 = $library.input_2
18
19 ## tool needs a file ending with gz to work
20 #if $library.input_1.datatype.file_ext.endswith("gz"):
21 ln -s '$input_1' input_1.gz &&
22 ln -s '$input_2' input_2.gz &&
23 #set input_1 = 'input_1.gz'
24 #set input_2 = 'input_2.gz'
25 #end if
26
18 #else if $library.type == 'paired_collection' 27 #else if $library.type == 'paired_collection'
19 #set input_1 = $library.input_1.forward 28 #set input_1 = $library.input_1.forward
20 #set input_2 = $library.input_1.reverse 29 #set input_2 = $library.input_1.reverse
30
31 ## tool needs a file ending with gz to work
32 #if $library.input_1.forward.datatype.file_ext.endswith("gz"):
33 ln -s '$input_1' input_1.gz &&
34 ln -s '$input_2' input_2.gz &&
35 #set input_1 = 'input_1.gz'
36 #set input_2 = 'input_2.gz'
37 #end if
38
39
21 #else 40 #else
22 #set input_1 = $library.input_1 41 #set input_1 = $library.input_1
42
43 ## tool needs a file ending with gz to work
44 #if $library.input_1.datatype.file_ext.endswith("gz"):
45 ln -s '$input_1' input_1.gz &&
46 #set input_1 = 'input_1.gz'
47 #end if
48
23 #end if 49 #end if
24 50
25 ## name output according to --fastq_output param 51 ## name output according to --fastq_output param
26 ## tests fails if file does not have correct ending 52 ## tests fails if file does not have correct ending
27 #if str($fastq_output) == '': 53 #if str($fastq_output) == '':
29 #set temp_output_2 = 'output_2.fasta' 55 #set temp_output_2 = 'output_2.fasta'
30 #else: 56 #else:
31 #set temp_output_1 = 'output_1.fastq' 57 #set temp_output_1 = 'output_1.fastq'
32 #set temp_output_2 = 'output_2.fastq' 58 #set temp_output_2 = 'output_2.fastq'
33 #end if 59 #end if
34
35 ## do not quote $taxid 60 ## do not quote $taxid
36 extract_kraken_reads.py 61 extract_kraken_reads.py
37 -k '$results' 62 -k '$results'
38 -s '$input_1' 63 -s '$input_1'
39 -o '$temp_output_1' 64 -o '$temp_output_1'
74 <option value="paired_collection"> 99 <option value="paired_collection">
75 Paired Collection 100 Paired Collection
76 </option> 101 </option>
77 </param> 102 </param>
78 <when value="single"> 103 <when value="single">
79 <param name="input_1" format="fastq,fasta" type="data" label="FASTQ/A file" help="FASTQ or FASTQ input reads (may be gzipped)" /> 104 <param name="input_1" format="fastq,fasta,fastq.gz,fasta.gz" type="data" label="FASTQ/A file" help="FASTQ or FASTQ input reads (may be gzipped)" />
80 </when> 105 </when>
81 <when value="paired"> 106 <when value="paired">
82 <param name="input_1" format="fastq,fasta" type="data" label="FASTQ/A forward file" help="FASTQ or FASTQ input reads (may be gzipped)" /> 107 <param name="input_1" format="fastq,fasta,fastq.gz,fasta.gz" type="data" label="FASTQ/A forward file" help="FASTQ or FASTQ input reads (may be gzipped)" />
83 <param name="input_2" format="fastq,fasta" type="data" label="FASTQ/A reverse file" help="FASTQ or FASTQ input reads (for paired reads, may be gzipped)" /> 108 <param name="input_2" format="fastq,fasta,fastq.gz,fasta.gz" type="data" label="FASTQ/A reverse file" help="FASTQ or FASTQ input reads (for paired reads, may be gzipped)" />
84 </when> 109 </when>
85 <when value="paired_collection"> 110 <when value="paired_collection">
86 <param name="input_1" format="fastq,fasta" type="data_collection" collection_type="paired" label="Paired Collection" help="FASTQ or FASTA read pair collection (may be gzipped)" /> 111 <param name="input_1" format="fastq,fasta,fastq.gz,fasta.gz" type="data_collection" collection_type="paired" label="Paired Collection" help="FASTQ or FASTA read pair collection (may be gzipped)" />
87 </when> 112 </when>
88 </conditional> 113 </conditional>
89 <param name="results" argument="-k" format="tabular" type="data" label="Results" help="Results (classification) file from Kraken/KrakenUniq/Kraken2" /> 114 <param name="results" argument="-k" format="tabular" type="data" label="Results" help="Results (classification) file from Kraken/KrakenUniq/Kraken2" />
90 <param argument="--report" format="tabular" type="data" label="Report" optional="true" help="Report file from Kraken/KrakenUniq/Kraken2" /> 115 <param argument="--report" format="tabular" type="data" label="Report" optional="true" help="Report file from Kraken/KrakenUniq/Kraken2" />
91 <param argument="--taxid" type="text" value="" label="Taxonomic ID(s) to match" help="Space-delimited list of taxonomic IDs for which to extract matching reads"> 116 <param argument="--taxid" type="text" value="" label="Taxonomic ID(s) to match" help="Space-delimited list of taxonomic IDs for which to extract matching reads">
127 </change_format> 152 </change_format>
128 </data> 153 </data>
129 </collection> 154 </collection>
130 </outputs> 155 </outputs>
131 <tests> 156 <tests>
132 <!-- test Kraken2 input, single input --> 157 <!-- test Kraken2 input, single input, unzipped -->
133 <test expect_num_outputs="1"> 158 <test expect_num_outputs="1">
134 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 159 <param name="input_1" value="extract_kraken_reads/R1.fq" ftype="fastq" />
160 <param name="library|type" value="single" />
161 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
162 <param name="taxid" value="11176" />
163 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fa" decompress="true" ftype="fasta.gz" />
164 </test>
165 <!-- test Kraken2 input, single input, zipped -->
166 <test expect_num_outputs="1">
167 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
135 <param name="library|type" value="single" /> 168 <param name="library|type" value="single" />
136 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 169 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
137 <param name="taxid" value="11176" /> 170 <param name="taxid" value="11176" />
138 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fa" decompress="true" ftype="fasta.gz" /> 171 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fa" decompress="true" ftype="fasta.gz" />
139 </test> 172 </test>
140 <!-- test paired input --> 173 <!-- test paired input -->
141 <test expect_num_outputs="2"> 174 <test expect_num_outputs="2">
142 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 175 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
143 <param name="input_2" value="extract_kraken_reads/R2.fq.gz" ftype="fastqsanger" /> 176 <param name="input_2" value="extract_kraken_reads/R2.fq.gz" ftype="fastq.gz" />
144 <param name="library|type" value="paired" /> 177 <param name="library|type" value="paired" />
145 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 178 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
146 <param name="taxid" value="11176" /> 179 <param name="taxid" value="11176" />
147 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fa" decompress="true" ftype="fasta.gz" /> 180 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fa" decompress="true" ftype="fasta.gz" />
148 <output name="output_2" file="extract_kraken_reads/out2.k2.11176.fa" decompress="true" ftype="fasta.gz" /> 181 <output name="output_2" file="extract_kraken_reads/out2.k2.11176.fa" decompress="true" ftype="fasta.gz" />
149 </test> 182 </test>
150 <!-- test paired collection input --> 183 <!-- test paired collection input -->
151 <test expect_num_outputs="3"> 184 <test expect_num_outputs="3">
152 <param name="input_1"> 185 <param name="input_1">
153 <collection type="paired"> 186 <collection type="paired">
154 <element name="forward" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 187 <element name="forward" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
155 <element name="reverse" value="extract_kraken_reads/R2.fq.gz" ftype="fastqsanger" /> 188 <element name="reverse" value="extract_kraken_reads/R2.fq.gz" ftype="fastq.gz" />
156 </collection> 189 </collection>
157 </param> 190 </param>
158 <param name="library|type" value="paired_collection" /> 191 <param name="library|type" value="paired_collection" />
159 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 192 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
160 <param name="taxid" value="11176" /> 193 <param name="taxid" value="11176" />
163 <element name="reverse" file="extract_kraken_reads/out2.k2.11176.fa" decompress="true" ftype="fasta.gz" /> 196 <element name="reverse" file="extract_kraken_reads/out2.k2.11176.fa" decompress="true" ftype="fasta.gz" />
164 </output_collection> 197 </output_collection>
165 </test> 198 </test>
166 <!-- test Kraken1 input, include children --> 199 <!-- test Kraken1 input, include children -->
167 <test expect_num_outputs="1"> 200 <test expect_num_outputs="1">
168 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 201 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
169 <param name="library|type" value="single" /> 202 <param name="library|type" value="single" />
170 <param name="results" value="extract_kraken_reads/kraken1.results" ftype="tabular" /> 203 <param name="results" value="extract_kraken_reads/kraken1.results" ftype="tabular" />
171 <param name="report" value="extract_kraken_reads/kraken1.report" ftype="tabular" /> 204 <param name="report" value="extract_kraken_reads/kraken1.report" ftype="tabular" />
172 <param name="taxid" value="11176" /> 205 <param name="taxid" value="11176" />
173 <param name="include_children" value="True" /> 206 <param name="include_children" value="True" />
174 <output name="output_1" file="extract_kraken_reads/out1.k1.11176.children.fa" decompress="true" ftype="fasta.gz" /> 207 <output name="output_1" file="extract_kraken_reads/out1.k1.11176.children.fa" decompress="true" ftype="fasta.gz" />
175 </test> 208 </test>
176 <!-- test exclude --> 209 <!-- test exclude -->
177 <test expect_num_outputs="1"> 210 <test expect_num_outputs="1">
178 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 211 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
179 <param name="library|type" value="single" /> 212 <param name="library|type" value="single" />
180 <param name="results" value="extract_kraken_reads/kraken1.results" ftype="tabular" /> 213 <param name="results" value="extract_kraken_reads/kraken1.results" ftype="tabular" />
181 <param name="report" value="extract_kraken_reads/kraken1.report" ftype="tabular" /> 214 <param name="report" value="extract_kraken_reads/kraken1.report" ftype="tabular" />
182 <param name="taxid" value="10386" /> 215 <param name="taxid" value="10386" />
183 <param name="include_children" value="True" /> 216 <param name="include_children" value="True" />
184 <param name="exclude" value="True" /> 217 <param name="exclude" value="True" />
185 <output name="output_1" file="extract_kraken_reads/out1.k1.e10386.children.fa" decompress="true" ftype="fasta.gz" /> 218 <output name="output_1" file="extract_kraken_reads/out1.k1.e10386.children.fa" decompress="true" ftype="fasta.gz" />
186 </test> 219 </test>
187 <!-- test max --> 220 <!-- test max -->
188 <test expect_num_outputs="1"> 221 <test expect_num_outputs="1">
189 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 222 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
190 <param name="library|type" value="single" /> 223 <param name="library|type" value="single" />
191 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 224 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
192 <param name="taxid" value="11176" /> 225 <param name="taxid" value="11176" />
193 <param name="max" value="2" /> 226 <param name="max" value="2" />
194 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.max2.fa" decompress="true" ftype="fasta.gz" /> 227 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.max2.fa" decompress="true" ftype="fasta.gz" />
195 </test> 228 </test>
196 <!-- test include parents --> 229 <!-- test include parents -->
197 <test expect_num_outputs="1"> 230 <test expect_num_outputs="1">
198 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 231 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
199 <param name="library|type" value="single" /> 232 <param name="library|type" value="single" />
200 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 233 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
201 <param name="taxid" value="11176" /> 234 <param name="taxid" value="11176" />
202 <param name="include_parents" value="True" /> 235 <param name="include_parents" value="True" />
203 <param name="report" value="extract_kraken_reads/kraken2.report" ftype="tabular" /> 236 <param name="report" value="extract_kraken_reads/kraken2.report" ftype="tabular" />
204 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.parents.fa" decompress="true" ftype="fasta.gz" /> 237 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.parents.fa" decompress="true" ftype="fasta.gz" />
205 </test> 238 </test>
206 <!-- test multiple tax IDs --> 239 <!-- test multiple tax IDs -->
207 <test expect_num_outputs="1"> 240 <test expect_num_outputs="1">
208 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 241 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
209 <param name="library|type" value="single" /> 242 <param name="library|type" value="single" />
210 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 243 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
211 <param name="taxid" value="10386 11176" /> 244 <param name="taxid" value="10386 11176" />
212 <param name="exclude" value="True" /> 245 <param name="exclude" value="True" />
213 <param name="include_parents" value="True" /> 246 <param name="include_parents" value="True" />
214 <param name="report" value="extract_kraken_reads/kraken2.report" ftype="tabular" /> 247 <param name="report" value="extract_kraken_reads/kraken2.report" ftype="tabular" />
215 <output name="output_1" file="extract_kraken_reads/out1.k2.exclude_both.fa" decompress="true" ftype="fasta.gz" /> 248 <output name="output_1" file="extract_kraken_reads/out1.k2.exclude_both.fa" decompress="true" ftype="fasta.gz" />
216 </test> 249 </test>
217 <!-- test multiple tax IDs --> 250 <!-- test multiple tax IDs -->
218 <test expect_failure="true"> 251 <test expect_failure="true">
219 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 252 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
220 <param name="library|type" value="single" /> 253 <param name="library|type" value="single" />
221 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 254 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
222 <param name="taxid" value="10386 f5" /> 255 <param name="taxid" value="10386 f5" />
223 </test> 256 </test>
224 <!-- test FASTQ output --> 257 <!-- test FASTQ output -->
225 <test expect_num_outputs="1"> 258 <test expect_num_outputs="1">
226 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastqsanger" /> 259 <param name="input_1" value="extract_kraken_reads/R1.fq.gz" ftype="fastq.gz" />
227 <param name="library|type" value="single" /> 260 <param name="library|type" value="single" />
228 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" /> 261 <param name="results" value="extract_kraken_reads/kraken2.results" ftype="tabular" />
229 <param name="taxid" value="11176" /> 262 <param name="taxid" value="11176" />
230 <param name="fastq_output" value="true" /> 263 <param name="fastq_output" value="true" />
231 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fq" decompress="true" ftype="fastq.gz" /> 264 <output name="output_1" file="extract_kraken_reads/out1.k2.11176.fq" decompress="true" ftype="fastq.gz" />