You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One way around the problem might be to make a new interface that replaces the old ones and takes a parameter that indicates which of the various types the caller expects to see. As a bonus, it could also return bcf_variant_t::n which is currently a bit difficult to access.
I think for the best compatibility, VCF_INDEL would have to remain as 4, and VCF_INS and VCF_DEL would be extras. The existing interfaces would not return the new values so old code still works. The old interfaces could be marked as deprecated, with advice to use the new interface.
While this would require some small code changes for users it would alert them of the need to update, and reduce the chance of indels suddenly going missing. If, as suggested above, VCF_INDEL were defined as (VCF_INS|VCF_DEL) code looking just for VCF_INDEL might fail to spot cases which only set one of the bits. By making the need to change explicit, it's more likely that code would be altered to do the right thing.
This request is motivated by samtools/bcftools#1704 and the idea is to extend htslib VCF interface as follows
The text was updated successfully, but these errors were encountered: