Module rust_htslib::htslib
[−]
[src]
This module exposes the raw Htslib bindings.
Structs
BGZF | |
_G_fpos64_t | |
_G_fpos_t | |
_IO_FILE | |
_IO_FILE_plus | |
_IO_jump_t | |
_IO_marker | |
__BindgenBitfieldUnit | |
__bam_mplp_t | |
__bam_plp_t | |
__bgzidx_t | |
__fsid_t | |
__hts_idx_t | |
__kstring_t | |
__locale_data | |
__locale_struct | |
__mbstate_t | |
__pthread_internal_list | |
__sigset_t | |
__va_list_tag | |
_bcf_sr_regions_t | |
_region_t | |
bam1_core_t |
@typedef @abstract Structure for core alignment information. @field tid chromosome ID, defined by bam_hdr_t @field pos 0-based leftmost coordinate @field bin bin calculated by bam_reg2bin() @field qual mapping quality @field l_qname length of the query name @field flag bitwise flag @field l_extranul length of extra NULs between qname & cigar (for alignment) @field n_cigar number of CIGAR operations @field l_qseq length of the query sequence (read) @field mtid chromosome ID of next read in template, defined by bam_hdr_t @field mpos 0-based leftmost coordinate of next read in template |
bam1_t |
@typedef @abstract Structure for one alignment. @field core core information about the alignment @field l_data current length of bam1_t::data @field m_data maximum length of bam1_t::data @field data all variable-length data, concatenated; structure: qname-cigar-seq-qual-aux |
bam_hdr_t |
@typedef @abstract Structure for the alignment header. @field n_targets number of reference sequences @field l_text length of the plain text in the header @field target_len lengths of the reference sequences @field target_name names of the reference sequences @field text plain text @field sdict header dictionary |
bam_pileup1_t |
@typedef @abstract Structure for one alignment covering the pileup position. @field b pointer to the alignment @field qpos position of the read base at the pileup site, 0-based @field indel indel length; 0 for no indel, positive for ins and negative for del @field level the level of the read in the "viewer" mode @field is_del 1 iff the base on the padded read is a deletion @field is_head ??? @field is_tail ??? @field is_refskip ??? @field aux ??? |
bcf1_t | |
bcf_dec_t | |
bcf_fmt_t | |
bcf_hdr_t | |
bcf_hrec_t | |
bcf_idinfo_t | |
bcf_idpair_t | |
bcf_info_t | |
bcf_sr_t | |
bcf_srs_t | |
bgzf_mtaux_t | |
cram_fd | |
div_t | |
drand48_data | |
errmod_t |
Revised MAQ error model * |
fd_set | |
gzFile_s | |
gz_header_s | |
hFILE | |
htsFile | |
htsFormat | |
htsFormat__bindgen_ty_1 | |
htsThreadPool | |
hts_itr_t | |
hts_itr_t__bindgen_ty_1 | |
hts_md5_context |
MD5 implementation * |
hts_opt | |
hts_pair64_t | |
hts_tpool | |
internal_state | |
kbitset_t | |
ks_tokaux_t | |
ldiv_t | |
lldiv_t | |
probaln_par_t |
Probabilistic banded glocal alignment * |
pthread_cond_t__bindgen_ty_1 | |
pthread_mutex_t___pthread_mutex_s | |
pthread_rwlock_t__bindgen_ty_1 | |
random_data | |
tbx_conf_t | |
tbx_t | |
timespec | |
timeval | |
variant_t | |
z_stream_s |
Constants
Statics
Functions
_Exit⚠ | |
_IO_feof⚠ | |
_IO_ferror⚠ | |
_IO_flockfile⚠ | |
_IO_free_backup_area⚠ | |
_IO_ftrylockfile⚠ | |
_IO_funlockfile⚠ | |
_IO_getc⚠ | |
_IO_padn⚠ | |
_IO_peekc_locked⚠ | |
_IO_putc⚠ | |
_IO_seekoff⚠ | |
_IO_seekpos⚠ | |
_IO_sgetn⚠ | |
_IO_vfprintf⚠ | |
_IO_vfscanf⚠ | |
__assert⚠ | |
__assert_fail⚠ | |
__assert_perror_fail⚠ | |
__bzero⚠ | |
__ctype_get_mb_cur_max⚠ | |
__getdelim⚠ | |
__getpgid⚠ | |
__overflow⚠ | |
__stpcpy⚠ | |
__stpncpy⚠ | |
__strtok_r⚠ | |
__uflow⚠ | |
__underflow⚠ | |
_exit⚠ | |
a64l⚠ | |
abort⚠ | |
abs⚠ | |
access⚠ | |
acct⚠ | |
adler32⚠ | |
adler32_combine⚠ | |
alarm⚠ | |
aligned_alloc⚠ | |
alloca⚠ | |
at_quick_exit⚠ | |
atexit⚠ | |
atof⚠ | |
atoi⚠ | |
atol⚠ | |
atoll⚠ | |
bam_aux2A⚠ |
Get a character aux value ** @param s Pointer to the tag data, as returned by bam_aux_get(). @return The value, or 0 if the tag was not a character ('A') type If the tag is not a character type, errno is set to EINVAL. */ |
bam_aux2Z⚠ |
Get a string aux value ** @param s Pointer to the tag data, as returned by bam_aux_get(). @return Pointer to the string, or NULL if the tag was not a string type If the tag is not a string type ('Z' or 'H'), errno is set to EINVAL. */ |
bam_aux2f⚠ |
Get an integer aux value ** @param s Pointer to the tag data, as returned by bam_aux_get() @return The value, or 0 if the tag was not an integer type If the tag is not an numeric type, errno is set to EINVAL. The value of integer flags will be returned cast to a double. */ |
bam_aux2i⚠ |
Get an integer aux value ** @param s Pointer to the tag data, as returned by bam_aux_get() @return The value, or 0 if the tag was not an integer type If the tag is not an integer type, errno is set to EINVAL. This function will not return the value of floating-point tags. */ |
bam_auxB2f⚠ |
Get a floating-point value from an array-type tag ** @param s Pointer to the tag data, as returned by bam_aux_get(). @param idx 0-based Index into the array @return The idx'th value, or 0.0 on error. If the array is not a numeric type, errno is set to EINVAL. This can only actually happen if the input record has an invalid type field. If idx is greater than or equal to the value returned by bam_auxB_len(s), errno is set to ERANGE. In both cases, 0.0 will be returned. */ |
bam_auxB2i⚠ |
Get an integer value from an array-type tag ** @param s Pointer to the tag data, as returned by bam_aux_get(). @param idx 0-based Index into the array @return The idx'th value, or 0 on error. If the array is not an integer type, errno is set to EINVAL. If idx is greater than or equal to the value returned by bam_auxB_len(s), errno is set to ERANGE. In both cases, 0 will be returned. */ |
bam_auxB_len⚠ |
Get the length of an array-type ('B') tag ** @param s Pointer to the tag data, as returned by bam_aux_get(). @return The length of the array, or 0 if the tag is not an array type. If the tag is not an array type, errno is set to EINVAL. */ |
bam_aux_append⚠ | |
bam_aux_del⚠ | |
bam_aux_get⚠ |
Return a pointer to an aux record ** @param b Pointer to the bam record @param tag Desired aux tag @return Pointer to the tag data, or NULL if tag is not present or on error If the tag is not present, this function returns NULL and sets errno to ENOENT. If the bam record's aux data is corrupt (either a tag has an invalid type, or the last record is incomplete) then errno is set to EINVAL and NULL is returned. */ |
bam_aux_update_str⚠ | |
bam_cigar2qlen⚠ | |
bam_cigar2rlen⚠ | |
bam_copy1⚠ | |
bam_destroy1⚠ | |
bam_dup1⚠ | |
bam_endpos⚠ |
@abstract Calculate the rightmost base position of an alignment on the reference genome. |
bam_flag2str⚠ |
returns negative value on error |
bam_hdr_destroy⚠ | |
bam_hdr_dup⚠ | |
bam_hdr_init⚠ |
BAM I/O *** |
bam_hdr_read⚠ | |
bam_hdr_write⚠ | |
bam_init1⚠ | |
bam_mplp_auto⚠ | |
bam_mplp_constructor⚠ | |
bam_mplp_destroy⚠ | |
bam_mplp_destructor⚠ | |
bam_mplp_init⚠ | |
bam_mplp_init_overlaps⚠ |
bam_mplp_init_overlaps() - if called, mpileup will detect overlapping read pairs and for each base pair set the base quality of the lower-quality base to zero, thus effectively discarding it from calling. If the two bases are identical, the quality of the other base is increased to the sum of their qualities (capped at 200), otherwise it is multiplied by 0.8. |
bam_mplp_reset⚠ | |
bam_mplp_set_maxcnt⚠ | |
bam_name2id⚠ | |
bam_plp_auto⚠ | |
bam_plp_constructor⚠ |
bam_plp_constructor() - sets a callback to initialise any per-pileup1_t fields. @plp: The bam_plp_t initialised using bam_plp_init. @func: The callback function itself. When called, it is given the data argument (specified in bam_plp_init), the bam structure and a pointer to a locally allocated bam_pileup_cd union. This union will also be present in each bam_pileup1_t created. |
bam_plp_destroy⚠ | |
bam_plp_destructor⚠ | |
bam_plp_init⚠ |
bam_plp_init() - sets an iterator over multiple @func: see mplp_func in bam_plcmd.c in samtools for an example. Expected return status: 0 on success, -1 on end, < -1 on non-recoverable errors @data: user data to pass to @func |
bam_plp_next⚠ | |
bam_plp_push⚠ | |
bam_plp_reset⚠ | |
bam_plp_set_maxcnt⚠ | |
bam_read1⚠ | |
bam_str2flag⚠ | |
bam_write1⚠ | |
bcf_add_filter⚠ |
bcf_add_filter() - adds to the FILTER column @flt_id: filter ID to add, numeric ID returned by bcf_hdr_id2int(hdr, BCF_DT_ID, "PASS") |
bcf_add_id⚠ | |
bcf_calc_ac⚠ |
bcf_calc_ac() - calculate the number of REF and ALT alleles @header: for access to BCF_DT_ID dictionary @line: VCF line obtained from vcf_parse1 @ac: array of length line->n_allele @which: determine if INFO/AN,AC and indv fields be used |
bcf_clear⚠ |
Make the bcf1_t object ready for next read. Intended mostly for internal use, the user should rarely need to call this function directly. |
bcf_copy⚠ | |
bcf_destroy⚠ |
Deallocate a bcf1_t object |
bcf_dup⚠ | |
bcf_empty⚠ |
Same as bcf_destroy() but frees only the memory allocated by bcf1_t, not the bcf1_t object itself. |
bcf_enc_vchar⚠ | |
bcf_enc_vfloat⚠ | |
bcf_enc_vint⚠ | |
bcf_fmt_array⚠ | |
bcf_fmt_sized_array⚠ | |
bcf_get_fmt⚠ |
bcf_get_fmt() - returns pointer to FORMAT's field data @header: for access to BCF_DT_ID dictionary @line: VCF line obtained from vcf_parse1 @fmt: one of GT,PL,... |
bcf_get_fmt_id⚠ |
bcf_get_*_id() - returns pointer to FORMAT/INFO field data given the header index instead of the string ID @line: VCF line obtained from vcf_parse1 @id: The header index for the tag, obtained from bcf_hdr_id2int() |
bcf_get_format_string⚠ | |
bcf_get_format_values⚠ | |
bcf_get_info⚠ | |
bcf_get_info_id⚠ | |
bcf_get_info_values⚠ | |
bcf_get_variant_type⚠ | |
bcf_get_variant_types⚠ |
bcf_get_variant_types - returns one of VCF_REF, VCF_SNP, etc |
bcf_gt_type⚠ | |
bcf_has_filter⚠ |
Returns 1 if present, 0 if absent, or -1 if filter does not exist. "PASS" and "." can be used interchangeably. |
bcf_hdr_add_hrec⚠ | |
bcf_hdr_add_sample⚠ |
bcf_hdr_add_sample() - add a new sample. @param sample: sample name to be added |
bcf_hdr_append⚠ |
Append new VCF header line, returns 0 on success |
bcf_hdr_combine⚠ |
Copy header lines from src to dst if not already present in dst. See also bcf_translate(). Returns 0 on success or sets a bit on error: 1 .. conflicting definitions of tag length // todo |
bcf_hdr_destroy⚠ |
Destroy a BCF header struct |
bcf_hdr_dup⚠ |
Create a new header using the supplied template |
bcf_hdr_fmt_text⚠ |
Returns formatted header (newly allocated string) and its length, excluding the terminating \0. If is_bcf parameter is unset, IDX fields are discarded. @deprecated Use bcf_hdr_format() instead as it can handle huge headers. |
bcf_hdr_format⚠ |
Appends formatted header text to str.
/** If is_bcf is zero, |
bcf_hdr_get_hrec⚠ |
bcf_hdr_get_hrec() - get header line info @param type: one of the BCF_HL_* types: FLT,INFO,FMT,CTG,STR,GEN @param key: the header key for generic lines (e.g. "fileformat"), any field for structured lines, typically "ID". @param value: the value which pairs with key. Can be be NULL for BCF_HL_GEN @param str_class: the class of BCF_HL_STR line (e.g. "ALT" or "SAMPLE"), otherwise NULL |
bcf_hdr_get_version⚠ |
VCF version, e.g. VCFv4.2 |
bcf_hdr_id2int⚠ |
bcf_hdr_id2int() - Translates string into numeric ID bcf_hdr_int2id() - Translates numeric ID into string @type: one of BCF_DT_ID, BCF_DT_CTG, BCF_DT_SAMPLE @id: tag name, such as: PL, DP, GT, etc. |
bcf_hdr_init⚠ |
bcf_hdr_init() - create an empty BCF header. @param mode "r" or "w" |
bcf_hdr_merge⚠ |
bcf_hdr_merge() - copy header lines from src to dst, see also bcf_translate() @param dst: the destination header to be merged into, NULL on the first pass @param src: the source header |
bcf_hdr_parse⚠ |
The following functions are for internal use and should rarely be called directly |
bcf_hdr_parse_line⚠ | |
bcf_hdr_printf⚠ | |
bcf_hdr_read⚠ |
Reads VCF or BCF header |
bcf_hdr_remove⚠ |
bcf_hdr_remove() - remove VCF header tag @param type: one of BCF_HL_* @param key: tag name or NULL to remove all tags of the given type |
bcf_hdr_seqnames⚠ |
Creates a list of sequence names. It is up to the caller to free the list (but not the sequence names) |
bcf_hdr_set⚠ |
Read VCF header from a file and update the header |
bcf_hdr_set_samples⚠ |
bcf_hdr_set_samples() - for more efficient VCF parsing when only one/few samples are needed @samples: samples to include or exclude from file or as a comma-separated string. LIST|FILE .. select samples in list/file ^LIST|FILE .. exclude samples from list/file |
bcf_hdr_set_version⚠ | |
bcf_hdr_subset⚠ |
bcf_hdr_subset() - creates a new copy of the header removing unwanted samples @param n: number of samples to keep @param samples: names of the samples to keep @param imap: mapping from index in @samples to the sample index in the original file |
bcf_hdr_sync⚠ | |
bcf_hdr_write⚠ |
Writes VCF or BCF header |
bcf_hrec_add_key⚠ | |
bcf_hrec_destroy⚠ | |
bcf_hrec_dup⚠ | |
bcf_hrec_find_key⚠ | |
bcf_hrec_format⚠ | |
bcf_hrec_set_val⚠ | |
bcf_index_build⚠ |
bcf_index_build() - Generate and save an index file @fn: Input VCF/BCF filename @min_shift: Positive to generate CSI, or 0 to generate TBI |
bcf_index_build2⚠ |
bcf_index_build2() - Generate and save an index to a specific file @fn: Input VCF/BCF filename @fnidx: Output filename, or NULL to add .csi/.tbi to @fn @min_shift: Positive to generate CSI, or 0 to generate TBI |
bcf_index_build3⚠ |
bcf_index_build3() - Generate and save an index to a specific file @fn: Input VCF/BCF filename @fnidx: Output filename, or NULL to add .csi/.tbi to @fn @min_shift: Positive to generate CSI, or 0 to generate TBI @n_threads: Number of VCF/BCF decoder threads |
bcf_index_load2⚠ | |
bcf_init⚠ |
Initialize a bcf1_t object; equivalent to calloc(1, sizeof(bcf1_t)) |
bcf_is_snp⚠ | |
bcf_read⚠ |
bcf_read() - read next VCF or BCF record |
bcf_readrec⚠ |
Helper function for the bcf_itr_next() macro; internal use, ignore it |
bcf_remove_allele_set⚠ |
bcf_remove_allele_set() - remove ALT alleles according to bitset @rm_set @header: for access to BCF_DT_ID dictionary @line: VCF line obtained from vcf_parse1 @rm_set: pointer to kbitset_t object with bits set for allele indexes to remove |
bcf_remove_alleles⚠ |
bcf_remove_alleles() - remove ALT alleles according to bitmask @mask @header: for access to BCF_DT_ID dictionary @line: VCF line obtained from vcf_parse1 @mask: alleles to remove |
bcf_remove_filter⚠ |
bcf_remove_filter() - removes from the FILTER column @flt_id: filter ID to remove, numeric ID returned by bcf_hdr_id2int(hdr, BCF_DT_ID, "PASS") @pass: when set to 1 and no filters are present, set to PASS |
bcf_sr_add_reader⚠ |
bcf_sr_add_reader() - open new reader @readers: holder of the open readers @fname: the VCF file |
bcf_sr_destroy⚠ |
Destroy bcf_srs_t struct |
bcf_sr_destroy_threads⚠ |
Deallocates thread memory, if owned by us. |
bcf_sr_init⚠ |
Init bcf_srs_t struct |
bcf_sr_next_line⚠ |
bcf_sr_next_line() - the iterator @readers: holder of the open readers |
bcf_sr_regions_destroy⚠ | |
bcf_sr_regions_flush⚠ | |
bcf_sr_regions_init⚠ | |
bcf_sr_regions_next⚠ | |
bcf_sr_regions_overlap⚠ | |
bcf_sr_regions_seek⚠ | |
bcf_sr_remove_reader⚠ | |
bcf_sr_seek⚠ |
bcf_sr_seek() - set all readers to selected position @seq: sequence name; NULL to seek to start @pos: 0-based coordinate |
bcf_sr_set_opt⚠ | |
bcf_sr_set_regions⚠ | |
bcf_sr_set_samples⚠ |
bcf_sr_set_samples() - sets active samples @readers: holder of the open readers @samples: this can be one of: file name with one sample per line; or column-separated list of samples; or '-' for a list of samples shared by all files. If first character is the exclamation mark, all but the listed samples are included. @is_file: 0: list of samples; 1: file with sample names |
bcf_sr_set_targets⚠ |
bcf_sr_set_targets(), bcf_sr_set_regions() - init targets/regions @readers: holder of the open readers @targets: list of regions, one-based and inclusive. @is_fname: 0: targets is a comma-separated list of regions (chr,chr:from-to) 1: targets is a tabix indexed file with a list of regions (<chr,pos> or <chr,from,to>) |
bcf_sr_set_threads⚠ |
bcf_sr_set_threads() - allocates a thread-pool for use by the synced reader. @n_threads: size of thread pool |
bcf_sr_strerror⚠ | |
bcf_subset⚠ |
See the description of bcf_hdr_subset() |
bcf_subset_format⚠ | |
bcf_translate⚠ |
bcf_translate() - translate tags ids to be consistent with different header. This function is useful when lines from multiple VCF need to be combined. @dst_hdr: the destination header, to be used in bcf_write(), see also bcf_hdr_combine() @src_hdr: the source header, used in bcf_read() @src_line: line obtained by bcf_read() |
bcf_trim_alleles⚠ |
bcf_trim_alleles() - remove ALT alleles unused in genotype fields @header: for access to BCF_DT_ID dictionary @line: VCF line obtain from vcf_parse1 |
bcf_unpack⚠ | |
bcf_update_alleles⚠ |
bcf_update_alleles() and bcf_update_alleles_str() - update REF and ALLT column @alleles: Array of alleles @nals: Number of alleles @alleles_string: Comma-separated alleles, starting with the REF allele |
bcf_update_alleles_str⚠ | |
bcf_update_filter⚠ |
bcf_update_filter() - sets the FILTER column @flt_ids: The filter IDs to set, numeric IDs returned by bcf_hdr_id2int(hdr, BCF_DT_ID, "PASS") @n: Number of filters. If n==0, all filters are removed |
bcf_update_format⚠ | |
bcf_update_format_string⚠ | |
bcf_update_id⚠ |
bcf_update_id() - sets new ID string bcf_add_id() - adds to the ID string checking for duplicates |
bcf_update_info⚠ | |
bcf_write⚠ |
bcf_write() - write one VCF or BCF record. The type is determined at the open() call. |
bcmp⚠ | |
bcopy⚠ | |
bgzf_block_write⚠ |
Write length bytes from data to the file, the index will be used to decide the amount of uncompressed data to be writen to each bgzip block. If no I/O errors occur, the complete length bytes will be written (or queued for writing). @param fp BGZF file handler @param data data array to write @param length size of data to write @return number of bytes written (i.e., length); negative on error |
bgzf_check_EOF⚠ |
Check if the BGZF end-of-file (EOF) marker is present |
bgzf_close⚠ |
Close the BGZF and free all associated resources. |
bgzf_compress⚠ |
Compress a single BGZF block. |
bgzf_compression⚠ |
Return the file's compression format |
bgzf_dopen⚠ |
Open an existing file descriptor for reading or writing. |
bgzf_flush⚠ |
Write the data in the buffer to the file. |
bgzf_flush_try⚠ |
Flush the file if the remaining buffer size is smaller than size @return 0 if flushing succeeded or was not needed; negative on error |
bgzf_getc⚠ |
Read one byte from a BGZF file. It is faster than bgzf_read() @param fp BGZF file handler @return byte read; -1 on end-of-file or error |
bgzf_getline⚠ |
Read one line from a BGZF file. It is faster than bgzf_getc() |
bgzf_hopen⚠ |
Open an existing hFILE stream for reading or writing. |
bgzf_index_build_init⚠ |
Tell BGZF to build index while compressing. |
bgzf_index_dump⚠ |
Save BGZF index /** |
bgzf_index_dump_hfile⚠ |
Write a BGZF index to an hFILE /** |
bgzf_index_load⚠ |
Load BGZF index /** |
bgzf_index_load_hfile⚠ |
Load BGZF index from an hFILE /** |
bgzf_is_bgzf⚠ |
Check if a file is in the BGZF format |
bgzf_mt⚠ |
Enable multi-threading (only effective when the library was compiled with -DBGZF_MT) |
bgzf_open⚠ |
Open the specified file for reading or writing. |
bgzf_raw_read⚠ |
Read up to length bytes directly from the underlying stream without decompressing. Bypasses BGZF blocking, so must be used with care in specialised circumstances only. |
bgzf_raw_write⚠ |
Write length bytes directly to the underlying stream without compressing. Bypasses BGZF blocking, so must be used with care in specialised circumstances only. |
bgzf_read⚠ |
Read up to length bytes from the file storing into data. |
bgzf_read_block⚠ |
Read the next BGZF block. |
bgzf_seek⚠ |
Set the file to read from the location specified by pos. |
bgzf_set_cache_size⚠ |
Set the cache size. Only effective when compiled with -DBGZF_CACHE. |
bgzf_thread_pool⚠ |
Enable multi-threading (when compiled with -DBGZF_MT) via a shared thread pool. This means both encoder and decoder can balance usage across a single pool of worker jobs. |
bgzf_useek⚠ |
Position BGZF at the uncompressed offset |
bgzf_utell⚠ |
Position in uncompressed BGZF |
bgzf_write⚠ |
Write length bytes from data to the file. If no I/O errors occur, the complete length bytes will be written (or queued for writing). |
brk⚠ | |
bsearch⚠ | |
bzero⚠ | |
calloc⚠ | |
cfree⚠ | |
chdir⚠ | |
chown⚠ | |
chroot⚠ | |
clearenv⚠ | |
clearerr⚠ | |
clearerr_unlocked⚠ | |
close⚠ | |
compress⚠ | |
compress2⚠ | |
compressBound⚠ | |
confstr⚠ | |
crc32⚠ | |
crc32_combine⚠ | |
ctermid⚠ | |
daemon⚠ | |
deflate⚠ | |
deflateBound⚠ | |
deflateCopy⚠ | |
deflateEnd⚠ | |
deflateInit2_⚠ | |
deflateInit_⚠ | |
deflateParams⚠ | |
deflatePending⚠ | |
deflatePrime⚠ | |
deflateReset⚠ | |
deflateResetKeep⚠ | |
deflateSetDictionary⚠ | |
deflateSetHeader⚠ | |
deflateTune⚠ | |
div⚠ | |
dprintf⚠ | |
drand48⚠ | |
drand48_r⚠ | |
dup⚠ | |
dup2⚠ | |
ecvt⚠ | |
ecvt_r⚠ | |
endusershell⚠ | |
erand48⚠ | |
erand48_r⚠ | |
errmod_cal⚠ | |
errmod_destroy⚠ | |
errmod_init⚠ | |
execl⚠ | |
execle⚠ | |
execlp⚠ | |
execv⚠ | |
execve⚠ | |
execvp⚠ | |
exit⚠ | |
faccessat⚠ | |
fchdir⚠ | |
fchown⚠ | |
fchownat⚠ | |
fclose⚠ | |
fcvt⚠ | |
fcvt_r⚠ | |
fdatasync⚠ | |
fdopen⚠ | |
feof⚠ | |
feof_unlocked⚠ | |
ferror⚠ | |
ferror_unlocked⚠ | |
fexecve⚠ | |
fflush⚠ | |
fflush_unlocked⚠ | |
ffs⚠ | |
fgetc⚠ | |
fgetc_unlocked⚠ | |
fgetpos⚠ | |
fgets⚠ | |
fileno⚠ | |
fileno_unlocked⚠ | |
flockfile⚠ | |
fmemopen⚠ | |
fopen⚠ | |
fork⚠ | |
fpathconf⚠ | |
fprintf⚠ | |
fputc⚠ | |
fputc_unlocked⚠ | |
fputs⚠ | |
fread⚠ | |
fread_unlocked⚠ | |
free⚠ | |
freopen⚠ | |
fscanf⚠ | |
fscanf1⚠ | |
fseek⚠ | |
fseeko⚠ | |
fsetpos⚠ | |
fsync⚠ | |
ftell⚠ | |
ftello⚠ | |
ftruncate⚠ | |
ftrylockfile⚠ | |
funlockfile⚠ | |
fwrite⚠ | |
fwrite_unlocked⚠ | |
gcvt⚠ | |
get_crc_table⚠ | |
getc⚠ | |
getc_unlocked⚠ | |
getchar⚠ | |
getchar_unlocked⚠ | |
getcwd⚠ | |
getdelim⚠ | |
getdomainname⚠ | |
getdtablesize⚠ | |
getegid⚠ | |
getenv⚠ | |
geteuid⚠ | |
getgid⚠ | |
getgroups⚠ | |
gethostid⚠ | |
gethostname⚠ | |
getline⚠ | |
getloadavg⚠ | |
getlogin⚠ | |
getlogin_r⚠ | |
getopt⚠ | |
getpagesize⚠ | |
getpass⚠ | |
getpgid⚠ | |
getpgrp⚠ | |
getpid⚠ | |
getppid⚠ | |
getsid⚠ | |
getsubopt⚠ | |
getuid⚠ | |
getusershell⚠ | |
getw⚠ | |
getwd⚠ | |
gnu_dev_major⚠ | |
gnu_dev_makedev⚠ | |
gnu_dev_minor⚠ | |
gzbuffer⚠ | |
gzclearerr⚠ | |
gzclose⚠ | |
gzclose_r⚠ | |
gzclose_w⚠ | |
gzdirect⚠ | |
gzdopen⚠ | |
gzeof⚠ | |
gzerror⚠ | |
gzflush⚠ | |
gzgetc⚠ | |
gzgetc_⚠ | |
gzgets⚠ | |
gzoffset⚠ | |
gzopen⚠ | |
gzprintf⚠ | |
gzputc⚠ | |
gzputs⚠ | |
gzread⚠ | |
gzrewind⚠ | |
gzseek⚠ | |
gzsetparams⚠ | |
gztell⚠ | |
gzungetc⚠ | |
gzvprintf⚠ | |
gzwrite⚠ | |
hrec_add_idx⚠ | |
hts_check_EOF⚠ |
@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⚠ |
@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⚠ |
@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_file_type⚠ | |
hts_format_description⚠ |
@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⚠ |
@ 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_get_bgzfp⚠ | |
hts_get_format⚠ |
@abstract Returns the file's format information @param fp The file handle @return Read-only pointer to the file's htsFormat. |
hts_get_log_level⚠ |
Gets the selected log level. |
hts_getline⚠ | |
hts_hopen⚠ |
@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⚠ | |
hts_idx_finish⚠ | |
hts_idx_get_meta⚠ |
Get extra index meta-data ** @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⚠ | |
hts_idx_get_stat⚠ | |
hts_idx_init⚠ | |
hts_idx_load⚠ |
Load an index file ** @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 @param fmt One of the HTS_FMT_* index formats @return The index, or NULL if an error occurred. */ |
hts_idx_load2⚠ |
Load a specific index file ** @param fn Input BAM/BCF/etc filename @param fnidx The input index filename @return The index, or NULL if an error occurred. */ |
hts_idx_push⚠ | |
hts_idx_save⚠ |
Save an index to a file ** @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⚠ |
Save an index to a specific file ** @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⚠ | |
hts_idx_set_meta⚠ |
Set extra index meta-data ** @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_itr_destroy⚠ | |
hts_itr_next⚠ | |
hts_itr_query⚠ | |
hts_itr_querys⚠ | |
hts_log⚠ |
Logs an event. \param severity Severity of the event: |
hts_md5_destroy⚠ |
@abstract Deallocates any memory allocated by hts_md5_init. |
hts_md5_final⚠ |
@abstract Computes the final 128-bit MD5 hash from the given context |
hts_md5_hex⚠ |
@abstract Converts a 128-bit MD5 hash into a 33-byte nul-termninated hex string. |
hts_md5_init⚠ |
@abstract Intialises an MD5 context. @discussion The expected use is to allocate an hts_md5_context using hts_md5_init(). This pointer is then passed into one or more calls of hts_md5_update() to compute successive internal portions of the MD5 sum, which can then be externalised as a full 16-byte MD5sum calculation by calling hts_md5_final(). This can then be turned into ASCII via hts_md5_hex(). |
hts_md5_reset⚠ |
@abstract Resets an md5_context to the initial state, as returned by hts_md5_init(). |
hts_md5_update⚠ |
@abstract Updates the context with the MD5 of the data. |
hts_open⚠ |
@abstract Open a SAM/BAM/CRAM/VCF/BCF/etc file @param fn The file name or "-" for stdin/stdout @param mode Mode matching / [rwa][bceguxz0-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 [rw]b .. compressed BCF, BAM, FAI [rw]bu .. uncompressed BCF [rw]z .. compressed VCF [rw] .. uncompressed VCF |
hts_open_format⚠ |
@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⚠ | |
hts_opt_apply⚠ | |
hts_opt_free⚠ | |
hts_parse_decimal⚠ |
Parse a numeric string ** 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⚠ | |
hts_parse_opt_list⚠ | |
hts_parse_reg⚠ |
Parse a "CHR:START-END"-style region string ** @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_readlines⚠ | |
hts_readlist⚠ |
@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_set_cache_size⚠ |
@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⚠ |
@abstract Set .fai filename for a file opened for reading @return 0 for success, negative on failure @discussion Called before *_hdr_read(), this provides the name of a .fai file used to provide a reference list if the htsFile contains no @SQ headers. |
hts_set_log_level⚠ |
Sets the selected log level. |
hts_set_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⚠ |
@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⚠ |
@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_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. |
index⚠ | |
inflate⚠ | |
inflateBack⚠ | |
inflateBackEnd⚠ | |
inflateBackInit_⚠ | |
inflateCopy⚠ | |
inflateEnd⚠ | |
inflateGetDictionary⚠ | |
inflateGetHeader⚠ | |
inflateInit2_⚠ | |
inflateInit_⚠ | |
inflateMark⚠ | |
inflatePrime⚠ | |
inflateReset⚠ | |
inflateReset2⚠ | |
inflateResetKeep⚠ | |
inflateSetDictionary⚠ | |
inflateSync⚠ | |
inflateSyncPoint⚠ | |
inflateUndermine⚠ | |
initstate⚠ | |
initstate_r⚠ | |
isatty⚠ | |
jrand48⚠ | |
jrand48_r⚠ | |
kgetline⚠ | |
kmemmem⚠ | |
kputd⚠ | |
ksplit_core⚠ | |
ksprintf⚠ | |
kstrnstr⚠ | |
kstrstr⚠ | |
kstrtok⚠ | |
kvsprintf⚠ | |
l64a⚠ | |
labs⚠ | |
lchown⚠ | |
lcong48⚠ | |
lcong48_r⚠ | |
ldiv⚠ | |
link⚠ | |
linkat⚠ | |
llabs⚠ | |
lldiv⚠ | |
lockf⚠ | |
lrand48⚠ | |
lrand48_r⚠ | |
lseek⚠ | |
malloc⚠ | |
mblen⚠ | |
mbstowcs⚠ | |
mbtowc⚠ | |
memccpy⚠ | |
memchr⚠ | |
memcmp⚠ | |
memcpy⚠ | |
memmove⚠ | |
memset⚠ | |
mkdtemp⚠ | |
mkstemp⚠ | |
mkstemps⚠ | |
mktemp⚠ | |
mrand48⚠ | |
mrand48_r⚠ | |
nice⚠ | |
nrand48⚠ | |
nrand48_r⚠ | |
on_exit⚠ | |
open_memstream⚠ | |
pathconf⚠ | |
pause⚠ | |
pclose⚠ | |
perror⚠ | |
pipe⚠ | |
popen⚠ | |
posix_memalign⚠ | |
pread⚠ | |
printf⚠ | |
probaln_glocal⚠ | |
profil⚠ | |
pselect⚠ | |
putc⚠ | |
putc_unlocked⚠ | |
putchar⚠ | |
putchar_unlocked⚠ | |
putenv⚠ | |
puts⚠ | |
putw⚠ | |
pwrite⚠ | |
qecvt⚠ | |
qecvt_r⚠ | |
qfcvt⚠ | |
qfcvt_r⚠ | |
qgcvt⚠ | |
qsort⚠ | |
quick_exit⚠ | |
rand⚠ | |
rand_r⚠ | |
random⚠ | |
random_r⚠ | |
read⚠ | |
readlink⚠ | |
readlinkat⚠ | |
realloc⚠ | |
realpath⚠ | |
remove⚠ | |
rename⚠ | |
renameat⚠ | |
revoke⚠ | |
rewind⚠ | |
rindex⚠ | |
rmdir⚠ | |
rpmatch⚠ | |
sam_cap_mapq⚠ |
BAQ calculation and realignment * |
sam_format1⚠ | |
sam_hdr_parse⚠ | |
sam_hdr_read⚠ | |
sam_hdr_write⚠ | |
sam_index_build⚠ |
Generate and save an index file ** @param fn Input BAM/etc filename, to which .csi/etc will be added @param min_shift Positive to generate CSI, or 0 to generate BAI @return 0 if successful, or negative if an error occurred (usually -1; or -2: opening fn failed; -3: format not indexable; -4: failed to create and/or save the index) */ |
sam_index_build2⚠ |
Generate and save an index to a specific file ** @param fn Input BAM/CRAM/etc filename @param fnidx Output filename, or NULL to add .bai/.csi/etc to @a fn @param min_shift Positive to generate CSI, or 0 to generate BAI @return 0 if successful, or negative if an error occurred (see sam_index_build for error codes) */ |
sam_index_build3⚠ | |
sam_index_load⚠ |
Load a BAM (.csi or .bai) or CRAM (.crai) index file ** @param fp File handle of the data file whose index is being opened @param fn BAM/CRAM/etc filename to search alongside for the index file @return The index, or NULL if an error occurred. */ |
sam_index_load2⚠ |
Load a specific BAM (.csi or .bai) or CRAM (.crai) index file ** @param fp File handle of the data file whose index is being opened @param fn BAM/CRAM/etc data file filename @param fnidx Index filename, or NULL to search alongside @a fn @return The index, or NULL if an error occurred. */ |
sam_itr_queryi⚠ | |
sam_itr_querys⚠ | |
sam_open_mode⚠ | |
sam_open_mode_opts⚠ | |
sam_parse1⚠ | |
sam_prob_realn⚠ | |
sam_read1⚠ |
@return >= 0 on successfully reading a new record, -1 on end of stream, < -1 on error |
sam_write1⚠ | |
sbrk⚠ | |
scanf⚠ | |
scanf1⚠ | |
seed48⚠ | |
seed48_r⚠ | |
select⚠ | |
setbuf⚠ | |
setbuffer⚠ | |
setdomainname⚠ | |
setegid⚠ | |
setenv⚠ | |
seteuid⚠ | |
setgid⚠ | |
sethostid⚠ | |
sethostname⚠ | |
setlinebuf⚠ | |
setlogin⚠ | |
setpgid⚠ | |
setpgrp⚠ | |
setregid⚠ | |
setreuid⚠ | |
setsid⚠ | |
setstate⚠ | |
setstate_r⚠ | |
setuid⚠ | |
setusershell⚠ | |
setvbuf⚠ | |
sleep⚠ | |
snprintf⚠ | |
sprintf⚠ | |
srand⚠ | |
srand48⚠ | |
srand48_r⚠ | |
srandom⚠ | |
srandom_r⚠ | |
sscanf⚠ | |
sscanf1⚠ | |
stpcpy⚠ | |
stpncpy⚠ | |
strcasecmp⚠ | |
strcat⚠ | |
strchr⚠ | |
strcmp⚠ | |
strcoll⚠ | |
strcoll_l⚠ | |
strcpy⚠ | |
strcspn⚠ | |
strdup⚠ | |
strerror⚠ | |
strerror_l⚠ | |
strerror_r⚠ | |
strlen⚠ | |
strncasecmp⚠ | |
strncat⚠ | |
strncmp⚠ | |
strncpy⚠ | |
strndup⚠ | |
strnlen⚠ | |
strpbrk⚠ | |
strrchr⚠ | |
strsep⚠ | |
strsignal⚠ | |
strspn⚠ | |
strstr⚠ | |
strtod⚠ | |
strtof⚠ | |
strtok⚠ | |
strtok_r⚠ | |
strtol⚠ | |
strtold⚠ | |
strtoll⚠ | |
strtoq⚠ | |
strtoul⚠ | |
strtoull⚠ | |
strtouq⚠ | |
strxfrm⚠ | |
strxfrm_l⚠ | |
symlink⚠ | |
symlinkat⚠ | |
sync⚠ | |
syscall⚠ | |
sysconf⚠ | |
system⚠ | |
tbx_destroy⚠ | |
tbx_index⚠ | |
tbx_index_build⚠ | |
tbx_index_build2⚠ | |
tbx_index_build3⚠ | |
tbx_index_load⚠ | |
tbx_index_load2⚠ | |
tbx_name2id⚠ | |
tbx_readrec⚠ | |
tbx_seqnames⚠ | |
tcgetpgrp⚠ | |
tcsetpgrp⚠ | |
tempnam⚠ | |
tmpfile⚠ | |
tmpnam⚠ | |
tmpnam_r⚠ | |
truncate⚠ | |
ttyname⚠ | |
ttyname_r⚠ | |
ttyslot⚠ | |
ualarm⚠ | |
uncompress⚠ | |
ungetc⚠ | |
unlink⚠ | |
unlinkat⚠ | |
unsetenv⚠ | |
usleep⚠ | |
valloc⚠ | |
vcf_format⚠ |
The opposite of vcf_parse. It should rarely be called directly, see vcf_write |
vcf_hdr_read⚠ |
The following functions work only with VCFs and should rarely be called directly. Usually one wants to use their bcf_* alternatives, which work transparently with both VCFs and BCFs. |
vcf_hdr_write⚠ | |
vcf_parse⚠ |
Parse VCF line contained in kstring and populate the bcf1_t struct The line must not end with \n or \r characters. |
vcf_read⚠ | |
vcf_write⚠ | |
vdprintf⚠ | |
vfork⚠ | |
vfprintf⚠ | |
vfscanf⚠ | |
vfscanf1⚠ | |
vhangup⚠ | |
vprintf⚠ | |
vscanf⚠ | |
vscanf1⚠ | |
vsnprintf⚠ | |
vsprintf⚠ | |
vsscanf⚠ | |
vsscanf1⚠ | |
wcstombs⚠ | |
wctomb⚠ | |
write⚠ | |
zError⚠ | |
zlibCompileFlags⚠ | |
zlibVersion⚠ |