Skip to content
New issue

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

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

Already on GitHub? # to your account

bctools norm breaks in combination of --atomize and checking REF alleles #1668

Closed
thomasbtf opened this issue Feb 25, 2022 · 1 comment
Closed

Comments

@thomasbtf
Copy link

When running bcftools with --atomize it results in a Segmentation fault (core dumped) :

> bcftools norm --output-type z -o out.vcf.gz  -f main.fasta --check-ref w --rm-dup exact --atomize in.vcf
Segmentation fault (core dumped)

However, when I remove the --atomize bcftools norm works:

> bcftools norm --output-type z -o out.vcf.gz  -f main.fasta --check-ref w --rm-dup exact in.vcf
NON_ACGTN_REF   NC_045512.2     28271   -
REF_MISMATCH    NC_045512.2     28280   C       G
REF_MISMATCH    NC_045512.2     28281   T       A
Lines   total/split/realigned/skipped:  550/0/0/0

When there are only matching REF alleles, it also seems to work fine.

The data from the above example is available here:
main.fasta
in.vcf

@pd3 pd3 closed this as completed in 640850c Mar 2, 2022
@pd3
Copy link
Member

pd3 commented Mar 2, 2022

Thank you for the bug report.

The problem was caused by a faulty VCF violating the specification, the REF allele contained the dash - character for some reason). The code assumed that a valid VCF was being processed. A check was now added and the program no longer crashes on the provided test case.

pd3 added a commit that referenced this issue Mar 29, 2022
…ck-ref

The atomic buffer creates a copy of bcf records and thus requires unpacking.

Following the 640850c fix of #1668, this resolves #1674
daviesrob pushed a commit to daviesrob/bcftools that referenced this issue Apr 4, 2022
…ck-ref

The atomic buffer creates a copy of bcf records and thus requires unpacking.

Following the 640850c fix of samtools#1668, this resolves samtools#1674
pd3 added a commit that referenced this issue May 13, 2022
…ck-ref

The atomic buffer creates a copy of bcf records and thus requires unpacking.

Following the 640850c fix of #1668, this resolves #1674
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants