allow HtslibFile to be used as underlying ptr type
iterate over all records in a file returns a HtslibIterator
Duplicate the file with the same offset
Read a SAM/BAM header, VCF/BCF header, or text header and internally store it
Read a SAM/BAM header, VCF/BCF header, or text header and internally store it
load BAM/BCF index
load SAM/BAM index from filename
load tabix index
load tabix index from file
Query htsFile with tid, start, and end returns an HtslibIterator that has type T requires index be loaded first can use Tabix index or BAI/CSI index
Query htsFile with string region returns an HtslibIterator that has type T requires index and header be loaded first can use Tabix index or BAI/CSI index
Query htsFile with array of regions returns an HtslibIterator that has type Bam1 requires index and header be loaded first
read a BAM/SAM/BCF/VCF record
reset file reading
reset file reading
seek to offset in file
set extra multithreading
set header for a HtlsibFile
get file offset
write SAM/BAM/VCF/BCF record, string, or ubyte data requires the header be loaded if writing SAM/BAM/VCF/BCF record
write internally stored header
write a string with a newline appended
get underlying file pointer wrapper
SAM/BAM/CRAM header
BCF/VCF header
is file end reached?
D File if used
dhtslib.memory kstring_t rc wrapper Since we need the filename as a null terminated string anyway just use kstring
dhtslib.memory htsFile* rc wrapper File pointer
offset of file after header if it has been loaded
SAM/BAM/CRAM index
Tabix index
text header
HtslibFile is an abstraction for htslib's htsFile using dhtslib.memory for reference counting.
Ideally this struct and its methods can replace file io across dhtslib through a standard interface. It can also centralize the ability to duplicate a file so that it can be iterated several times. It pairs with HtslibIterator.