hts_idx_load

@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.

If @p fn contains the string "##idx##" (HTS_IDX_DELIM), the part before the delimiter will be used as the name of the data file and the part after it will be used as the name of the index.

Otherwise, this function tries to work out the index name as follows:

It will try appending ".csi" to @p fn It will try substituting an existing suffix (e.g. .bam, .vcf) with ".csi" Then, if @p fmt is HTS_FMT_BAI: It will try appending ".bai" to @p fn To will substituting the existing suffix (e.g. .bam) with ".bai" else if @p fmt is HTS_FMT_TBI: It will try appending ".tbi" to @p fn To will substituting the existing suffix (e.g. .vcf) with ".tbi"

If the index file is remote (served over a protocol like https), first a check is made to see is a locally cached copy is available. This is done for all of the possible names listed above. If a cached copy is not available then the index will be downloaded and stored in the current working directory, with the same name as the remote index.

Equivalent to hts_idx_load3(fn, NULL, fmt, HTS_IDX_SAVE_REMOTE);

extern (C)
hts_idx_load
(
const(char)* fn
,
int fmt
)

Meta