Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Functions
regidx.h File Reference
#include <stdio.h>
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  reg_t
 
struct  regitr_t
 

Macros

#define REGITR_START(itr)   (itr).reg[(itr).i].start
 
#define REGITR_END(itr)   (itr).reg[(itr).i].end
 
#define REGITR_PAYLOAD(itr, type_t)   ((type_t*)(itr).payload)[(itr).i]
 
#define REGITR_OVERLAP(itr, from, to)   (itr.i < itr.n && REGITR_START(itr)<=to && REGITR_END(itr)>=from )
 

Typedefs

typedef struct _regidx_t regidx_t
 
typedef int(* regidx_parse_f )(const char *line, char **chr_beg, char **chr_end, reg_t *reg, void *payload, void *usr)
 
typedef void(* regidx_free_f )(void *payload)
 

Functions

int regidx_parse_bed (const char *, char **, char **, reg_t *, void *, void *)
 
int regidx_parse_tab (const char *, char **, char **, reg_t *, void *, void *)
 
regidx_tregidx_init (const char *fname, regidx_parse_f parsef, regidx_free_f freef, size_t payload_size, void *usr)
 
void regidx_destroy (regidx_t *idx)
 
int regidx_overlap (regidx_t *idx, char *chr, uint32_t start, uint32_t end, regitr_t *itr)
 
int regidx_insert (regidx_t *idx, char *line)
 
char ** regidx_seq_names (regidx_t *idx, int *n)
 

Macro Definition Documentation

#define REGITR_END (   itr)    (itr).reg[(itr).i].end
#define REGITR_OVERLAP (   itr,
  from,
  to 
)    (itr.i < itr.n && REGITR_START(itr)<=to && REGITR_END(itr)>=from )
#define REGITR_PAYLOAD (   itr,
  type_t 
)    ((type_t*)(itr).payload)[(itr).i]
#define REGITR_START (   itr)    (itr).reg[(itr).i].start

Typedef Documentation

typedef void(* regidx_free_f)(void *payload)
typedef int(* regidx_parse_f)(const char *line, char **chr_beg, char **chr_end, reg_t *reg, void *payload, void *usr)
typedef struct _regidx_t regidx_t

Function Documentation

void regidx_destroy ( regidx_t idx)
regidx_t* regidx_init ( const char *  fname,
regidx_parse_f  parsef,
regidx_free_f  freef,
size_t  payload_size,
void *  usr 
)
int regidx_insert ( regidx_t idx,
char *  line 
)
int regidx_overlap ( regidx_t idx,
char *  chr,
uint32_t  start,
uint32_t  end,
regitr_t itr 
)
int regidx_parse_bed ( const char *  ,
char **  ,
char **  ,
reg_t ,
void *  ,
void *   
)
int regidx_parse_tab ( const char *  ,
char **  ,
char **  ,
reg_t ,
void *  ,
void *   
)
char** regidx_seq_names ( regidx_t idx,
int *  n 
)