Function rust_htslib::htslib::bcf_hdr_subset [] [src]

pub unsafe extern "C" fn bcf_hdr_subset(
    h0: *const bcf_hdr_t,
    n: c_int,
    samples: *const *const c_char,
    imap: *mut c_int
) -> *mut bcf_hdr_t

bcf_hdr_subset() - creates a new copy of the header removing unwanted samples @param n: number of samples to keep @param samples: names of the samples to keep @param imap: mapping from index in @samples to the sample index in the original file

Sample names not present in h0 are ignored. The number of unmatched samples can be checked by comparing n and bcf_hdr_nsamples(out_hdr). This function can be used to reorder samples. See also bcf_subset() which subsets individual records.