htslib.hts

@file htslib/hts.h Format-neutral I/O, indexing, and iterator API functions.

Members

Aliases

cram_option
alias cram_option = hts_fmt_option

For backwards compatibility

hts_id2name_f
alias hts_id2name_f = const(char)* function(void*, int)

////////////////////////////////////////////////////////

hts_itr_multi_destroy
alias hts_itr_multi_destroy = hts_itr_destroy

@param iter Iterator to free

hts_itr_multi_query_func
alias hts_itr_multi_query_func = int function(const(hts_idx_t)* idx, hts_itr_t* itr)

Iterator with multiple regions *

hts_itr_multi_t
alias hts_itr_multi_t = hts_itr_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_itr_query_func
alias hts_itr_query_func = hts_itr_t* function(const(hts_idx_t)* idx, int tid, hts_pos_t beg, hts_pos_t end, hts_readrec_func readrec)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_name2id_f
alias hts_name2id_f = int function(void*, const(char)*)*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_pair32_t
alias hts_pair32_t = hts_pair_pos_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_pos_t
alias hts_pos_t = c_long
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_readrec_func
alias hts_readrec_func = int function(BGZF* fp, void* data, void* r, int* tid, hts_pos_t* beg, hts_pos_t* end)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_seek_func
alias hts_seek_func = int function(void* fp, long offset, int where)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_tell_func
alias hts_tell_func = c_long function(void* fp)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Enums

HTS_IDX_FLAG
enum HTS_IDX_FLAG

Flags for hts_idx_load3() ( and also sam_idx_load3(), tbx_idx_load3() )

HTS_PARSE_FLAGS
enum HTS_PARSE_FLAGS

////////////////////////////////////////////////////////

htsCompression
enum htsCompression

Compression type

htsExactFormat
enum htsExactFormat

Specific format (SAM, BAM, CRAM, BCF, VCF, TBI, BED, etc.)

htsFormatCategory
enum htsFormatCategory

File I/O * Broad format category (sequence data, variant data, index, regions, etc.)

hts_fmt_option
enum hts_fmt_option

Mostly CRAM only, but this could also include other format options

hts_profile_option
enum hts_profile_option

Profile options for encoding; primarily used at present in CRAM but also usable in BAM as a synonym for deflate compression levels.

sam_fields
enum sam_fields

REQUIRED_FIELDS

Functions

ed_is_big
int ed_is_big()

Endianness *

ed_swap_2
ushort ed_swap_2(ushort v)
Undocumented in source. Be warned that the author may not have intended to support it.
ed_swap_2p
void* ed_swap_2p(void* x)
Undocumented in source. Be warned that the author may not have intended to support it.
ed_swap_4
uint ed_swap_4(uint v)
Undocumented in source. Be warned that the author may not have intended to support it.
ed_swap_4p
void* ed_swap_4p(void* x)
Undocumented in source. Be warned that the author may not have intended to support it.
ed_swap_8
ulong ed_swap_8(ulong v)
Undocumented in source. Be warned that the author may not have intended to support it.
ed_swap_8p
void* ed_swap_8p(void* x)
Undocumented in source. Be warned that the author may not have intended to support it.
errmod_cal
int errmod_cal(const(errmod_t)* em, int n, int m, ushort* bases, float* q)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
errmod_destroy
void errmod_destroy(errmod_t* em)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
errmod_init
errmod_t* errmod_init(double depcorr)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_bin_bot
int hts_bin_bot(int bin, int n_lvls)
Undocumented in source. Be warned that the author may not have intended to support it.
hts_bin_first
auto hts_bin_first(T l)
Undocumented in source. Be warned that the author may not have intended to support it.
hts_bin_level
int hts_bin_level(int bin)

Compute the level of a bin in a binning index

hts_bin_parent
auto hts_bin_parent(T b)
Undocumented in source. Be warned that the author may not have intended to support it.
hts_check_EOF
int hts_check_EOF(htsFile* fp)

! @abstract Determine whether a given htsFile contains a valid EOF block @return 3 for a non-EOF checkable filetype; 2 for an unseekable file type where EOF cannot be checked; 1 for a valid EOF block; 0 for if the EOF marker is absent when it should be present; -1 (with errno set) on failure @discussion Check if the BGZF end-of-file (EOF) marker is present

hts_close
int hts_close(htsFile* fp)

! @abstract Close a file handle, flushing buffered data for output streams @param fp The file handle to be closed @return 0 for success, or negative if an error occurred.

hts_detect_format
int hts_detect_format(hFILE* fp, htsFormat* fmt)

! @abstract Determine format by peeking at the start of a file @param fp File opened for reading, positioned at the beginning @param fmt Format structure that will be filled out on return @return 0 for success, or negative if an error occurred.

hts_feature_string
const(char)* hts_feature_string()

! @abstract Introspection on the features enabled in htslib, string form

hts_features
uint hts_features()

! @abstract Introspection on the features enabled in htslib

hts_file_type
int hts_file_type(const(char)* fname)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_format_description
char* hts_format_description(const(htsFormat)* format)

! @abstract Get a human-readable description of the file format @param fmt Format structure holding type, version, compression, etc. @return Description string, to be freed by the caller after use.

hts_format_file_extension
const(char)* hts_format_file_extension(const(htsFormat)* format)

! @ abstract Returns a string containing the file format extension. @ param format Format structure containing the file type. @ return A string ("sam", "bam", etc) or "?" for unknown formats.

hts_free
void hts_free(void* ptr)

Wrapper function for free(). Enables memory deallocation across DLL boundary. Should be used by all applications, which are compiled with a different standard library than htslib and call htslib methods that return dynamically allocated data.

hts_get_format
const(htsFormat)* hts_get_format(htsFile* fp)

! @abstract Returns the file's format information @param fp The file handle @return Read-only pointer to the file's htsFormat.

hts_getline
int hts_getline(htsFile* fp, int delimiter, kstring_t* str)

! @abstract Read a line (and its \n or \r\n terminator) from a file @param fp The file handle @param delimiter Unused, but must be '\n' (or KS_SEP_LINE) @param str The line (not including the terminator) is written here @return Length of the string read; -1 on end-of-file; <= -2 on error

hts_hopen
htsFile* hts_hopen(hFILE* fp, const(char)* fn, const(char)* mode)

! @abstract Open an existing stream as a SAM/BAM/CRAM/VCF/BCF/etc file @param fn The already-open file handle @param mode Open mode, as per hts_open()

hts_idx_destroy
void hts_idx_destroy(hts_idx_t* idx)

@param idx Index structure to free

hts_idx_finish
int hts_idx_finish(hts_idx_t* idx, ulong final_offset)

@param idx Index @param final_offset Last file offset @return 0 on success; non-zero on failure.

hts_idx_fmt
int hts_idx_fmt(hts_idx_t* idx)

@param idx Index @return One of HTS_FMT_CSI, HTS_FMT_BAI or HTS_FMT_TBI

hts_idx_get_meta
ubyte* hts_idx_get_meta(hts_idx_t* idx, uint* l_meta)

@param idx The index @param l_meta Pointer to where the length of the extra data is stored @return Pointer to the extra data if present; NULL otherwise

hts_idx_get_n_no_coor
ulong hts_idx_get_n_no_coor(const(hts_idx_t)* idx)

@param idx Index @return Unplaced reads count

hts_idx_get_stat
int hts_idx_get_stat(const(hts_idx_t)* idx, int tid, ulong* mapped, ulong* unmapped)

@param idx Index @param tid Target ID @paramout mapped Location to store number of mapped reads @paramout unmapped Location to store number of unmapped reads @return 0 on success; -1 on failure (data not available)

hts_idx_init
hts_idx_t* hts_idx_init(int n, int fmt, ulong offset0, int min_shift, int n_lvls)

@param n Initial number of targets @param fmt Format, one of HTS_FMT_CSI, HTS_FMT_BAI or HTS_FMT_TBI @param offset0 Initial file offset @param min_shift Number of bits for the minimal interval @param n_lvls Number of levels in the binning index @return An initialised hts_idx_t struct on success; NULL on failure

hts_idx_load
hts_idx_t* hts_idx_load(const(char)* fn, int fmt)

@param fn BAM/BCF/etc filename, to which .bai/.csi/etc will be added or the extension substituted, to search for an existing index file. In case of a non-standard naming, the file name can include the name of the index file delimited with HTS_IDX_DELIM. @param fmt One of the HTS_FMT_* index formats @return The index, or NULL if an error occurred.

hts_idx_load2
hts_idx_t* hts_idx_load2(const(char)* fn, const(char)* fnidx)

@param fn Input BAM/BCF/etc filename @param fnidx The input index filename @return The index, or NULL if an error occurred.

hts_idx_load3
hts_idx_t* hts_idx_load3(const(char)* fn, const(char)* fnidx, int fmt, int flags)

@param fn Input BAM/BCF/etc filename @param fnidx The input index filename @param fmt One of the HTS_FMT_* index formats @param flags Flags to alter behaviour (see description) @return The index, or NULL if an error occurred.

hts_idx_nseq
int hts_idx_nseq(const(hts_idx_t)* idx)

@param idx Index @return The number of targets

hts_idx_push
int hts_idx_push(hts_idx_t* idx, int tid, hts_pos_t beg, hts_pos_t end, ulong offset, int is_mapped)

@param idx Index @param tid Target id @param beg Range start (zero-based) @param end Range end (zero-based, half-open) @param offset File offset @param is_mapped Range corresponds to a mapped read @return 0 on success; -1 on failure

hts_idx_save
int hts_idx_save(const(hts_idx_t)* idx, const(char)* fn, int fmt)

@param idx Index to be written @param fn Input BAM/BCF/etc filename, to which .bai/.csi/etc will be added @param fmt One of the HTS_FMT_* index formats @return 0 if successful, or negative if an error occurred.

hts_idx_save_as
int hts_idx_save_as(const(hts_idx_t)* idx, const(char)* fn, const(char)* fnidx, int fmt)

@param idx Index to be written @param fn Input BAM/BCF/etc filename @param fnidx Output filename, or NULL to add .bai/.csi/etc to @a fn @param fmt One of the HTS_FMT_* index formats @return 0 if successful, or negative if an error occurred.

hts_idx_seqnames
const(char*)* hts_idx_seqnames(const(hts_idx_t)* idx, int* n, hts_id2name_f getid, void* hdr)

@param idx Index @paramout n Location to store the number of targets @param getid Callback function to get the name for a target ID @param hdr Header from indexed file @return An array of pointers to the names on success; NULL on failure

hts_idx_set_meta
int hts_idx_set_meta(hts_idx_t* idx, uint l_meta, ubyte* meta, int is_copy)

@param idx The index @param l_meta Length of data @param meta Pointer to the extra data @param is_copy If not zero, a copy of the data is taken @return 0 on success; -1 on failure (out of memory).

hts_idx_tbi_name
int hts_idx_tbi_name(hts_idx_t* idx, int tid, const(char)* name)

@param idx Index @param tid Target identifier @param name Target name @return Index number of name in names list on success; -1 on failure.

hts_itr_destroy
void hts_itr_destroy(hts_itr_t* iter)

@param iter Iterator to free

hts_itr_multi_bam
int hts_itr_multi_bam(const(hts_idx_t)* idx, hts_itr_t* iter)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_itr_multi_cram
int hts_itr_multi_cram(const(hts_idx_t)* idx, hts_itr_t* iter)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_itr_multi_next
int hts_itr_multi_next(htsFile* fd, hts_itr_t* iter, void* r)

@param fp Input file handle @param iter Iterator @param r Pointer to record placeholder @return >= 0 on success, -1 when there is no more data, < -1 on error

hts_itr_next
int hts_itr_next(BGZF* fp, hts_itr_t* iter, void* r, void* data)

@param fp Input file handle @param iter Iterator @param r Pointer to record placeholder @param data Data passed to the readrec callback @return >= 0 on success, -1 when there is no more data, < -1 on error

hts_itr_query
hts_itr_t* hts_itr_query(const(hts_idx_t)* idx, int tid, hts_pos_t beg, hts_pos_t end, hts_readrec_func readrec)

@param idx Index @param tid Target ID @param beg Start of region @param end End of region @param readrec Callback to read a record from the input file @return An iterator on success; NULL on failure

hts_itr_querys
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)

@param idx Index @param reg Region specifier @param getid Callback function to return the target ID for a name @param hdr Input file header @param itr_query Callback function returning an iterator for a numeric tid, start and end position @param readrec Callback to read a record from the input file @return An iterator on success; NULL on error

hts_itr_regions
hts_itr_t* hts_itr_regions(const(hts_idx_t)* idx, hts_reglist_t* reglist, int count, hts_name2id_f getid, void* hdr, hts_itr_multi_query_func itr_specific, hts_readrec_func readrec, hts_seek_func seek, hts_tell_func tell)

@param idx Index @param reglist Region list @param count Number of items in region list @param getid Callback to convert names to target IDs @param hdr Indexed file header (passed to getid) @param itr_specific Filetype-specific callback function @param readrec Callback to read an input file record @param seek Callback to seek in the input file @param tell Callback to return current input file location @return An iterator on success; NULL on failure

hts_lib_shutdown
void hts_lib_shutdown()

@discussion * Normally HTSlib cleans up automatically when your program exits, * whether that is via exit(3) or returning from main(). However if you * have dlopen(3)ed HTSlib and wish to close it before your main program * exits, you must call hts_lib_shutdown() before dlclose(3).

hts_md5_destroy
void hts_md5_destroy(hts_md5_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_md5_final
void hts_md5_final(ubyte* digest, hts_md5_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_md5_hex
void hts_md5_hex(char* hex, const(ubyte)* digest)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_md5_init
hts_md5_context* hts_md5_init()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_md5_reset
void hts_md5_reset(hts_md5_context* ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_md5_update
void hts_md5_update(hts_md5_context* ctx, const(void)* data, c_ulong size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_open
htsFile* hts_open(const(char)* fn, const(char)* mode)

! @abstract Open a sequence data (SAM/BAM/CRAM) or variant data (VCF/BCF) or possibly-compressed textual line-orientated file @param fn The file name or "-" for stdin/stdout. For indexed files with a non-standard naming, the file name can include the name of the index file delimited with HTS_IDX_DELIM @param mode Mode matching / rwa[bcefFguxz0-9]* / @discussion With 'r' opens for reading; any further format mode letters are ignored as the format is detected by checking the first few bytes or BGZF blocks of the file. With 'w' or 'a' opens for writing or appending, with format specifier letters: b binary format (BAM, BCF, etc) rather than text (SAM, VCF, etc) c CRAM format g gzip compressed u uncompressed z bgzf compressed [0-9] zlib compression level and with non-format option letters (for any of 'r'/'w'/'a'): e close the file on exec(2) (opens with O_CLOEXEC, where supported) x create the file exclusively (opens with O_EXCL, where supported) Note that there is a distinction between 'u' and '0': the first yields plain uncompressed output whereas the latter outputs uncompressed data wrapped in the zlib format. @example rwb .. compressed BCF, BAM, FAI rwbu .. uncompressed BCF rwz .. compressed VCF rw .. uncompressed VCF

hts_open_format
htsFile* hts_open_format(const(char)* fn, const(char)* mode, const(htsFormat)* fmt)

! @abstract Open a SAM/BAM/CRAM/VCF/BCF/etc file @param fn The file name or "-" for stdin/stdout @param mode Open mode, as per hts_open() @param fmt Optional format specific parameters @discussion See hts_open() for description of fn and mode. // TODO Update documentation for s/opts/fmt/ Opts contains a format string (sam, bam, cram, vcf, bcf) which will, if defined, override mode. Opts also contains a linked list of hts_opt structures to apply to the open file handle. These can contain things like pointers to the reference or information on compression levels, block sizes, etc.

hts_opt_add
int hts_opt_add(hts_opt** opts, const(char)* c_arg)

Parses arg and appends it to the option list.

hts_opt_apply
int hts_opt_apply(htsFile* fp, hts_opt* opts)

Applies an hts_opt option list to a given htsFile.

hts_opt_free
void hts_opt_free(hts_opt* opts)

Frees an hts_opt list.

hts_parse_decimal
long hts_parse_decimal(const(char)* str, char** strend, HTS_PARSE_FLAGS flags)

The number may be expressed in scientific notation, and optionally may contain commas in the integer part (before any decimal point or E notation). @param str String to be parsed @param strend If non-NULL, set on return to point to the first character in @a str after those forming the parsed number @param flags Or'ed-together combination of HTS_PARSE_* flags @return Converted value of the parsed number.

hts_parse_format
int hts_parse_format(htsFormat* opt, const(char)* str)

Accepts a string file format (sam, bam, cram, vcf, bam) optionally followed by a comma separated list of key=value options and splits these up into the fields of htsFormat struct.

hts_parse_opt_list
int hts_parse_opt_list(htsFormat* opt, const(char)* str)

Tokenise options as (key(=value)?,)*(key(=value)?)? NB: No provision for ',' appearing in the value! Add backslashing rules?

hts_parse_reg
const(char)* hts_parse_reg(const(char)* str, int* beg, int* end)

@param str String to be parsed @param beg Set on return to the 0-based start of the region @param end Set on return to the 1-based end of the region @return Pointer to the colon or '\0' after the reference sequence name, or NULL if @a str could not be parsed.

hts_parse_reg64
const(char)* hts_parse_reg64(const(char)* str, hts_pos_t* beg, hts_pos_t* end)

@param str String to be parsed @param beg Set on return to the 0-based start of the region @param end Set on return to the 1-based end of the region @return Pointer to the colon or '\0' after the reference sequence name, or NULL if @a str could not be parsed.

hts_parse_region
const(char)* hts_parse_region(const(char)* s, int* tid, hts_pos_t* beg, hts_pos_t* end, hts_name2id_f getid, void* hdr, HTS_PARSE_FLAGS flags)

@param str String to be parsed @param tid Set on return (if not NULL) to be reference index (-1 if invalid) @param beg Set on return to the 0-based start of the region @param end Set on return to the 1-based end of the region @param getid Function pointer. Called if not NULL to set tid. @param hdr Caller data passed to getid. @param flags Bitwise HTS_PARSE_* flags listed above. @return Pointer to the byte after the end of the entire region specifier (including any trailing comma) on success, or NULL if @a str could not be parsed.

hts_readlines
char** hts_readlines(const(char)* fn, int* _n)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_readlist
char** hts_readlist(const(char)* fn, int is_file, int* _n)

! @abstract Parse comma-separated list or read list from a file @param list File name or comma-separated list @param is_file @param _n Size of the output array (number of items read) @return NULL on failure or pointer to newly allocated array of strings

hts_reg2bin
long hts_reg2bin(hts_pos_t beg, hts_pos_t end, int min_shift, int n_lvls)
Undocumented in source. Be warned that the author may not have intended to support it.
hts_reglist_create
hts_reglist_t* hts_reglist_create(char** argv, int argc, int* r_count, void* hdr, hts_name2id_f getid)

@param argv Char array of target:interval elements, e.g. chr1:2500-3600, chr1:5100, chr2 @param argc Number of items in the array @param r_count Pointer to the number of items in the resulting region list @param hdr Header for the sam/bam/cram file @param getid Callback to convert target names to target ids. @return A region list on success, NULL on failure

hts_reglist_free
void hts_reglist_free(hts_reglist_t* reglist, int count)

@param reglist Region list @param count Number of items in the list

hts_resize
int hts_resize(size_t num, size_t size, T* ptr, int flags)

@hideinitializer Macro to expand a dynamic array of a given type

hts_resize_array_
int hts_resize_array_(size_t , size_t , size_t , void* , void** , int , const(char)* )

@hideinitializer Macro to expand a dynamic array, zeroing any newly-allocated memory

hts_set_cache_size
void hts_set_cache_size(htsFile* fp, int n)

! @abstract Adds a cache of decompressed blocks, potentially speeding up seeks. This may not work for all file types (currently it is bgzf only). @param fp The file handle @param n The size of cache, in bytes

hts_set_fai_filename
int hts_set_fai_filename(htsFile* fp, const(char)* fn_aux)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_set_filter_expression
int hts_set_filter_expression(htsFile* fp, const(char)* expr)

! @abstract Sets a filter expression @return 0 for success, negative on failure @discussion To clear an existing filter, specifying expr as NULL.

hts_set_opt
int hts_set_opt(htsFile* fp, hts_fmt_option opt, ...)

! @abstract Sets a specified CRAM option on the open file handle. @param fp The file handle open the open file. @param opt The CRAM_OPT_* option. @param ... Optional arguments, dependent on the option used. @return 0 for success, or negative if an error occurred.

hts_set_thread_pool
int hts_set_thread_pool(htsFile* fp, htsThreadPool* p)

! @abstract Create extra threads to aid compress/decompression for this file @param fp The file handle @param p A pool of worker threads, previously allocated by hts_create_threads(). @return 0 for success, or negative if an error occurred.

hts_set_threads
int hts_set_threads(htsFile* fp, int n)

! @abstract Create extra threads to aid compress/decompression for this file @param fp The file handle @param n The number of worker threads to create @return 0 for success, or negative if an error occurred. @notes This function creates non-shared threads for use solely by fp. The hts_set_thread_pool function is the recommended alternative.

hts_test_feature
const(char)* hts_test_feature(uint id)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_version
const(char)* hts_version()

! @abstract Get the htslib version number @return For released versions, a string like "N.N.N"; or git describe output if using a library built within a Git repository.

probaln_glocal
int probaln_glocal(const(ubyte)* ref_, int l_ref, const(ubyte)* query, int l_query, const(ubyte)* iqual, const(probaln_par_t)* c, int* state, ubyte* q)

@param ref Reference sequence @param l_ref Length of reference @param query Query sequence @param l_query Length of query sequence @param iqual Query base qualities @param c Alignment parameters @paramout state Output alignment @paramout q Phred scaled posterior probability of statei being wrong @return Phred-scaled likelihood score, or INT_MIN on failure.

Manifest constants

FT_BCF
enum FT_BCF;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FT_BCF_GZ
enum FT_BCF_GZ;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FT_GZ
enum FT_GZ;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FT_STDIN
enum FT_STDIN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FT_UNKN
enum FT_UNKN;

hts_file_type() - Convenience function to determine file type

FT_VCF
enum FT_VCF;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
FT_VCF_GZ
enum FT_VCF_GZ;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_BZIP2
enum HTS_FEATURE_BZIP2;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_CC
enum HTS_FEATURE_CC;

Build params

HTS_FEATURE_CFLAGS
enum HTS_FEATURE_CFLAGS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_CONFIGURE
enum HTS_FEATURE_CONFIGURE;

Whether ./configure was used or vanilla Makefile

HTS_FEATURE_CPPFLAGS
enum HTS_FEATURE_CPPFLAGS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_GCS
enum HTS_FEATURE_GCS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_HTSCODECS
enum HTS_FEATURE_HTSCODECS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_LDFLAGS
enum HTS_FEATURE_LDFLAGS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_LIBCURL
enum HTS_FEATURE_LIBCURL;

Transport specific

HTS_FEATURE_LIBDEFLATE
enum HTS_FEATURE_LIBDEFLATE;

Compression options

HTS_FEATURE_LZMA
enum HTS_FEATURE_LZMA;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FEATURE_PLUGINS
enum HTS_FEATURE_PLUGINS;

Whether --enable-plugins was used

HTS_FEATURE_S3
enum HTS_FEATURE_S3;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FMT_BAI
enum HTS_FMT_BAI;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FMT_CRAI
enum HTS_FMT_CRAI;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FMT_CSI
enum HTS_FMT_CSI;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FMT_FAI
enum HTS_FMT_FAI;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_FMT_TBI
enum HTS_FMT_TBI;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_IDX_DELIM
enum HTS_IDX_DELIM;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_IDX_NOCOOR
enum HTS_IDX_NOCOOR;

! These HTS_IDX_* macros are used as special tid values for hts_itr_query()/etc, producing iterators operating as follows: - HTS_IDX_NOCOOR iterates over unmapped reads sorted at the end of the file - HTS_IDX_START iterates over the entire file - HTS_IDX_REST iterates from the current position to the end of the file - HTS_IDX_NONE always returns "no more alignment records" When one of these special tid values is used, beg and end are ignored. When REST or NONE is used, idx is also ignored and may be NULL.

HTS_IDX_NONE
enum HTS_IDX_NONE;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_IDX_REST
enum HTS_IDX_REST;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_IDX_START
enum HTS_IDX_START;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_PATH_SEPARATOR_CHAR
enum HTS_PATH_SEPARATOR_CHAR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_PATH_SEPARATOR_CHAR
enum HTS_PATH_SEPARATOR_CHAR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_PATH_SEPARATOR_STR
enum HTS_PATH_SEPARATOR_STR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_PATH_SEPARATOR_STR
enum HTS_PATH_SEPARATOR_STR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_POS_MAX
enum HTS_POS_MAX;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_POS_MIN
enum HTS_POS_MIN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_RESIZE_CLEAR
enum HTS_RESIZE_CLEAR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
HTS_VERSION
enum HTS_VERSION;

! @abstract Compile-time HTSlib version number, for use in #if checks @return For released versions X.Y.Z, an integer of the form XYYYZZ; useful for preprocessor conditionals such as #if HTS_VERSION >= 101000 // Check for v1.10 or later

PRIhts_pos
enum PRIhts_pos;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Static variables

seq_nt16_int
const(int)[16] seq_nt16_int;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
seq_nt16_int
const(int)[16] seq_nt16_int;

! @abstract Table for converting a 4-bit encoded nucleotide to about 2 bits. Returns 0/1/2/3 for 1/2/4/8 (i.e., A/C/G/T), or 4 otherwise (0 or ambiguous).

seq_nt16_str
const(char)[16] seq_nt16_str;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
seq_nt16_str
const(char)[16] seq_nt16_str;

! @abstract Table for converting a 4-bit encoded nucleotide to an IUPAC ambiguity code letter (or '=' when given 0).

seq_nt16_table
const(ubyte)[256] seq_nt16_table;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
seq_nt16_table
const(ubyte)[256] seq_nt16_table;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

aux_key_t
struct aux_key_t

? index key

errmod_t
struct errmod_t

Revised MAQ error model *

htsFile
struct htsFile

@brief File handle returned by hts_open() etc. This structure should be considered opaque by end users. There should be no need to access most fields directly in user code, and in cases where it is desirable accessor functions such as hts_get_format() are provided.

htsFormat
struct htsFormat
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
htsThreadPool
struct htsThreadPool

A combined thread pool and queue allocation size. The pool should already be defined, but qsize may be zero to indicate an appropriate queue size is taken from the pool.

hts_filter_t
struct hts_filter_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_idx_t
struct hts_idx_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_itr_t
struct hts_itr_t

@brief File iterator that can handle multiple target regions. This structure should be considered opaque by end users. It does both the stepping inside the file and the filtering of alignments. It can operate in single or multi-region mode, and depending on this, it uses different fields.

hts_md5_context
struct hts_md5_context

MD5 implementation *

hts_opt
struct hts_opt

Options for cache, (de)compression, threads, CRAM, etc.

hts_pair64_max_t
struct hts_pair64_max_t

64-bit start, end coordinate pair tracking max (internally used in hts.c)

hts_pair64_t
struct hts_pair64_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_pair_pos_t
struct hts_pair_pos_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
hts_reglist_t
struct hts_reglist_t

Region list used in iterators (NB: apparently confined to single contig/tid)

probaln_par_t
struct probaln_par_t

Probabilistic banded glocal alignment * See https://doi.org/10.1093/bioinformatics/btr076 *

Meta