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

Incorrect number of FORMAT/PL values in .g.vcf #191

Closed
dennishendriksen opened this issue Apr 13, 2023 · 2 comments
Closed

Incorrect number of FORMAT/PL values in .g.vcf #191

dennishendriksen opened this issue Apr 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@dennishendriksen
Copy link

I'm running into an issue where Clair3 produces invalid .g.vcf output resulting in errors when used with downstream tooling, e.g. BCFtools:

Incorrect number of FORMAT/PL values at chr2:14862711, cannot merge. The tag is defined as Number=G, but found
  4 values and 3 alleles. See also http://samtools.github.io/bcftools/howtos/FAQ.html#incorrect-nfields

Example output (unfortunately I can't share the input due to its sensitive nature):

pileup.vcf.gz:

chr2    14862711        .       C       .       7.03    RefCall P       GT:GQ:DP:AD:AF:PL       0/0:7:2:1:0.5000:2970

full_alignment.vcf.gz:

chr2    14862711        .       C       N       7.97    PASS    F       GT:GQ:DP:AD:AF:PL       0/1:7:3:1,1:0.3333:2970

merge_output.vcf.gz:

chr2    14862711        .       C       N       7.97    PASS    F       GT:GQ:DP:AD:AF:PL       0/1:7:3:1,1:0.3333:2970

output.g.vcf.gz:

chr2    14862711        .       C       N,<NON_REF>     7.97    PASS    F       GT:GQ:DP:AD:AF:PL       0/1:7:3:1,1,0:0.3333:2970,990,990,990

I think the error is in the PL computation in case the alternate allele value is N, caused by https://github.com/HKU-BAL/Clair3/blob/v1.0.0/clair3/CallVariants.py#L1395? Since the VCF field PL is of type G the field still must have one value for each possible genotype according to the VCF specification.

Possibly the following was intended in full_alignment.vcf.gz?

chr2    14862711        .       C       N       7.97    PASS    F       GT:GQ:DP:AD:AF:PL       0/1:7:3:1,1:0.3333:990,990,990
@aquaskyline aquaskyline added the bug Something isn't working label Apr 13, 2023
@aquaskyline
Copy link
Member

To be fixed in the next release.

@zhengzhenxian
Copy link
Collaborator

@dennishendriksen Fixed in v1.0.1, pls kindly try, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants