Documentation ¶
Overview ¶
Package tabix implements tabix coordinate sorted indexing.
Index ¶
- func WriteTo(w io.Writer, idx *Index) error
- type Index
- func (i *Index) Add(r Record, c bgzf.Chunk, placed, mapped bool) error
- func (i *Index) Chunks(ref string, beg, end int) ([]bgzf.Chunk, error)
- func (i *Index) IDs() map[string]int
- func (i *Index) MergeChunks(s index.MergeStrategy)
- func (i *Index) Names() []string
- func (i *Index) NumRefs() int
- func (i *Index) ReferenceStats(id int) (stats index.ReferenceStats, ok bool)
- func (i *Index) Unmapped() (n uint64, ok bool)
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Index ¶
type Index struct { Format byte ZeroBased bool NameColumn int32 BeginColumn int32 EndColumn int32 MetaChar rune Skip int32 // contains filtered or unexported fields }
Index is a tabix index.
func ReadFrom ¶
ReadFrom reads the tabix index from the given io.Reader. Note that the tabix specification states that the index is stored as BGZF, but ReadFrom does not perform decompression.
func (*Index) Chunks ¶
Chunks returns a []bgzf.Chunk that corresponds to the given genomic interval.
func (*Index) IDs ¶
IDs returns a map of strings to integer IDs. The returned map should not be altered.
func (*Index) MergeChunks ¶
func (i *Index) MergeChunks(s index.MergeStrategy)
MergeChunks applies the given MergeStrategy to all bins in the Index.
func (*Index) Names ¶
Names returns the reference names in the index. The returned slice should not be altered.
func (*Index) ReferenceStats ¶
func (i *Index) ReferenceStats(id int) (stats index.ReferenceStats, ok bool)
ReferenceStats returns the index statistics for the given reference and true if the statistics are valid.