Mercurial > repos > iuc > polypolish
comparison polypolish.xml @ 1:bd2a15dbcea1 draft
planemo upload for repository https://github.com/mesocentre-clermont-auvergne/galaxy-tools/tree/master/tools/polypolish commit afc3449a0b68d43fd1179543815dfe23b951e157
author | iuc |
---|---|
date | Fri, 20 Oct 2023 12:41:27 +0000 |
parents | aaa868913641 |
children | f355085dd2aa |
comparison
equal
deleted
inserted
replaced
0:aaa868913641 | 1:bd2a15dbcea1 |
---|---|
12 ln -s '$input.fasta_file' input_data && | 12 ln -s '$input.fasta_file' input_data && |
13 #*====================================== | 13 #*====================================== |
14 For single SAM | 14 For single SAM |
15 ======================================*# | 15 ======================================*# |
16 #if $input.sam_data_type.sam_selector == 'single' | 16 #if $input.sam_data_type.sam_selector == 'single' |
17 #if $input.sam_data_type.single_sam.ext == 'unsorted.bam' | 17 #if $input.sam_data_type.single_sam.is_of_type("unsorted.bam") |
18 samtools view -h $input.sam_data_type.single_sam > input_sam && | 18 samtools view -h $input.sam_data_type.single_sam > input_sam && |
19 #elif $input.sam_data_type.single_sam.ext == 'sam' | 19 #elif $input.sam_data_type.single_sam.ext == 'sam' |
20 ln -s $input.sam_data_type.single_sam input_sam && | 20 ln -s $input.sam_data_type.single_sam input_sam && |
21 #else | |
22 echo "${input.sam_data_type.single_sam} not a sam/bam file" | |
21 #end if | 23 #end if |
22 polypolish input_data input_sam > '$polished_fasta' | 24 polypolish input_data input_sam > '$polished_fasta' |
23 #*====================================== | 25 #*====================================== |
24 For paired SAM | 26 For paired SAM |
25 ======================================*# | 27 ======================================*# |
26 #elif $input.sam_data_type.sam_selector == 'paired' | 28 #elif $input.sam_data_type.sam_selector == 'paired' |
27 #if $input.sam_data_type.R1_sam.ext == 'unsorted.bam' | 29 #if $input.sam_data_type.R1_sam.is_of_type("unsorted.bam") |
28 samtools view -h $input.sam_data_type.R1_sam > sample_R1.sam && | 30 samtools view -h $input.sam_data_type.R1_sam > sample_R1.sam && |
29 #elif $input.sam_data_type.R1_sam.ext == 'sam' | 31 #elif $input.sam_data_type.R1_sam.ext == 'sam' |
30 ln -s '$input.sam_data_type.R1_sam' sample_R1.sam && | 32 ln -s '$input.sam_data_type.R1_sam' sample_R1.sam && |
33 #else | |
34 echo "${input.sam_data_type.single_sam} not a sam/bam file" | |
31 #end if | 35 #end if |
32 #if $input.sam_data_type.R2_sam.ext == 'unsorted.bam' | 36 #if $input.sam_data_type.R2_sam.is_of_type("unsorted.bam") |
33 samtools view -h $input.sam_data_type.R2_sam > sample_R2.sam && | 37 samtools view -h $input.sam_data_type.R2_sam > sample_R2.sam && |
34 #elif $input.sam_data_type.R2_sam.ext == 'sam' | 38 #elif $input.sam_data_type.R2_sam.ext == 'sam' |
35 ln -s '$input.sam_data_type.R2_sam' sample_R2.sam && | 39 ln -s '$input.sam_data_type.R2_sam' sample_R2.sam && |
40 #else | |
41 echo "${input.sam_data_type.single_sam} not a sam/bam file" | |
36 #end if | 42 #end if |
37 #if $input.sam_data_type.insert_filter.filter_select == 'filter' | 43 #if $input.sam_data_type.insert_filter.filter_select == 'filter' |
38 polypolish_insert_filter.py --low '$input.sam_data_type.insert_filter.low' | 44 polypolish_insert_filter.py --low '$input.sam_data_type.insert_filter.low' |
39 --high '$input.sam_data_type.insert_filter.high' | 45 --high '$input.sam_data_type.insert_filter.high' |
40 --in1 sample_R1.sam | 46 --in1 sample_R1.sam |
49 For multiple single-end SAM | 55 For multiple single-end SAM |
50 ======================================*# | 56 ======================================*# |
51 #elif $input.sam_data_type.sam_selector == 'multiple_single' | 57 #elif $input.sam_data_type.sam_selector == 'multiple_single' |
52 mkdir single_collection && | 58 mkdir single_collection && |
53 #for $value, $single_sam in enumerate($input.sam_data_type.single_collection): | 59 #for $value, $single_sam in enumerate($input.sam_data_type.single_collection): |
54 #if $single_sam.ext == 'unsorted.bam' | 60 #if $single_sam.is_of_type("unsorted.bam") |
55 samtools view -h $single_sam > 'single_collection/$(single_sam.element_identifier).sam' && | 61 samtools view -h $single_sam > 'single_collection/$(single_sam.element_identifier).sam' && |
56 #elif $single_sam.ext == 'sam' | 62 #elif $single_sam.ext == 'sam' |
57 ln -s $single_sam 'single_collection/$(single_sam.element_identifier).$(single_sam.ext)' && | 63 ln -s $single_sam 'single_collection/$(single_sam.element_identifier).$(single_sam.ext)' && |
64 #else | |
65 echo "${single_sam} is not a sam/bam file" | |
58 #end if | 66 #end if |
59 #end for | 67 #end for |
60 polypolish input_data single_collection/*.sam > '$polished_fasta' | 68 polypolish input_data single_collection/*.sam > '$polished_fasta' |
61 #*====================================== | 69 #*====================================== |
62 For multiple paired-end SAM | 70 For multiple paired-end SAM |
63 ======================================*# | 71 ======================================*# |
64 #elif $input.sam_data_type.sam_selector == "multiple_paired" | 72 #elif $input.sam_data_type.sam_selector == "multiple_paired" |
65 mkdir paired_collection && | 73 mkdir paired_collection && |
66 #for $value, $paired_sam in enumerate($input.sam_data_type.paired_collection): | 74 #for $value, $paired_sam in enumerate($input.sam_data_type.paired_collection): |
67 #if $paired_sam.forward.ext == 'unsorted.bam' | 75 #if $paired_sam.forward.is_of_type("unsorted.bam") |
68 samtools view -h $paired_sam.forward > 'paired_collection/forward_input$(value)$(paired_sam.forward.element_identifier).sam' && | 76 samtools view -h $paired_sam.forward > 'paired_collection/forward_input$(value)$(paired_sam.forward.element_identifier).sam' && |
69 #else | 77 #else |
70 ln -s '$paired_sam.forward' 'paired_collection/forward_input$(value)$(paired_sam.forward.element_identifier).sam' && | 78 ln -s '$paired_sam.forward' 'paired_collection/forward_input$(value)$(paired_sam.forward.element_identifier).sam' && |
71 #end if | 79 #end if |
72 #if $paired_sam.reverse.ext == 'unsorted.bam' | 80 #if $paired_sam.reverse.is_of_type("unsorted.bam") |
73 samtools view -h $paired_sam.reverse > 'paired_collection/reverse_input$(value)$(paired_sam.reverse.element_identifier).sam' && | 81 samtools view -h $paired_sam.reverse > 'paired_collection/reverse_input$(value)$(paired_sam.reverse.element_identifier).sam' && |
74 #else | 82 #else |
75 ln -s '$paired_sam.reverse' 'paired_collection/reverse_input$(value)$(paired_sam.reverse.element_identifier).sam' && | 83 ln -s '$paired_sam.reverse' 'paired_collection/reverse_input$(value)$(paired_sam.reverse.element_identifier).sam' && |
76 #end if | 84 #end if |
77 #if $input.sam_data_type.insert_filter.filter_select == 'filter' | 85 #if $input.sam_data_type.insert_filter.filter_select == 'filter' |
133 <expand macro="filter_option"/> | 141 <expand macro="filter_option"/> |
134 </when> | 142 </when> |
135 </conditional> | 143 </conditional> |
136 </section> | 144 </section> |
137 <section name="options" title="Options" expanded="False"> | 145 <section name="options" title="Options" expanded="False"> |
138 <param name="min_depth" argument="--min_depth" type="integer" min="0" value="5" label="Minimal depth" | 146 <param argument="--min_depth" type="integer" min="0" value="5" label="Minimal depth" |
139 help="A base must occur at least this many times in the pileup to be considered valid [default: 5]"/> | 147 help="A base must occur at least this many times in the pileup to be considered valid [default: 5]"/> |
140 <param name="fraction_invalid" argument="--fraction_invalid" type="float" min="0" value="0.2" max="1" label="Minimal invalid fraction" | 148 <param argument="--fraction_invalid" type="float" min="0" value="0.2" max="1" label="Minimal invalid fraction" |
141 help="A base must make up less than this fraction of the read depth to be considered invalid [default: 0.2]"/> | 149 help="A base must make up less than this fraction of the read depth to be considered invalid [default: 0.2]"/> |
142 <param name="max_errors" argument="--max_errors" type="integer" min="0" value="10" label="Number of mismatch/indels to ignore alignments" | 150 <param argument="--max_errors" type="integer" min="0" value="10" label="Number of mismatch/indels to ignore alignments" |
143 help="Ignore alignments with more than this many mismatches and indels [default: 10]"/> | 151 help="Ignore alignments with more than this many mismatches and indels [default: 10]"/> |
144 <param name="fraction_valid" argument="--fraction_valid" type="float" min="0" value="0.5" max="1" label="Minimal valid fraction" | 152 <param argument="--fraction_valid" type="float" min="0" value="0.5" max="1" label="Minimal valid fraction" |
145 help="A base must make up at least this fraction of the read depth to be considered valid [default: 0.5"/> | 153 help="A base must make up at least this fraction of the read depth to be considered valid [default: 0.5"/> |
146 <param name="keep_logfile" type="boolean" truevalue="true" falsevalue="false" label="Keep log file"/> | 154 <param name="keep_logfile" type="boolean" truevalue="true" falsevalue="false" label="Keep log file"/> |
147 <param name="debug" argument="--debug" type="boolean" truevalue="true" falsevalue="false" label="Keep per base information file"/> | 155 <param argument="--debug" type="boolean" truevalue="true" falsevalue="false" label="Keep per base information file"/> |
148 </section> | 156 </section> |
149 </inputs> | 157 </inputs> |
150 <outputs> | 158 <outputs> |
151 <data name="polished_fasta" format="fasta" label="${tool.name} on ${on_string}: polished fasta"/> | 159 <data name="polished_fasta" format="fasta" label="${tool.name} on ${on_string}: polished fasta"/> |
152 <data name="debug_file" format="tabular" label="${tool.name} on ${on_string}: Per base informations"> | 160 <data name="debug_file" format="tabular" label="${tool.name} on ${on_string}: Per base informations"> |
341 <param name="fasta_file" value="contigs.fa"/> | 349 <param name="fasta_file" value="contigs.fa"/> |
342 <conditional name="sam_data_type"> | 350 <conditional name="sam_data_type"> |
343 <param name="sam_selector" value="multiple_single"/> | 351 <param name="sam_selector" value="multiple_single"/> |
344 <param name="single_collection"> | 352 <param name="single_collection"> |
345 <collection type="list"> | 353 <collection type="list"> |
346 <element name="R1_sam" value="aligned_test_file/alignement_R1.bam" ftype="unsorted.bam"/> | 354 <element name="R1_sam" value="aligned_test_file/alignement_R1.sam" ftype="sam"/> |
347 <element name="R1_bis_sam" value="aligned_test_file/alignement_R1_bis.bam" ftype="unsorted.bam"/> | 355 <element name="R1_bis_sam" value="aligned_test_file/alignement_R1_bis.sam" ftype="sam"/> |
348 <element name="R1_ter_sam" value="aligned_test_file/alignement_R1_ter.bam" ftype="unsorted.bam"/> | 356 <element name="R1_ter_sam" value="aligned_test_file/alignement_R1_ter.sam" ftype="sam"/> |
349 </collection> | 357 </collection> |
350 </param> | 358 </param> |
351 </conditional> | 359 </conditional> |
352 </section> | 360 </section> |
353 <section name="options"> | 361 <section name="options"> |
390 <param name="debug" value="false"/> | 398 <param name="debug" value="false"/> |
391 <param name="keep_logfile" value="false"/> | 399 <param name="keep_logfile" value="false"/> |
392 </section> | 400 </section> |
393 <output name="polished_fasta" value="polished.fasta"/> | 401 <output name="polished_fasta" value="polished.fasta"/> |
394 </test> | 402 </test> |
403 <!-- Test_12 Test with bam files --> | |
404 <test expect_num_outputs="1"> | |
405 <section name="input"> | |
406 <param name="fasta_file" value="contigs.fa"/> | |
407 <conditional name="sam_data_type"> | |
408 <param name="sam_selector" value="single"/> | |
409 <param name="single_sam" value="aligned_test_file/alignement_R1.bam"/> | |
410 </conditional> | |
411 </section> | |
412 <output name="polished_fasta" value="polished.fasta"/> | |
413 </test> | |
414 <!-- Test_13 paired bam --> | |
415 <test expect_num_outputs="2"> | |
416 <section name="input"> | |
417 <param name="fasta_file" value="contigs.fa"/> | |
418 <conditional name="sam_data_type"> | |
419 <param name="sam_selector" value="paired"/> | |
420 <param name="R1_sam" value="aligned_test_file/alignement_R1.bam"/> | |
421 <param name="R2_sam" value="aligned_test_file/alignement_R2.bam"/> | |
422 </conditional> | |
423 </section> | |
424 <section name="options"> | |
425 <param name="debug" value="true"/> | |
426 <param name="keep_logfile" value="false"/> | |
427 </section> | |
428 <output name="polished_fasta" value="polished.fasta"/> | |
429 <output name="debug_file" value="debug_file_test_2.tsv"/> | |
430 </test> | |
395 </tests> | 431 </tests> |
396 <help><![CDATA[ | 432 <help><![CDATA[ |
397 **What it does** | 433 **What it does** |
398 Polypolish is a tool for polishing genome assemblies with short reads. | 434 Polypolish is a tool for polishing genome assemblies with short reads. |
399 Polypolish uses SAM/BAM files where each read has been aligned to all possible locations (not just a single best location). | 435 Polypolish uses SAM/BAM files where each read has been aligned to all possible locations (not just a single best location). |
400 This allows it to repair errors in repeat regions that other alignment-based polishers cannot fix. | 436 This allows it to repair errors in repeat regions that other alignment-based polishers cannot fix. |
401 | 437 |
402 **Polypolish pipeline steps** | 438 **Polypolish pipeline steps** |
403 1. [Optional] Filter aligned reads | 439 1. [Optional] Filter aligned reads |
404 - Exclude some alignments based on their insert size | 440 Exclude some alignments based on their insert size |
405 - This should reduce the number of excessive alignments, particularly near the edges of repeat sequences, improving Polypolish's ability to fix errors in those regions. | 441 This should reduce the number of excessive alignments, |
442 particularly near the edges of repeat sequences, improving Polypolish's ability to fix errors in those regions. | |
406 2. Clean assembly with filtered reads | 443 2. Clean assembly with filtered reads |
444 | |
407 | 445 |
408 **Inputs** | 446 **Inputs** |
409 Polypolish need SAM/BAM input format obtain from aligner with option to keep all possible location | 447 Polypolish need SAM/BAM input format obtain from aligner with option to keep all possible location |
410 Polypolish take on or more assembly as input fasta. | 448 Polypolish take on or more assembly as input fasta. |
411 It need also raw data reads in single or paired-end SAM/BAM format. | 449 It need also raw data reads in single or paired-end SAM/BAM format. |
412 You can use multiple aligned data to polish the same assembly. | 450 You can use multiple aligned data to polish the same assembly. |
413 **WARNING It can only work if multiple location information is available in sam/bam files** | 451 **WARNING It can only work if multiple location information is available in sam/bam files** |
414 For example using bwa mem to align raw data before use, you need : | 452 For example using bwa mem to align raw data before use, you need : |
415 1. To align each read data independantly (also for paired data) | 453 1. To align each read data independantly (also for paired data) |
416 2. Set the option "Output all alignments for single-ends or unpaired paired-ends" in Select analysis mode>Set input/output options | 454 2. Set the option "Output all alignments for single-ends or unpaired paired-ends" in Select analysis mode>Set input/output options |
417 - This allow multiple ailgnemnt output need to use polypolish | 455 This allow multiple ailgnemnt output need to use polypolish |
418 | |
419 | |
420 ]]></help> | 456 ]]></help> |
421 <expand macro="citations"/> | 457 <expand macro="citations"/> |
422 </tool> | 458 </tool> |