-
Notifications
You must be signed in to change notification settings - Fork 446
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 view
with region filter drops variants at POS=0 (telomeres)
#1571
Comments
What is the version of bcftools you are using? I am unable to reproduce with the latest |
I'm seeing this with a build of the latest version (BCFtools
Also the same with
|
Just to confirm, I was able to reproduce the problem now
The BCF format works
|
Review of `bcftools merge` code and possibly others is necessary because it is relying on uninitialized POS==-1 in synced_bcf_reader This should resolve samtools#1571
This follows changes in samtools/htslib#1573 See also samtools/htslib#1571
Review of `bcftools merge` code and possibly others is necessary because it is relying on uninitialized POS==-1 in synced_bcf_reader This should resolve samtools#1571
I don't think this has been completed |
Apologies! I spent a few minutes yesterday follow up my old PRs/issues - but I was clearly too trigger happy here when I saw that commits had been added referencing this ticket. |
Given a bgzipped VCF that contains a telomere indicated by position 0 (as per the VCF spec):
(Disclaimer: I know next to nothing about telomeres, and have really only ended up here due to invalid, non-int positions getting converted to 0, as discussed in #1570. My example undoubtedly makes no realistic sense!)
A simple
bcftools view
works as expected:Applying a region filter however unexpectidly drops the telomere (albeit with a warning referring to a flag that I don't think exists in this context?):
It seems like the telomere should be included with this filter, given its chr; and I haven't encountered anywhere in the docs that indicates the observed behaviour. However, there certainly could be some biological reason why that doesn't make sense!
The way it gets dropped can cause an interesting issue when considred with #1570, as it means variants where (for whatever reason...)
POS
gets corruped, get converted to0
and then dropped when a pipe goes on to have a region filter!The text was updated successfully, but these errors were encountered: