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 annotate produces truncated vcf with exit code 0 #2385

Closed
dennishendriksen opened this issue Mar 21, 2025 · 1 comment
Closed

bcftools annotate produces truncated vcf with exit code 0 #2385

dennishendriksen opened this issue Mar 21, 2025 · 1 comment

Comments

@dennishendriksen
Copy link

bcftools annotate can exit with exit code 0 when processing an invalid vcf with the ASCII NULL value for a genotype value for a FORMAT field. This can result in a truncated vcf being produced (after the third error was encountered?).

bcftools view exits with a non-zero exit code as expected.

$ zgrep -vc "^#" bcftools_exitcode.vcf.gz
5

$ bcftools annotate bcftools_exitcode.vcf.gz --output-type v --output bcftools_exitcode_annotated.vcf
[E::vcf_parse_format_fill5] Couldn't read GT data: value not a number or '.' at chr11:72608665
[E::vcf_parse_format_fill5] Couldn't read GT data: value not a number or '.' at chr11:114064239
$ echo $?
0
$ grep -vc "^#" bcftools_exitcode_annotated.vcf
1

$ bcftools view bcftools_exitcode.vcf.gz > /dev/null
[E::vcf_parse_format_fill5] Couldn't read GT data: value not a number or '.' at chr11:72608665
[E::vcf_parse_format_fill5] Couldn't read GT data: value not a number or '.' at chr11:114064239
Error: VCF parse error
$ echo $?
8

bcftools_exitcode.vcf.gz

@pd3
Copy link
Member

pd3 commented Mar 26, 2025

This is now fixed, thank you for reporting the problem

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