Mercurial > repos > iuc > coverm_genome
comparison coverm_genome.xml @ 1:a671907f96fe draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tools/coverm commit 2388df7187533fb66b7729730340d2eb7b93c112
author | iuc |
---|---|
date | Tue, 24 Jan 2023 12:32:54 +0000 |
parents | 134e4e78e754 |
children | 5bf5792b0996 |
comparison
equal
deleted
inserted
replaced
0:134e4e78e754 | 1:a671907f96fe |
---|---|
1 <tool id="coverm_genome" name="CoverM-GENOME" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" python_template_version="3.5"> | 1 <tool id="coverm_genome" name="CoverM genome" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
2 <description>read coverage and relative abundance calculator focused on metagenomics applications</description> | 2 <description>Calculate coverage of individual genomes</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
7 <command><![CDATA[ | 7 <command><![CDATA[ |
133 #set $fname = $input_file.element_identifier.replace(" ","_") | 133 #set $fname = $input_file.element_identifier.replace(" ","_") |
134 #set $file_path = 'reference/' + $fname | 134 #set $file_path = 'reference/' + $fname |
135 ln -s '$input_file' '$file_path' && | 135 ln -s '$input_file' '$file_path' && |
136 $ref_files.append($file_path) | 136 $ref_files.append($file_path) |
137 #end for | 137 #end for |
138 #if $reads.genome.add_genome.add_genome | 138 #if $reads.genome.add_genome.add_genome == "true" |
139 mkdir -p genomes && | 139 mkdir -p genomes && |
140 #set genome_files = [] | 140 #set genome_files = [] |
141 #if $reads.genome.add_genome.add_genomic == "history" | 141 #if $reads.genome.add_genome.add_genomic == "history" |
142 #for $input_file in $reads.genome.add_genome.add_genomic.fasta_history | 142 #for $input_file in $reads.genome.add_genome.add_genomic.fasta_history |
143 #set $fname = $input_file.element_identifier.replace(" ","_") | 143 #set $fname = $input_file.element_identifier.replace(" ","_") |
154 $genome_files.append($file_path) | 154 $genome_files.append($file_path) |
155 #end for | 155 #end for |
156 #end if | 156 #end if |
157 #end if | 157 #end if |
158 #end if | 158 #end if |
159 | 159 |
160 mkdir ./representative-fasta/ && | |
160 coverm genome | 161 coverm genome |
161 #if $reads.read_type == 'paired' | 162 #if $reads.read_type == 'paired' |
162 -1 | 163 -1 |
163 #for $read in $fw_reads1 | 164 #for $read in $fw_reads1 |
164 '${read}' | 165 '${read}' |
238 #else | 239 #else |
239 #if $reads.genome.cond_single_genome.separator | 240 #if $reads.genome.cond_single_genome.separator |
240 -s "$reads.genome.cond_single_genome.separator" | 241 -s "$reads.genome.cond_single_genome.separator" |
241 #end if | 242 #end if |
242 #end if | 243 #end if |
243 #if $reads.genome.add_genome.add_genome | 244 #if $reads.genome.add_genome.add_genome == "true" |
244 -f | 245 -f |
245 #for $genome in $genome_files | 246 #for $genome in $genome_files |
246 '${genome}' | 247 '${genome}' |
247 #end for | 248 #end for |
248 #end if | 249 #end if |
253 $reads.genome.single_genome | 254 $reads.genome.single_genome |
254 #end if | 255 #end if |
255 | 256 |
256 $derep.dereplicate | 257 $derep.dereplicate |
257 #if $derep.checkm_tab_table: | 258 #if $derep.checkm_tab_table: |
258 --chekm-tab-table $derep.checkm_tab_table | 259 --chekm-tab-table '$derep.checkm_tab_table' |
259 #end if | 260 #end if |
260 #if $derep.genome_info: | 261 #if $derep.genome_info: |
261 --genome-info $derep.genome_info | 262 --genome-info '$derep.genome_info' |
262 #end if | 263 #end if |
263 #if $derep.min_completeness: | 264 #if $derep.min_completeness != "": |
264 --min-completeness $derep.min_completeness | 265 --min-completeness $derep.min_completeness |
265 #end if | 266 #end if |
266 #if $derep.max_contamination: | 267 #if $derep.max_contamination != "": |
267 --max-contamination $derep.max_contamination | 268 --max-contamination $derep.max_contamination |
268 #end if | 269 #end if |
269 #if $derep.dereplication_ani: | 270 #if $derep.dereplication_ani != "": |
270 --dereplication-ani $derep.dereplication_ani | 271 --dereplication-ani $derep.dereplication_ani |
271 #end if | 272 #end if |
272 #if $derep.dereplication_aligned_fraction: | 273 #if $derep.dereplication_aligned_fraction != "": |
273 --dereplication-aligned-fraction $derep.dereplication_aligned_fraction | 274 --dereplication-aligned-fraction $derep.dereplication_aligned_fraction |
274 #end if | 275 #end if |
275 #if $derep.dereplication_fragment_length: | 276 #if $derep.dereplication_fragment_length != "": |
276 --dereplication-fragment-length $derep.dereplication_fragment_length | 277 --dereplication-fragment-length $derep.dereplication_fragment_length |
277 #end if | 278 #end if |
278 #if $derep.dereplication_prethreshold_ani: | 279 #if $derep.dereplication_prethreshold_ani != "": |
279 --dereplication-prethreshold-ani $derep.dereplication_prethreshold_ani | 280 --dereplication-prethreshold-ani $derep.dereplication_prethreshold_ani |
280 #end if | 281 #end if |
281 #if $derep.dereplication_quality_formula: | 282 #if $derep.dereplication_quality_formula: |
282 --dereplication-quality-formula $derep.dereplication_quality_formula | 283 --dereplication-quality-formula $derep.dereplication_quality_formula |
283 #end if | 284 #end if |
313 $mapping.exclude_supplementary | 314 $mapping.exclude_supplementary |
314 | 315 |
315 --methods $cov.relative_abundance $cov.mean $cov.cond_methods.trimmed_mean $cov.covered_bases $cov.covered_fraction | 316 --methods $cov.relative_abundance $cov.mean $cov.cond_methods.trimmed_mean $cov.covered_bases $cov.covered_fraction |
316 $cov.variance $cov.length $cov.count $cov.metabat $cov.coverage_histogram $cov.reads_per_base | 317 $cov.variance $cov.length $cov.count $cov.metabat $cov.coverage_histogram $cov.reads_per_base |
317 $cov.rpkm $cov.tpm | 318 $cov.rpkm $cov.tpm |
318 #if $cov.min_covered_fraction: | 319 #if $cov.min_covered_fraction != "": |
319 --min-covered-fraction $cov.min_covered_fraction | 320 --min-covered-fraction $cov.min_covered_fraction |
320 #end if | 321 #end if |
321 #if $cov.contig_end_exclusion: | 322 #if $cov.contig_end_exclusion != "": |
322 --contig-end-exclusion $cov.contig_end_exclusion | 323 --contig-end-exclusion $cov.contig_end_exclusion |
323 #end if | 324 #end if |
324 #if $cov.cond_methods.trimmed_mean | 325 #if $cov.cond_methods.trimmed_mean == "trimmed_mean" |
325 #if $cov.cond_methods.trim_min: | 326 #if $cov.cond_methods.trim_min: |
326 --trim-min $cov.cond_methods.trim_min | 327 --trim-min $cov.cond_methods.trim_min |
327 #end if | 328 #end if |
328 #if $cov.cond_methods.trim_max: | 329 #if $cov.cond_methods.trim_max: |
329 --trim_max $cov.cond_methods.trim_max | 330 --trim_max $cov.cond_methods.trim_max |
332 | 333 |
333 #if $out.output_format: | 334 #if $out.output_format: |
334 --output-format $out.output_format | 335 --output-format $out.output_format |
335 #end if | 336 #end if |
336 #if $out.dereplication_output_cluster_definition: | 337 #if $out.dereplication_output_cluster_definition: |
337 --dereplication-output-cluster-definition | 338 --dereplication-output-cluster-definition '$cluster_definition' |
338 #end if | 339 #end if |
339 #if $out.dereplication_output_representative_fasta_directory_copy: | 340 #if $out.dereplication_output_representative_fasta_directory_copy: |
340 --dereplication-output-representative-fasta-directory-copy . | 341 --dereplication-output-representative-fasta-directory-copy ./representative-fasta/ |
341 #end if | 342 #end if |
342 $out.no_zeros | 343 $out.no_zeros |
343 --output-file output.tsv | 344 --output-file output.tsv |
344 --threads \${GALAXY_SLOTS:-1} | 345 --threads \${GALAXY_SLOTS:-1} |
345 2> stdout.txt | 346 |
347 #if $derep.dereplicate and $out.dereplication_output_cluster_definition | |
348 && sed -i -e 's@genomes/@@g; s/\.fna//g' '$cluster_definition' | |
349 #end if | |
346 ]]></command> | 350 ]]></command> |
347 <inputs> | 351 <inputs> |
348 <expand macro="reads" /> | 352 <expand macro="reads" /> |
349 <expand macro="add_reads" /> | 353 <expand macro="add_reads" /> |
350 <section name="derep" title="Dereplication options" expanded="false"> | 354 <section name="derep" title="Dereplication options" expanded="false"> |
392 <expand macro="coverage"/> | 396 <expand macro="coverage"/> |
393 <expand macro="out"/> | 397 <expand macro="out"/> |
394 </inputs> | 398 </inputs> |
395 <outputs> | 399 <outputs> |
396 <data name="output1" format="tsv" from_work_dir="./output.tsv"/> | 400 <data name="output1" format="tsv" from_work_dir="./output.tsv"/> |
397 <data name="cluster-definition" format="tsv"> | 401 <data name="cluster_definition" format="tsv" label="${tool.name} on ${on_string}: cluster definition"> |
398 <filter>out['dereplication_output_cluster_definition']</filter> | 402 <filter>derep['dereplicate'] and out['dereplication_output_cluster_definition']</filter> |
399 </data> | 403 </data> |
404 <collection name="representative_fasta" type="list" label="${tool.name} on ${on_string}: representative fasta"> | |
405 <discover_datasets pattern="(?P<designation>.*)\.fna" format="fasta" directory="representative-fasta" /> | |
406 <filter>derep['dereplicate'] and out['dereplication_output_representative_fasta_directory_copy']</filter> | |
407 </collection> | |
400 </outputs> | 408 </outputs> |
401 <tests> | 409 <tests> |
402 <test> | 410 <test expect_num_outputs="1"> |
403 <conditional name="reads"> | 411 <conditional name="reads"> |
404 <param name="read_type" value="paired_collection"/> | 412 <param name="read_type" value="paired_collection"/> |
405 <param name="paired_reads"> | 413 <param name="paired_reads"> |
406 <collection type="list:paired"> | 414 <collection type="list:paired"> |
407 <element name="reads_for_seq1_and_seq2..fq"> | 415 <element name="reads_for_seq1_and_seq2..fq"> |
487 <assert_contents> | 495 <assert_contents> |
488 <has_n_lines n="2"/> | 496 <has_n_lines n="2"/> |
489 </assert_contents> | 497 </assert_contents> |
490 </output> | 498 </output> |
491 </test> | 499 </test> |
492 <test expect_num_outputs="1"> | 500 <test expect_num_outputs="3"> |
493 <conditional name="reads"> | 501 <conditional name="reads"> |
494 <param name="read_type" value="paired_collection"/> | 502 <param name="read_type" value="paired_collection"/> |
495 <param name="paired_reads"> | 503 <param name="paired_reads"> |
496 <collection type="list:paired"> | 504 <collection type="list:paired"> |
497 <element name="reads_for_genome2"> | 505 <element name="reads_for_genome2"> |
511 </conditional> | 519 </conditional> |
512 </conditional> | 520 </conditional> |
513 <section name="cov"> | 521 <section name="cov"> |
514 <param name="mean" value="true"/> | 522 <param name="mean" value="true"/> |
515 </section> | 523 </section> |
524 <section name="derep"> | |
525 <param name="dereplicate" value="true"/> | |
526 </section> | |
527 <section name="out"> | |
528 <param name="dereplication_output_cluster_definition" value="true"/> | |
529 <param name="dereplication_output_representative_fasta_directory_copy" value="true"/> | |
530 </section> | |
516 <output name="output1" file="test3.tsv" ftype="tsv"/> | 531 <output name="output1" file="test3.tsv" ftype="tsv"/> |
532 <output name="cluster_definition" ftype="tsv" value="test4_cluster.tsv"/> | |
533 <output_collection name="representative_fasta" type="list" count="3"> | |
534 <element name="genome1" file="test4_rep1.fa" ftype="fasta" /> | |
535 <element name="genome2" file="test4_rep2.fa" ftype="fasta" /> | |
536 <element name="genome3" file="test4_rep3.fa" ftype="fasta" /> | |
537 </output_collection> | |
517 </test> | 538 </test> |
518 <test expect_num_outputs="1"> | 539 <test expect_num_outputs="1"> |
519 <conditional name="reads"> | 540 <conditional name="reads"> |
520 <param name="read_type" value="bam"/> | 541 <param name="read_type" value="bam"/> |
521 <param name="bam" value="2seqs.bad_read.1.with_supplementary.bam"/> | 542 <param name="bam" value="2seqs.bad_read.1.with_supplementary.bam"/> |