71 #define REGITR_START(itr) (itr).reg[(itr).i].start
72 #define REGITR_END(itr) (itr).reg[(itr).i].end
73 #define REGITR_PAYLOAD(itr,type_t) ((type_t*)(itr).payload)[(itr).i]
74 #define REGITR_OVERLAP(itr,from,to) (itr.i < itr.n && REGITR_START(itr)<=to && REGITR_END(itr)>=from )
int regidx_parse_tab(const char *, char **, char **, reg_t *, void *, void *)
Definition: regidx.c:292
char ** regidx_seq_names(regidx_t *idx, int *n)
Definition: regidx.c:61
void regidx_destroy(regidx_t *idx)
Definition: regidx.c:203
void(* regidx_free_f)(void *payload)
Definition: regidx.h:89
void * payload
Definition: regidx.h:67
int regidx_parse_bed(const char *, char **, char **, reg_t *, void *, void *)
Definition: regidx.c:267
int n
Definition: regidx.h:65
int regidx_overlap(regidx_t *idx, char *chr, uint32_t start, uint32_t end, regitr_t *itr)
Definition: regidx.c:226
int payload_size
Definition: regidx.c:57
reg_t * reg
Definition: regidx.h:66
uint32_t start
Definition: regidx.h:60
int(* regidx_parse_f)(const char *line, char **chr_beg, char **chr_end, reg_t *reg, void *payload, void *usr)
Definition: regidx.h:88
void * payload
Definition: regidx.c:58
void * usr
Definition: regidx.c:52
regidx_t * regidx_init(const char *fname, regidx_parse_f parsef, regidx_free_f freef, size_t payload_size, void *usr)
Definition: regidx.c:151
int regidx_insert(regidx_t *idx, char *line)
Definition: regidx.c:101