dhtslib.htslib.regidx

htslib-1.9 regidx.h as D module

Changes include:

    Members

    Aliases

    regidx_free_f
    alias regidx_free_f = void function(void* payload)
    Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
    regidx_parse_f
    alias regidx_parse_f = int function(const(char)* line, char** chr_beg, char** chr_end, reg_t* reg, void* payload, void* usr)
    Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
    regidx_t
    alias regidx_t = _regidx_t
    Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

    Functions

    regidx_destroy
    void regidx_destroy(regidx_t* idx)

    regidx_destroy() - free memory allocated by regidx_init

    regidx_init
    regidx_t* regidx_init(const(char)* fname, regidx_parse_f parsef, regidx_free_f freef, size_t payload_size, void* usr)

    regidx_init() - creates new index @param fname: input file name or NULL if regions will be added one-by-one via regidx_insert() @param parsef: regidx_parse_bed, regidx_parse_tab or see description of regidx_parse_f. If NULL, the format will be autodected, currently either regidx_parse_tab (the default) or regidx_parse_bed (file must be named 'bed' or 'bed.gz') will be used. Note that the exact autodetection algorithm will change. @param freef: NULL or see description of regidx_parse_f @param payload_size: 0 with regidx_parse_bed, regidx_parse_tab or see regidx_parse_f @param usr: optional user data passed to regidx_parse_f

    regidx_insert
    int regidx_insert(regidx_t* idx, char* line)

    regidx_insert() - add a new region.

    regidx_nregs
    int regidx_nregs(regidx_t* idx)

    regidx_seq_nregs() - number of regions regidx_nregs() - total number of regions

    regidx_overlap
    int regidx_overlap(regidx_t* idx, const(char)* chr, uint32_t start, uint32_t end, regitr_t* itr)

    regidx_overlap() - check overlap of the location chr:from-to with regions @param start,end: 0-based start, end coordinate (inclusive) @param itr: pointer to iterator, can be NULL if not needed

    regidx_parse_bed
    int regidx_parse_bed(const(char)* , char** , char** , reg_t* , void* , void* )

    regidx_parse_f for BED, CHROM,FROM,TO (0-based,right-open)

    regidx_parse_tab
    int regidx_parse_tab(const(char)* , char** , char** , reg_t* , void* , void* )

    regidx_Parse_f for "TAB", CHROM,POS (1-based, inclusive)

    regidx_seq_names
    char** regidx_seq_names(regidx_t* idx, int* n)

    regidx_seq_names() - return list of all sequence names

    regidx_seq_nregs
    int regidx_seq_nregs(regidx_t* idx, const(char)* seq)

    regidx_seq_nregs() - number of regions regidx_nregs() - total number of regions

    regitr_end
    uint32_t regitr_end(regitr_t* itr)

    Get the start or end coordinate of the region iterator's current region

    regitr_overlap
    auto regitr_overlap(regitr_t* itr, T from, T to)

    Does the given (from, to) overlap the region?

    regitr_payload
    auto regitr_payload(regitr_t* itr)

    Get the payload of the region iterator's current region

    regitr_start
    uint32_t regitr_start(regitr_t* itr)

    Get the start or end coordinate of the region iterator's current region

    Structs

    _regidx_t
    struct _regidx_t

    @file htslib/regidx.h Region indexing. struct defined in regidx.c, we will leave as opaque

    reg_t
    struct reg_t

    region (start, end)

    regitr_t
    struct regitr_t

    region iterator

    Meta