|
NVBIO
|
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | __kstring_t |
| struct | htsFile |
| struct | hts_pair64_t |
| struct | hts_itr_t |
Macros | |
| #define | HTS_BGZF_TYPEDEF |
| #define | KSTRING_T kstring_t |
| #define | kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x)) |
| #define | hts_expand(type_t, n, m, ptr) |
| #define | hts_expand0(type_t, n, m, ptr) |
| #define | HTS_IDX_NOCOOR (-2) |
| #define | HTS_IDX_START (-3) |
| #define | HTS_IDX_REST (-4) |
| #define | HTS_IDX_NONE (-5) |
| #define | HTS_FMT_CSI 0 |
| #define | HTS_FMT_BAI 1 |
| #define | HTS_FMT_TBI 2 |
| #define | HTS_FMT_CRAI 3 |
| #define | hts_bin_first(l) (((1<<(((l)<<1) + (l))) - 1) / 7) |
| #define | hts_bin_parent(l) (((l) - 1) >> 3) |
| #define | FT_UNKN 0 |
| #define | FT_GZ 1 |
| #define | FT_VCF 2 |
| #define | FT_VCF_GZ (FT_GZ|FT_VCF) |
| #define | FT_BCF (1<<2) |
| #define | FT_BCF_GZ (FT_GZ|FT_BCF) |
| #define | FT_STDIN (1<<3) |
Typedefs | |
| typedef struct BGZF | BGZF |
| typedef struct __kstring_t | kstring_t |
| typedef struct __hts_idx_t | hts_idx_t |
| typedef int | hts_readrec_func (BGZF *fp, void *data, void *r, int *tid, int *beg, int *end) |
| typedef int(* | hts_name2id_f )(void *, const char *) |
| typedef const char *(* | hts_id2name_f )(void *, int) |
| typedef hts_itr_t * | hts_itr_query_func (const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec) |
Functions | |
| const char * | hts_version (void) |
| htsFile * | hts_open (const char *fn, const char *mode) |
| int | hts_close (htsFile *fp) |
| int | hts_getline (htsFile *fp, int delimiter, kstring_t *str) |
| char ** | hts_readlines (const char *fn, int *_n) |
| char ** | hts_readlist (const char *fn, int is_file, int *_n) |
| int | hts_set_threads (htsFile *fp, int n) |
| int | hts_set_fai_filename (htsFile *fp, const char *fn_aux) |
| hts_idx_t * | hts_idx_init (int n, int fmt, uint64_t offset0, int min_shift, int n_lvls) |
| void | hts_idx_destroy (hts_idx_t *idx) |
| int | hts_idx_push (hts_idx_t *idx, int tid, int beg, int end, uint64_t offset, int is_mapped) |
| void | hts_idx_finish (hts_idx_t *idx, uint64_t final_offset) |
| void | hts_idx_save (const hts_idx_t *idx, const char *fn, int fmt) |
| hts_idx_t * | hts_idx_load (const char *fn, int fmt) |
| uint8_t * | hts_idx_get_meta (hts_idx_t *idx, int *l_meta) |
| void | hts_idx_set_meta (hts_idx_t *idx, int l_meta, uint8_t *meta, int is_copy) |
| int | hts_idx_get_stat (const hts_idx_t *idx, int tid, uint64_t *mapped, uint64_t *unmapped) |
| uint64_t | hts_idx_get_n_no_coor (const hts_idx_t *idx) |
| const char * | hts_parse_reg (const char *s, int *beg, int *end) |
| hts_itr_t * | hts_itr_query (const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec) |
| void | hts_itr_destroy (hts_itr_t *iter) |
| hts_itr_t * | hts_itr_querys (const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec) |
| int | hts_itr_next (BGZF *fp, hts_itr_t *iter, void *r, void *data) |
| const char ** | hts_idx_seqnames (const hts_idx_t *idx, int *n, hts_id2name_f getid, void *hdr) |
| int | hts_file_type (const char *fname) |
Variables | |
| int | hts_verbose |
| const unsigned char | seq_nt16_table [256] |
| const char | seq_nt16_str [] |
| #define FT_UNKN 0 |
hts_file_type() - Convenience function to determine file type : the file name
Returns one of the FT_* defines.
This function was added in order to avoid the need for excessive command line switches.
| #define hts_expand | ( | type_t, | |
| n, | |||
| m, | |||
| ptr | |||
| ) |
hts_expand() - expands memory block pointed to by $ptr; hts_expand0() the latter sets the newly allocated part to 0.
| n | requested number of elements of type type_t |
| m | size of memory allocated |
| #define hts_expand0 | ( | type_t, | |
| n, | |||
| m, | |||
| ptr | |||
| ) |
| #define HTS_IDX_NOCOOR (-2) |
These HTS_IDX_* macros are used as special tid values for hts_itr_query()/etc, producing iterators operating as follows:
| #define kroundup32 | ( | x) | (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x)) |
| typedef struct __hts_idx_t hts_idx_t |
| typedef hts_itr_t* hts_itr_query_func(const hts_idx_t *idx, int tid, int beg, int end, hts_readrec_func *readrec) |
| typedef int hts_readrec_func(BGZF *fp, void *data, void *r, int *tid, int *beg, int *end) |
| typedef struct __kstring_t kstring_t |
| int hts_close | ( | htsFile * | fp) |
| const char** hts_idx_seqnames | ( | const hts_idx_t * | idx, |
| int * | n, | ||
| hts_id2name_f | getid, | ||
| void * | hdr | ||
| ) |
| hts_itr_t* hts_itr_query | ( | const hts_idx_t * | idx, |
| int | tid, | ||
| int | beg, | ||
| int | end, | ||
| hts_readrec_func * | readrec | ||
| ) |
| hts_itr_t* hts_itr_querys | ( | const hts_idx_t * | idx, |
| const char * | reg, | ||
| hts_name2id_f | getid, | ||
| void * | hdr, | ||
| hts_itr_query_func * | itr_query, | ||
| hts_readrec_func * | readrec | ||
| ) |
| char** hts_readlist | ( | const char * | fn, |
| int | is_file, | ||
| int * | _n | ||
| ) |
| int hts_set_threads | ( | htsFile * | fp, |
| int | n | ||
| ) |
| const char* hts_version | ( | void | ) |
| const char seq_nt16_str[] |
1.8.4