NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Functions | Variables
tbx.h File Reference
#include "hts.h"

Go to the source code of this file.

Classes

struct  tbx_conf_t
 
struct  tbx_t
 

Macros

#define TBX_MAX_SHIFT   31
 
#define TBX_GENERIC   0
 
#define TBX_SAM   1
 
#define TBX_VCF   2
 
#define TBX_UCSC   0x10000
 
#define tbx_itr_destroy(iter)   hts_itr_destroy(iter)
 
#define tbx_itr_queryi(tbx, tid, beg, end)   hts_itr_query((tbx)->idx, (tid), (beg), (end), tbx_readrec)
 
#define tbx_itr_querys(tbx, s)   hts_itr_querys((tbx)->idx, (s), (hts_name2id_f)(tbx_name2id), (tbx), hts_itr_query, tbx_readrec)
 
#define tbx_itr_next(htsfp, tbx, itr, r)   hts_itr_next(hts_get_bgzfp(htsfp), (itr), (r), (tbx))
 
#define tbx_bgzf_itr_next(bgzfp, tbx, itr, r)   hts_itr_next((bgzfp), (itr), (r), (tbx))
 

Functions

int tbx_name2id (tbx_t *tbx, const char *ss)
 
BGZFhts_get_bgzfp (htsFile *fp)
 
int tbx_readrec (BGZF *fp, void *tbxv, void *sv, int *tid, int *beg, int *end)
 
int tbx_index_build (const char *fn, int min_shift, const tbx_conf_t *conf)
 
tbx_ttbx_index_load (const char *fn)
 
const char ** tbx_seqnames (tbx_t *tbx, int *n)
 
void tbx_destroy (tbx_t *tbx)
 

Variables

tbx_conf_t tbx_conf_gff
 
tbx_conf_t tbx_conf_bed
 
tbx_conf_t tbx_conf_psltbl
 
tbx_conf_t tbx_conf_sam
 
tbx_conf_t tbx_conf_vcf
 

Macro Definition Documentation

#define tbx_bgzf_itr_next (   bgzfp,
  tbx,
  itr,
 
)    hts_itr_next((bgzfp), (itr), (r), (tbx))

Definition at line 35 of file tbx.h.

#define TBX_GENERIC   0

Definition at line 8 of file tbx.h.

#define tbx_itr_destroy (   iter)    hts_itr_destroy(iter)

Definition at line 31 of file tbx.h.

#define tbx_itr_next (   htsfp,
  tbx,
  itr,
 
)    hts_itr_next(hts_get_bgzfp(htsfp), (itr), (r), (tbx))

Definition at line 34 of file tbx.h.

#define tbx_itr_queryi (   tbx,
  tid,
  beg,
  end 
)    hts_itr_query((tbx)->idx, (tid), (beg), (end), tbx_readrec)

Definition at line 32 of file tbx.h.

#define tbx_itr_querys (   tbx,
 
)    hts_itr_querys((tbx)->idx, (s), (hts_name2id_f)(tbx_name2id), (tbx), hts_itr_query, tbx_readrec)

Definition at line 33 of file tbx.h.

#define TBX_MAX_SHIFT   31

Definition at line 6 of file tbx.h.

#define TBX_SAM   1

Definition at line 9 of file tbx.h.

#define TBX_UCSC   0x10000

Definition at line 11 of file tbx.h.

#define TBX_VCF   2

Definition at line 10 of file tbx.h.

Function Documentation

BGZF* hts_get_bgzfp ( htsFile fp)

Definition at line 259 of file hts.c.

void tbx_destroy ( tbx_t tbx)

Definition at line 214 of file tbx.c.

int tbx_index_build ( const char *  fn,
int  min_shift,
const tbx_conf_t conf 
)

Definition at line 228 of file tbx.c.

tbx_t* tbx_index_load ( const char *  fn)

Definition at line 243 of file tbx.c.

int tbx_name2id ( tbx_t tbx,
const char *  ss 
)

Definition at line 41 of file tbx.c.

int tbx_readrec ( BGZF fp,
void *  tbxv,
void *  sv,
int *  tid,
int *  beg,
int *  end 
)

Definition at line 129 of file tbx.c.

const char** tbx_seqnames ( tbx_t tbx,
int *  n 
)

Definition at line 266 of file tbx.c.

Variable Documentation

tbx_conf_t tbx_conf_bed

Definition at line 13 of file tbx.c.

tbx_conf_t tbx_conf_gff

Definition at line 12 of file tbx.c.

tbx_conf_t tbx_conf_psltbl

Definition at line 14 of file tbx.c.

tbx_conf_t tbx_conf_sam

Definition at line 15 of file tbx.c.

tbx_conf_t tbx_conf_vcf

Definition at line 16 of file tbx.c.