index

package
v0.8.24 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 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, format string, err error)

func CreateSubsetIndex

func CreateSubsetIndex(s *subset, oifile string, ifile string, iformat string, ilength int64) (count int64, size int64, err error)

We anticipate that the input index format (iformat) will be either "array" or "matrix" and for subset indexes, the output format should be the same as the input format. Only input index format type "array" is currently supported.

func CreateSubsetNodeIndexes added in v0.8.13

func CreateSubsetNodeIndexes(s *subset, cofile string, ofile string, ifile string, iformat string, ilength int64) (coCount int64, oCount int64, oSize int64, err error)

We anticipate that the input index format (iformat) will be either "array" or "matrix" and for subset nodes, the output index format should be the same as the input format. Only input index format type "array" is currently supported.

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
	Length int
}

func New

func New() *Idx

func (*Idx) GetLength added in v0.8.12

func (i *Idx) GetLength() int64

func (*Idx) Part

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

func (*Idx) Range added in v0.8.5

func (i *Idx) Range(part string, idxFilePath string, idxLength int64) (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
	GetLength() int64
	Part(string, string, int64) (int64, int64, error)
	Range(string, string, int64) ([][]int64, error)
}

type Indexer

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

func NewBaiIndexer

func NewBaiIndexer(f *os.File) Indexer

func NewChunkRecordIndexer

func NewChunkRecordIndexer(f *os.File, nType string, snFormat string, snRecordIndexPath string) Indexer

We pass our index instantiation function the data file that we will be creating an index to, the node type, and the format of the subset node index (if the node is of type subset, otherwise snFomrat == "")

func NewLineIndexer

func NewLineIndexer(f *os.File, nType string, snFormat string, snIndexPath string) Indexer

func NewRecordIndexer

func NewRecordIndexer(f *os.File, nType string, snFormat string, snIndexPath string) Indexer

func NewSizeIndexer

func NewSizeIndexer(f *os.File, nType string, snFormat string, snIndexPath string) Indexer

Jump to

Keyboard shortcuts

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