Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent pilon from changing contig names after polishing #7

Closed
hkaspersen opened this issue Aug 11, 2022 · 9 comments · Fixed by #12
Closed

Prevent pilon from changing contig names after polishing #7

hkaspersen opened this issue Aug 11, 2022 · 9 comments · Fixed by #12

Comments

@hkaspersen
Copy link
Collaborator

hkaspersen commented Aug 11, 2022

When working on issue #5 I noticed that Pilon changes the contig headers in the resulting fasta file. This is unfortunate due to the "circular=true" and depth information that Unicycler provides in the headers.

Asked for help on the Pilon github:
broadinstitute/pilon#151

@hkaspersen hkaspersen reopened this Dec 19, 2023
@hkaspersen hkaspersen linked a pull request Jan 3, 2024 that will close this issue
@hkaspersen
Copy link
Collaborator Author

Pilon will not be implemented in this pipeline.

@Isoris
Copy link

Isoris commented Oct 15, 2024

I am sorry to ask but would it be possible to 1. add the full contig name to the polished fasta headers. and also get the consensus polished sequence instead of many contigs ?

Thank you in advance. it is quite basic and would be valuable to PILON.
Quentin.


Writing HiC_scaffold_27_hap2:20462918-20463189 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20463007-20463247 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20463007-20463247 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20463060-20463301 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20463060-20463301 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20463108-20463348 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20463108-20463348 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20464881-20465112 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20464881-20465112 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta

>HiC_scaffold_27_hap2_pilon
ACATGCATGCAATGGGCCTAATGTGCATGTTGTGAGAAAACCAGTCATATGTACGTAATGTAGCTCTGTGTATGTGGCTG
TGAAATGTACGCGATGCCAGCTAGGCAGCAAAAATTGTTAAATTCTGTGGCAGGAGGCTGTTTATCTGTTTCAGGTGGGA
AATAATAATAATCATAACCAGATGTGAGAATATTTTAAACATTTGATACACCAATGAGCTGGACGGCTGTAATTATAACA
>HiC_scaffold_27_hap2_pilon
TGTGTGACTGTGACCAGACCTGTTATCTCTCCTCTTTTGCTCTCCCCTCTCCTGTTCTCTCTCCCACTCTCCCCCTTTCT
CTGTCTCTGTCGAGCTACACATGTCGTTCCTGAGCTGCCATTGATTCAGACCCCCTCTGCCCTCTGGACCTGCCTGACTC
ATCCTGGTGCCCCGCTTCTGGTTGGAGATCTCGTCACATGGATGTCCCGTGTGTCTCTTTGGGATATGTGGGTCC
>HiC_scaffold_27_hap2_pilon
CTATAAAGTTTGGGGATTGGGAAATTATTCATGTTTAATTTATCTGTTAATTTTAACCTTTGAACAGACGTTTTATAATT

...


##fileformat=VCFv4.1
##fileDate=20241016
##source="Pilon version 1.24 Thu Jan 28 13:00:45 2021 -0500"
##PILON="--genome HiC_scaffold_27_hap2.fa --frags short_reads_scaffold27.bam --bam /project/lt200308-agbsci/01-catfish_assembly/04-polish/01-PilonCMA/03-QV_mercury/asm.Hap2.polish3.renamed.fa.hifireads.sorted.bam --bam HiC_scaffold_27_hap2.ont_aligned.sorted.bam --targets /project/lt200308-agbsci/01-catfish_assembly/04-polish/01-PilonCMA/asm.Hap2.polish3.renamed_only.bed.chr27.targets.bed --output polished_assembly_hap2_scf27 --fix all --vcf --diploid --minmq 30 --minqual 30 --changes --tracks --verbose"
##reference=file:/lustrefs/disk/project/lt200308-agbsci/01-catfish_assembly/04-polish/01-PilonCMA/HiC_scaffold_27_hap2.fa
##contig=<ID=HiC_scaffold_27_hap2,length=239>
##contig=<ID=HiC_scaffold_27_hap2,length=235>
##contig=<ID=HiC_scaffold_27_hap2,length=240>
##contig=<ID=HiC_scaffold_27_hap2,length=236>
##contig=<ID=HiC_scaffold_27_hap2,length=235>

...

@hkaspersen
Copy link
Collaborator Author

hkaspersen commented Oct 16, 2024

I am sorry to ask but would it be possible to 1. add the full contig name to the polished fasta headers. and also get the consensus polished sequence instead of many contigs ?

Thank you in advance. it is quite basic and would be valuable to PILON. Quentin.


Writing HiC_scaffold_27_hap2:20462918-20463189 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20463007-20463247 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20463007-20463247 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20463060-20463301 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20463060-20463301 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20463108-20463348 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20463108-20463348 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta
Writing HiC_scaffold_27_hap2:20464881-20465112 VCF to polished_assembly_hap2_scf27.vcf
Writing HiC_scaffold_27_hap2:20464881-20465112 changes to polished_assembly_hap2_scf27.changes
Writing updated HiC_scaffold_27_hap2_pilon to polished_assembly_hap2_scf27.fasta

>HiC_scaffold_27_hap2_pilon
ACATGCATGCAATGGGCCTAATGTGCATGTTGTGAGAAAACCAGTCATATGTACGTAATGTAGCTCTGTGTATGTGGCTG
TGAAATGTACGCGATGCCAGCTAGGCAGCAAAAATTGTTAAATTCTGTGGCAGGAGGCTGTTTATCTGTTTCAGGTGGGA
AATAATAATAATCATAACCAGATGTGAGAATATTTTAAACATTTGATACACCAATGAGCTGGACGGCTGTAATTATAACA
>HiC_scaffold_27_hap2_pilon
TGTGTGACTGTGACCAGACCTGTTATCTCTCCTCTTTTGCTCTCCCCTCTCCTGTTCTCTCTCCCACTCTCCCCCTTTCT
CTGTCTCTGTCGAGCTACACATGTCGTTCCTGAGCTGCCATTGATTCAGACCCCCTCTGCCCTCTGGACCTGCCTGACTC
ATCCTGGTGCCCCGCTTCTGGTTGGAGATCTCGTCACATGGATGTCCCGTGTGTCTCTTTGGGATATGTGGGTCC
>HiC_scaffold_27_hap2_pilon
CTATAAAGTTTGGGGATTGGGAAATTATTCATGTTTAATTTATCTGTTAATTTTAACCTTTGAACAGACGTTTTATAATT

...


##fileformat=VCFv4.1
##fileDate=20241016
##source="Pilon version 1.24 Thu Jan 28 13:00:45 2021 -0500"
##PILON="--genome HiC_scaffold_27_hap2.fa --frags short_reads_scaffold27.bam --bam /project/lt200308-agbsci/01-catfish_assembly/04-polish/01-PilonCMA/03-QV_mercury/asm.Hap2.polish3.renamed.fa.hifireads.sorted.bam --bam HiC_scaffold_27_hap2.ont_aligned.sorted.bam --targets /project/lt200308-agbsci/01-catfish_assembly/04-polish/01-PilonCMA/asm.Hap2.polish3.renamed_only.bed.chr27.targets.bed --output polished_assembly_hap2_scf27 --fix all --vcf --diploid --minmq 30 --minqual 30 --changes --tracks --verbose"
##reference=file:/lustrefs/disk/project/lt200308-agbsci/01-catfish_assembly/04-polish/01-PilonCMA/HiC_scaffold_27_hap2.fa
##contig=<ID=HiC_scaffold_27_hap2,length=239>
##contig=<ID=HiC_scaffold_27_hap2,length=235>
##contig=<ID=HiC_scaffold_27_hap2,length=240>
##contig=<ID=HiC_scaffold_27_hap2,length=236>
##contig=<ID=HiC_scaffold_27_hap2,length=235>

...

Dear @Isoris,
I think you posted this comment on the wrong page?
I assume this was supposed to be on the pilon github page?

@Isoris
Copy link

Isoris commented Oct 16, 2024

Hello Yes! I just wonder if it would be possible to directly add a new option in pilon to have better headers but also to call a consensus like with bcftools like.if we choose --diploid we could call.with heterozygosity -H 1 in bcftools.

But it seems that the Pilon software is.not maintained anymore, right?

In my case I could find a way to polish my genome so it is still a very useful too.

Thank you and sorry for posting in the wrong repo.

@hkaspersen
Copy link
Collaborator Author

No worries!
I actually stopped using Pilon for my polishing because recently it has been found that it can introduce errors into the assembly.
Have a look here: https://rrwick.github.io/2023/05/15/short-read-polishing-short-read-assemblies.html
Depending on your assembly method, polishing a short-read assembly may not be optimal.

@Isoris
Copy link

Isoris commented Oct 17, 2024 via email

@hkaspersen
Copy link
Collaborator Author

That seems like a reasonable solution, I was not aware of the possibility of targeted correction like that!
I don't think I am the right person to ask, it all depends on your plans and your goals!

@Isoris
Copy link

Isoris commented Oct 17, 2024 via email

@Isoris
Copy link

Isoris commented Oct 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants