Open fennerm opened 1 year ago
Will try to debug a bit and submit a PR
Took an initial look but couldn't figure out the root cause. Jotting down my notes:
bcf_get_format_values
and self.values_per_sample()
are both 0 if the field has type=String
.chunks()
)bcf_get_format_values
and self.values_per_sample()
are both 1 if the field has type=Integer
I'm running into a panic when attempting to parse a VCF with rust_htslib::bcf. I can't share the real VCF but here's a minimal example:
The problem is that the sample column only has one "." but there are two fields defined in the FORMAT column. Per the VCF spec I think this is valid:
Panic message:
Relevant line in code: https://github.com/rust-bio/rust-htslib/blob/master/src/bcf/record.rs#L1490