-
Notifications
You must be signed in to change notification settings - Fork 442
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
Phasing of first genotype #1113
Comments
Thank you for raising this issue. I am not a VCF maintainer and admit that I found this confusing too when I looked into it. However I see this very topic is in discussion already, with a proposal to fix it (possibly wrong? or exposing a difference in VCF and BCF?). I'm out of my depth really, but I'd recommend adding a users perspective to the samtools/hts-specs#421 PR. |
Also, I note that "0 / 1 | 2" comment was there in the initial checkin of the initial VCF spec, so we have no more history to know where it came from and who authored it and whether this is what was intended. It was committed by @amarcket but maybe @pd3 or @lh3 know the origin of this too. Can the above named people cast their eyes over the PR mentioned above too? |
This was never explicitly defined. I am open to modifying the existing specification and htslib as mixed ploidy is not a widely used feature. |
It does appear to be implicitly defined in BCF though as the spec indicates the | vs / affects the next value, not the previous one. |
Yes, and the examples |
Hi there,
according to the VCF Spec 4.2,
(emphasis mine)
However, looking at the implementation as well as some quick tests, it seems that the first genotype (e.g., the
0
in0|1
) never has the phased bit set, so thatbcf_gt_is_phased()
always returnsfalse
. It seems to me that at least for diploids, that does not make all too much sense, as knowing that the second genotype is phased also determines this for the first one, doesn't it?!The VCF Spec however also has the example
In that case, it is not clear to me how to interpret phasing. Only the
2
is phased here, while the order of the0
and1
is not determined?So, my questions here are:
bcf_gt_is_phased()
calls returntrue
?Thanks and all the best
Lucas
The text was updated successfully, but these errors were encountered: