Closed brentp closed 5 years ago
if hrec[1] is not null, it's an INFO if hred[2] is not null it's a FMT
I think you want to use the bcf_hdr_id2coltype
macro.
by the docs, that appears to take the type
as a parameter and that's documented as:
@type: one of BCF_HL_FLT, BCF_HL_INFO, BCF_HL_FMT
which is what I want to know.
I want to create a lookup of
bcf_idpair_t.key -> (bcf_idpair_t.val.id, TYPE)
whereTYPE
is either BCF_HL_INFO or BCF_HL_FMT.During iteration over
bcf_hdr_t.id[0]
and looking atbcf_idinfo_t
, how to tell if it's an INFO or a FORMAT? Or is there another obvious way I am missing to accomplish this?