James Bonfield

Results 409 comments of James Bonfield

It's true there are calls to `exit` in some of the VCF and BCF code when it meets corrupted data, which I fully agree isn't appropriate for a library. Eg...

Of course I can answer all these questions by looking at the source. Error 2 comes from these in htslib/vcf.h ``` #define BCF_ERR_CTG_UNDEF 1 #define BCF_ERR_TAG_UNDEF 2 #define BCF_ERR_NCOLS 4...

I understand the reasoning, but it still needs to be an "E:" and not a "W:" output as this is now fatal.

Duh, good point. Sorry. So it's just the subsequent error that needs fixing.

I found that I don't need a length for a contig in order to get bcftools to accept it and create BCFs. Just the name alone is sufficient. I wonder...

Absolutely yes IMO. See the `HTS_RESULT_USED` macro in htslib/*.h declarations. On compilers supporting it, these enforce checking of return values. It's not perfect, but goes a long way forward to...

Sorry to rather resurrect an ancient issue, but I see it's still open so perhaps this is better than creating a new one. I am in the process of evaluating...

Thanks for the answer and for the heads up on 1249. Great to hear something is coming along.

I've done this sort of thing before, it's how "io_lib" works infact. You don't really need a separate variable as `b.data = ((char *)&b) + sizeof(b);` would work too, although...

Abort is never an appropriate action for a *library* call unless there is genuingly nothing else it could do or if the situation should *really* never occur (in which case...