htslib.faidx

@file htslib/faidx.h FASTA random access.

Members

Aliases

faidx_t
alias faidx_t = __faidx_t

Opaque structure representing FASTA index

Enums

fai_format_options
enum fai_format_options

File format to be dealing with.

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

Functions

fai_build
int fai_build(const(char)* fn)

@param fn FASTA/FASTQ file name @return 0 on success; or -1 on failure

fai_build3
int fai_build3(const(char)* fn, const(char)* fnfai, const(char)* fngzi)

@param fn FASTA/FASTQ file name @param fnfai Name of .fai file to build. @param fngzi Name of .gzi file to build (if fn is bgzip-compressed). @return 0 on success; or -1 on failure

fai_destroy
void fai_destroy(faidx_t* fai)

Destroy a faidx_t struct

fai_fetch
char* fai_fetch(const(faidx_t)* fai, const(char)* reg, int* len)

@param fai Pointer to the faidx_t struct @param reg Region in the format "chr2:20,000-30,000" @param len Length of the region; -2 if seq not present, -1 general error @return Pointer to the sequence; NULL on failure

fai_fetch64
char* fai_fetch64(const(faidx_t)* fai, const(char)* reg, hts_pos_t* len)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
fai_fetchqual
char* fai_fetchqual(const(faidx_t)* fai, const(char)* reg, int* len)

@param fai Pointer to the faidx_t struct @param reg Region in the format "chr2:20,000-30,000" @param len Length of the region; -2 if seq not present, -1 general error @return Pointer to the quality string; null on failure

fai_fetchqual64
char* fai_fetchqual64(const(faidx_t)* fai, const(char)* reg, hts_pos_t* len)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
fai_load
faidx_t* fai_load(const(char)* fn)

@param fn File name of the FASTA file @return Pointer to a faidx_t struct on success, NULL on failure.

fai_load3
faidx_t* fai_load3(const(char)* fn, const(char)* fnfai, const(char)* fngzi, int flags)

@param fn File name of the FASTA file (can be compressed with bgzip). @param fnfai File name of the FASTA index. @param fngzi File name of the bgzip index. @param flags Option flags to control index file caching and creation. @return Pointer to a faidx_t struct on success, NULL on failure.

fai_load3_format
faidx_t* fai_load3_format(const(char)* fn, const(char)* fnfai, const(char)* fngzi, int flags, fai_format_options format)

@param fn File name of the FASTA/FASTQ file (can be compressed with bgzip). @param fnfai File name of the FASTA/FASTQ index. @param fngzi File name of the bgzip index. @param flags Option flags to control index file caching and creation. @param format FASTA or FASTQ file format @return Pointer to a faidx_t struct on success, NULL on failure.

fai_load_format
faidx_t* fai_load_format(const(char)* fn, fai_format_options format)

@param fn File name of the FASTA/FASTQ file @param format FASTA or FASTQ file format @return Pointer to a faidx_t struct on success, NULL on failure.

fai_parse_region
const(char)* fai_parse_region(const(faidx_t)* fai, const(char)* s, int* tid, hts_pos_t* beg, hts_pos_t* end, int flags)

@param fai Pointer to the faidx_t struct @param s Region string @param tid Returns which i-th sequence is described in the region. @param beg Returns the start of the region (0 based) @param end Returns the one past last of the region (0 based) @param flags Parsing method, see HTS_PARSE_* in hts.h. @return Pointer to end of parsed s if successful, NULL if not.

fai_path
char* fai_path(const(char)* fa)

@param fa String with the path to the reference file @return String with the path to the reference index file, or NULL on failure

fai_set_cache_size
void fai_set_cache_size(faidx_t* fai, int cache_size)

@param fai Pointer to the faidx_t struct @param cache_size Selected cache size in bytes

faidx_fetch_nseq
int faidx_fetch_nseq(const(faidx_t)* fai)

@param fai Pointer to the faidx_t struct @return The number of sequences

faidx_fetch_qual
char* faidx_fetch_qual(const(faidx_t)* fai, const(char)* c_name, int p_beg_i, int p_end_i, int* len)

@param fai Pointer to the faidx_t struct @param c_name Region name @param p_beg_i Beginning position number (zero-based) @param p_end_i End position number (zero-based) @param len Length of the region; -2 if c_name not present, -1 general error @return Pointer to the sequence; null on failure

faidx_fetch_qual64
char* faidx_fetch_qual64(const(faidx_t)* fai, const(char)* c_name, hts_pos_t p_beg_i, hts_pos_t p_end_i, hts_pos_t* len)

@param fai Pointer to the faidx_t struct @param c_name Region name @param p_beg_i Beginning position number (zero-based) @param p_end_i End position number (zero-based) @param len Length of the region; -2 if c_name not present, -1 general error @return Pointer to the sequence; null on failure

faidx_fetch_seq
char* faidx_fetch_seq(const(faidx_t)* fai, const(char)* c_name, int p_beg_i, int p_end_i, int* len)

@param fai Pointer to the faidx_t struct @param c_name Region name @param p_beg_i Beginning position number (zero-based) @param p_end_i End position number (zero-based) @param len Length of the region; -2 if c_name not present, -1 general error @return Pointer to the sequence; null on failure

faidx_fetch_seq64
char* faidx_fetch_seq64(const(faidx_t)* fai, const(char)* c_name, hts_pos_t p_beg_i, hts_pos_t p_end_i, hts_pos_t* len)

@param fai Pointer to the faidx_t struct @param c_name Region name @param p_beg_i Beginning position number (zero-based) @param p_end_i End position number (zero-based) @param len Length of the region; -2 if c_name not present, -1 general error @return Pointer to the sequence; null on failure

faidx_has_seq
int faidx_has_seq(const(faidx_t)* fai, const(char)* seq)

@param fai Pointer to the faidx_t struct @param seq Sequence name @return 1 if present or 0 if absent

faidx_iseq
const(char)* faidx_iseq(const(faidx_t)* fai, int i)

Return name of i-th sequence

faidx_nseq
int faidx_nseq(const(faidx_t)* fai)

Return number of sequences in fai index

faidx_seq_len
int faidx_seq_len(const(faidx_t)* fai, const(char)* seq)

Return sequence length, -1 if not present

Structs

__faidx_t
struct __faidx_t

@file

Meta