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

HTSlib does not support VCF v4.4's explicit first phasing indicator #1847

Open
jmarshall opened this issue Oct 5, 2024 · 0 comments
Open
Assignees

Comments

@jmarshall
Copy link
Member

jmarshall commented Oct 5, 2024

This VCF file includes some explicit first phasing indicators, as defined in VCF v4.4 and v4.5's §1.6.2:

##fileformat=VCFv4.4
##FILTER=<ID=PASS,Description="All filters passed">
##contig=<ID=chr1,length=60>
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	s1	s2
chr1	10	.	A	T,C	60	PASS	.	GT	0/1/2	|0/1/2
chr1	20	.	A	T,C	60	PASS	.	GT	/0|1|2	|0/1/2
chr1	30	.	G	C,A	60	PASS	.	GT	0|1|2	0|1/2

HTSlib fails to parse this file, with the following complaint:

$ htsfile -c genotype.vcf    # or similarly with bcftools view
[E::vcf_parse_format_fill5] Couldn't read GT data: value not a number or '.' at chr1:10

The record at position 10 contains the example genotype from the spec, with and without an explicit first phasing indicator. That at position 20 explicitly sets first-phasing that differs from the implicit value if the indicators were omitted. And the record at position 30 has genotypes with the usual implicit first-phasing that in VCFv4.4 would AIUI correspond to the explicit |0|1|2 and /0|1/2 respectively.

(As previously noted at sgkit-dev/bio2zarr#263. See also #1113, which is tangentially related.)

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