Documentation ¶
Overview ¶
Package index provides common code for CSI and tabix BGZF indexing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoReference = errors.New("index: no reference") ErrInvalid = errors.New("index: invalid interval") )
Functions ¶
This section is empty.
Types ¶
type ChunkReader ¶
type ChunkReader struct {
// contains filtered or unexported fields
}
Reader wraps a bgzf.Reader to provide a mechanism to read a selection of BGZF chunks.
func NewChunkReader ¶
NewChunkReader returns a ChunkReader to read from r, limiting the reads to the provided chunks. The provided bgzf.Reader will be put into Blocked mode.
func (*ChunkReader) Close ¶
func (r *ChunkReader) Close() error
Close returns the bgzf.Reader to its original blocking mode and releases it. The bgzf.Reader is not closed.
type MergeStrategy ¶
MergeStrategy represents a chunk compression strategy.
var ( // Identity leaves the []bgzf.Chunk unaltered. Identity MergeStrategy = identity // Adjacent merges contiguous bgzf.Chunks. Adjacent MergeStrategy = adjacent // Squash merges all bgzf.Chunks into a single bgzf.Chunk. Squash MergeStrategy = squash )
func CompressorStrategy ¶
func CompressorStrategy(near int64) MergeStrategy
CompressorStrategy returns a MergeStrategy that will merge bgzf.Chunks that have a distance between BGZF block starts less than or equal to near.
type ReferenceStats ¶
type ReferenceStats struct { // Chunk is the span of the indexed BGZF // holding alignments to the reference. Chunk bgzf.Chunk // Mapped is the count of mapped reads. Mapped uint64 // Unmapped is the count of unmapped reads. Unmapped uint64 }
ReferenceStats holds mapping statistics for a genomic reference.