Skip to content

Confusing BCF error messages, and mixing warnings vs errors. #1359

@jkbonfield

Description

@jkbonfield

If I have a VCF file with a missing ##FORMAT record, then a straight bcftools view issues a warning:

@ seq4-head2[tmp/vcf]; bcftools view passed_ploidy_001.vcf|wc
[W::vcf_parse_format] FORMAT 'PL' at 1:61462 is not defined in the header, assuming Type=String
     14      81     759

If I try to output the same file as BCF however, I get the warning and then a boggling error code:

@ seq4-head2[tmp/vcf]; bcftools view -Ob passed_ploidy_001.vcf |wc
[W::vcf_parse_format] FORMAT 'PL' at 1:61462 is not defined in the header, assuming Type=String
[E::bcf_write] Unchecked error (2) at 1:61462
[main_vcfview] Error: cannot write to (null)
      0       0       0

What does "Unchecked error (2)" mean? Initially I didn't associate this with the previous warning because we get those on VCF too and all is fine, but it's actually that which is now fatal. If it's actually an error to lack the FORMAT header then it should be reported as an error when outputting BCF and not a warning.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions