|
Gamgee
You miserable little maggot. I'll stove your head in!
|
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | __kstring_t |
| struct | htsFormat |
| 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) |
Typedefs | |
| typedef struct BGZF | BGZF |
| typedef struct __kstring_t | kstring_t |
| typedef struct htsFormat | htsFormat |
| 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) |
| int | hts_detect_format (struct hFILE *fp, htsFormat *fmt) |
| const char * | hts_format_description (const htsFormat *format) |
| htsFile * | hts_open (const char *fn, const char *mode) |
| htsFile * | hts_hopen (struct hFILE *fp, const char *fn, const char *mode) |
| int | hts_close (htsFile *fp) |
| const htsFormat * | hts_get_format (htsFile *fp) |
| int | hts_set_opt (htsFile *fp, enum cram_option opt,...) |
| 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) |
Variables | |
| int | hts_verbose |
| const unsigned char | seq_nt16_table [256] |
| const char | seq_nt16_str [] |
| #define HTS_BGZF_TYPEDEF |
| #define hts_bin_first | ( | l | ) | (((1<<(((l)<<1) + (l))) - 1) / 7) |
| #define hts_bin_parent | ( | l | ) | (((l) - 1) >> 3) |
| #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_FMT_BAI 1 |
| #define HTS_FMT_CRAI 3 |
| #define HTS_FMT_CSI 0 |
| #define HTS_FMT_TBI 2 |
| #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 HTS_IDX_NONE (-5) |
| #define HTS_IDX_REST (-4) |
| #define HTS_IDX_START (-3) |
| #define kroundup32 | ( | x | ) | (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x)) |
| #define KSTRING_T kstring_t |
| typedef const char*(* hts_id2name_f)(void *, int) |
| 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_name2id_f)(void *, const char *) |
| typedef int hts_readrec_func(BGZF *fp, void *data, void *r, int *tid, int *beg, int *end) |
| typedef struct __kstring_t kstring_t |
| enum cram_option |
| enum htsCompression |
| enum htsExactFormat |
| enum htsFormatCategory |
| enum sam_fields |
| int hts_close | ( | htsFile * | fp | ) |
Close a file handle, flushing buffered data for output streams
| fp | The file handle to be closed |
Determine format by peeking at the start of a file
| fp | File opened for reading, positioned at the beginning |
| fmt | Format structure that will be filled out on return |
| const char* hts_format_description | ( | const htsFormat * | format | ) |
Get a human-readable description of the file format
Returns the file's format information
| fp | The file handle |
Open an existing stream as a SAM/BAM/CRAM/VCF/BCF/etc file
| fn | The already-open file handle |
| mode | Open mode, as per hts_open() |
| void hts_idx_destroy | ( | hts_idx_t * | idx | ) |
| void hts_idx_finish | ( | hts_idx_t * | idx, |
| uint64_t | final_offset | ||
| ) |
| uint8_t* hts_idx_get_meta | ( | hts_idx_t * | idx, |
| int * | l_meta | ||
| ) |
| uint64_t hts_idx_get_n_no_coor | ( | const hts_idx_t * | idx | ) |
| int hts_idx_get_stat | ( | const hts_idx_t * | idx, |
| int | tid, | ||
| uint64_t * | mapped, | ||
| uint64_t * | unmapped | ||
| ) |
| hts_idx_t* hts_idx_init | ( | int | n, |
| int | fmt, | ||
| uint64_t | offset0, | ||
| int | min_shift, | ||
| int | n_lvls | ||
| ) |
| hts_idx_t* hts_idx_load | ( | const char * | fn, |
| int | fmt | ||
| ) |
| int hts_idx_push | ( | hts_idx_t * | idx, |
| int | tid, | ||
| int | beg, | ||
| int | end, | ||
| uint64_t | offset, | ||
| int | is_mapped | ||
| ) |
| void hts_idx_save | ( | const hts_idx_t * | idx, |
| const char * | fn, | ||
| int | fmt | ||
| ) |
| const char** hts_idx_seqnames | ( | const hts_idx_t * | idx, |
| int * | n, | ||
| hts_id2name_f | getid, | ||
| void * | hdr | ||
| ) |
| void hts_idx_set_meta | ( | hts_idx_t * | idx, |
| int | l_meta, | ||
| uint8_t * | meta, | ||
| int | is_copy | ||
| ) |
| void hts_itr_destroy | ( | hts_itr_t * | iter | ) |
| 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 | ||
| ) |
| htsFile* hts_open | ( | const char * | fn, |
| const char * | mode | ||
| ) |
| const char* hts_parse_reg | ( | const char * | s, |
| int * | beg, | ||
| int * | end | ||
| ) |
| char** hts_readlines | ( | const char * | fn, |
| int * | _n | ||
| ) |
| char** hts_readlist | ( | const char * | fn, |
| int | is_file, | ||
| int * | _n | ||
| ) |
Parse comma-separated list or read list from a file
| list | File name or comma-separated list |
| is_file | |
| _n | Size of the output array (number of items read) |
| int hts_set_fai_filename | ( | htsFile * | fp, |
| const char * | fn_aux | ||
| ) |
Set .fai filename for a file opened for reading
| int hts_set_opt | ( | htsFile * | fp, |
| enum cram_option | opt, | ||
| ... | |||
| ) |
Sets a specified CRAM option on the open file handle.
| fp | The file handle open the open file. |
| opt | The CRAM_OPT_* option. |
| ... | Optional arguments, dependent on the option used. |
| int hts_set_threads | ( | htsFile * | fp, |
| int | n | ||
| ) |
Create extra threads to aid compress/decompression for this file
| fp | The file handle |
| n | The number of worker threads to create |
| const char* hts_version | ( | void | ) |
Get the htslib version number
| int hts_verbose |
| const char seq_nt16_str[] |
Table for converting a 4-bit encoded nucleotide to a letter.
| const unsigned char seq_nt16_table[256] |
Table for converting a nucleotide character to the 4-bit encoding.
1.8.8