From 6e5e272b68f41c99fdef0109698cf725d2f16e1f Mon Sep 17 00:00:00 2001 From: pd3 Date: Sat, 25 Jan 2025 12:26:24 +0100 Subject: [PATCH] Make it possible to test for VCF_REF as declared in the documentation Currently bcf_has_variant_types always returns 0 when testing for the presence of VCF_REF, regardless of the actual type --- vcf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vcf.c b/vcf.c index f22f4450d..549fcb710 100644 --- a/vcf.c +++ b/vcf.c @@ -5161,6 +5161,7 @@ int bcf_has_variant_types(bcf1_t *rec, uint32_t bitmask, else return bitmask & type; } // mode == bcf_match_exact + if ( bitmask==VCF_REF ) return type==bitmask ? 1 : 0; return type==bitmask ? type : 0; }