index

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2014 License: BSD-2-Clause Imports: 15 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Indexers = map[string]indexerFunc{
		"chunkrecord": NewChunkRecordIndexer,
		"line":        NewLineIndexer,
		"record":      NewRecordIndexer,
		"size":        NewSizeIndexer,
	}
)

Functions

func CreateBamIndex

func CreateBamIndex(bamFile string) (err error)

func CreateColumnIndex

func CreateColumnIndex(c *column, column int, ofile string) (count int64, err error)

func CreateSubsetIndex

func CreateSubsetIndex(s *subset, ofile string, ifile string) (count int64, err error)

func Has

func Has(t string) bool

func LoadBamIndex

func LoadBamIndex(bamFile string) (err error)

func NewColumnIndexer

func NewColumnIndexer(f *os.File) column

func NewSubsetIndexer

func NewSubsetIndexer(f *os.File) subset

func NewVirtual

func NewVirtual(t string, p string, s int64, c int64) *vIndex

func SizePart

func SizePart(part string, v *vIndex) (pos int64, length int64, err error)

func UnLoadBamIndex

func UnLoadBamIndex(bamFile string) (err error)

Types

type Idx

type Idx struct {
	T      string
	Idx    [][]int64
	Length int
}

func New

func New() *Idx

func (*Idx) Append

func (i *Idx) Append(rec []int64)

func (*Idx) Load

func (i *Idx) Load(file string) (err error)

func (*Idx) Part

func (i *Idx) Part(part string) (pos int64, length int64, err error)

func (*Idx) Range added in v0.8.5

func (i *Idx) Range(part string) (recs [][]int64, err error)

func (*Idx) Set

func (i *Idx) Set(inter map[string]interface{})

func (*Idx) Type

func (i *Idx) Type() string

type Index

type Index interface {
	Set(map[string]interface{})
	Type() string
	Append([]int64)
	Part(string) (int64, int64, error)
	Range(string) ([][]int64, error)
	Load(string) error
}

type Indexer

type Indexer interface {
	Create(string) (int64, error)
	Close() error
}

func NewBaiIndexer

func NewBaiIndexer(f *os.File) Indexer

func NewChunkRecordIndexer

func NewChunkRecordIndexer(f *os.File) Indexer

func NewLineIndexer

func NewLineIndexer(f *os.File) Indexer

func NewRecordIndexer

func NewRecordIndexer(f *os.File) Indexer

func NewSizeIndexer

func NewSizeIndexer(f *os.File) Indexer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL