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

bcftools merge -m none hangs forever (while allocating more and more memory) #1164

Closed
freeseek opened this issue Feb 25, 2020 · 2 comments
Closed

Comments

@freeseek
Copy link
Contributor

The following code reproduces the issue:

(echo ">chr1"; \
echo "ACGT") > ref.fa

(echo "##fileformat=VCFv4.2"; \
echo "##contig=<ID=chr1,length=248956422>"; \
echo "##INFO=<ID=END,Number=1,Type=Integer,Description=\"Stop position of the interval\">"; \
echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO"; \
echo -e "chr1\t1\t.\tA\t<NON_REF>\t.\t.\tEND=2") | \
  bcftools view -Oz -o a.vcf.gz && bcftools index -ft a.vcf.gz

(echo "##fileformat=VCFv4.2"; \
echo "##contig=<ID=chr1,length=248956422>"; \
echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO"; \
echo -e "chr1\t1\t.\tA\tC\t.\t.\t.") | \
  bcftools view -Oz -o b.vcf.gz && bcftools index -ft b.vcf.gz

bcftools merge -g ref.fa a.vcf.gz b.vcf.gz -m none -o /dev/null
@pd3 pd3 closed this as completed in 2de40a8 Mar 5, 2020
@pd3
Copy link
Member

pd3 commented Mar 5, 2020

Thanks for the bug report, this is now fixed. If you spot anything odd, please let me know.

pd3 added a commit that referenced this issue Apr 4, 2023
Previously gVCF blocks were correctly split but in some cases FORMAT
fields would not be updated at split sites.

This commit revamps the line matching code, adds comments and makes it
more understandable.

Fixes #1891 and revisits #1164
@pd3
Copy link
Member

pd3 commented Apr 4, 2023

It turns out the problem was fixed only partially, gVCF blocks wouldn't fill in FORMAT fields at split positions, see a related problem here #1891, now fixed.

pd3 added a commit that referenced this issue Apr 18, 2023
Genotypes at the ends of gVCF blocks were in some cases still unfilled, even after
the 60c65eb fix.

Fixes #1910, see also #1891 and #1164.
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

No branches or pull requests

2 participants