Versions in this module Expand all Collapse all v0 v0.0.19 Apr 27, 2021 v0.0.18 Apr 27, 2021 v0.0.17 Mar 16, 2021 v0.0.15 Mar 16, 2021 v0.0.14 Mar 16, 2021 v0.0.13 Mar 16, 2021 v0.0.12 Mar 16, 2021 v0.0.11 Mar 16, 2021 v0.0.10 Mar 16, 2021 v0.0.9 Mar 16, 2021 v0.0.6 Mar 16, 2021 v0.0.5 Mar 15, 2021 v0.0.4 Mar 15, 2021 v0.0.3 Mar 15, 2021 v0.0.2 Mar 15, 2021 Changes in this version + const BIGBED_MAGIC + const BIGWIG_MAGIC + const BbiMaxZoomLevels + const BbiResIncrement + const CIRTREE_MAGIC + const IDX_MAGIC + type BData struct + ItemCount uint64 + ItemsPerBlock uint32 + KeySize uint32 + Keys [][]byte + ValueSize uint32 + Values [][]byte + func NewBData() *BData + func (data *BData) Add(key, value []byte) error + func (data *BData) Read(file io.ReadSeeker) error + func (data *BData) Write(file io.WriteSeeker) error + type BTree struct + ItemCount uint64 + ItemsPerBlock uint32 + KeySize uint32 + Root BVertex + ValueSize uint32 + func NewBTree(data *BData) *BTree + func (tree *BTree) Write(file io.WriteSeeker) error + type BVertex struct + Children []BVertex + IsLeaf uint8 + Keys [][]byte + Values [][]byte + func (vertex *BVertex) BuildTree(data *BData, from, to uint64, level int) (uint64, error) + type BbiBlockDecoder struct + Buffer []byte + Header BbiDataHeader + func NewBbiBlockDecoder(buffer []byte) (*BbiBlockDecoder, error) + func (reader *BbiBlockDecoder) Decode() <-chan BbiBlockDecoderType + func (reader *BbiBlockDecoder) Import(sequence []float64, binsize int) error + type BbiBlockDecoderType struct + Error error + From int + Idx int + To int + Value float64 + type BbiBlockEncoder struct + ItemsPerSlot int + func NewBbiBlockEncoder(itemsPerSlot int) (*BbiBlockEncoder, error) + func (writer *BbiBlockEncoder) EncodeBlock(chromid int, sequence []float64, binsize, reductionLevel int, fixedStep bool) <-chan BbiBlockEncoderType + type BbiBlockEncoderType struct + Block []byte + Error error + From int + To int + type BbiDataHeader struct + ChromId uint32 + End uint32 + ItemCount uint16 + Reserved byte + Span uint32 + Start uint32 + Step uint32 + Type byte + func (header *BbiDataHeader) ReadBuffer(buffer []byte) + func (header *BbiDataHeader) WriteBuffer(buffer []byte) + type BbiHeader struct + CtOffset uint64 + DataOffset uint64 + DefinedFieldCount uint16 + ExtensionOffset uint64 + FieldCould uint16 + IndexOffset uint64 + Magic uint32 + MaxVal uint64 + MinVal uint64 + NBasesCovered uint64 + NBlocks uint64 + PtrCtOffset int64 + PtrDataOffset int64 + PtrExtensionOffset int64 + PtrIndexOffset int64 + PtrSqlOffset int64 + PtrSummaryOffset int64 + PtrUncompressBufSize int64 + SqlOffset uint64 + SumData uint64 + SumSquared uint64 + SummaryOffset uint64 + UncompressBufSize uint32 + Version uint16 + ZoomHeaders []BbiHeaderZoom + ZoomLevels uint16 + func NewBbiHeader() *BbiHeader + func (header *BbiHeader) Read(file io.ReadSeeker) error + func (header *BbiHeader) Write(file io.WriteSeeker) error + func (header *BbiHeader) WriteNBlocks(file io.WriteSeeker) error + func (header *BbiHeader) WriteOffsets(file io.WriteSeeker) error + func (header *BbiHeader) WriteUncompressBufSize(file io.WriteSeeker) error + type BbiHeaderZoom struct + DataOffset uint64 + IndexOffset uint64 + NBlocks uint32 + PtrDataOffset int64 + PtrIndexOffset int64 + ReductionLevel uint32 + Reserved uint32 + func (zoomHeader *BbiHeaderZoom) Read(file io.ReadSeeker) error + func (zoomHeader *BbiHeaderZoom) Write(file io.WriteSeeker) error + func (zoomHeader *BbiHeaderZoom) WriteNBlocks(file io.WriteSeeker) error + func (zoomHeader *BbiHeaderZoom) WriteOffsets(file io.WriteSeeker) error + type BbiQueryType struct + Error error + func NewBbiQueryType() *BbiQueryType + type BbiReader struct + ChromData BData + Fptr io.ReadSeeker + Header BbiHeader + Index RTree + IndexZoom []RTree + func NewBbiReader(f io.ReadSeeker) *BbiReader + func (bwf *BbiReader) Close() error + func (bwf *BbiReader) Genome() ([]string, []int) + func (bwf *BbiReader) InitIndex() error + func (bwf *BbiReader) Query(idx, from, to, binsize int) <-chan *BbiQueryType + func (bwf *BbiReader) QueryBedBin(idx, from, to, binsize int) <-chan *BedBbiQueryType + func (bwf *BbiReader) QueryBedRaw(idx, from, to int) <-chan *BedBbiBlockDecoderType + func (bwf *BbiReader) QueryRaw(idx, from, to int) <-chan *BbiBlockDecoderType + func (bwf *BbiReader) ReadIndex(f io.ReadSeeker) error + func (bwf *BbiReader) WriteIndex(f io.WriteSeeker) error + type BbiSummaryRecord struct + ChromId int + From int + Max float64 + Min float64 + Sum float64 + SumSquares float64 + To int + Valid int + func NewBbiSummaryRecord() BbiSummaryRecord + func (record *BbiSummaryRecord) AddRecord(x BbiSummaryRecord) + func (record *BbiSummaryRecord) AddValue(x float64) + type BbiZoomBlockDecoder struct + Buffer []byte + func NewBbiZoomBlockDecoder(buffer []byte) *BbiZoomBlockDecoder + func (reader *BbiZoomBlockDecoder) Decode() <-chan BbiZoomBlockDecoderType + type BbiZoomBlockDecoderType struct + Error error + type BbiZoomRecord struct + ChromId uint32 + End uint32 + Max float32 + Min float32 + Start uint32 + Sum float32 + SumSquares float32 + Valid uint32 + func (record *BbiZoomRecord) Read(reader io.Reader) error + func (record BbiZoomRecord) Write(writer io.Writer) error + type BedBbiBlockDecoder struct + Buffer []byte + func NewBedBbiBlockDecoder(buffer []byte) (*BedBbiBlockDecoder, error) + func (reader *BedBbiBlockDecoder) Decode() <-chan *BedBbiBlockDecoderType + type BedBbiBlockDecoderType struct + Error error + From int + Idx int + To int + Value string + type BedBbiDataHeader struct + ChromId uint32 + End uint32 + Start uint32 + type BedBbiQueryType struct + Error error + func NewBedBbiQueryType() *BedBbiQueryType + type BedBbiSummaryRecord struct + ChromId int + From int + Sum float64 + To int + Valid int + func NewBedBbiSummaryRecord() *BedBbiSummaryRecord + func (record *BedBbiSummaryRecord) AddRecord(x BbiSummaryRecord) + func (record *BedBbiSummaryRecord) AddValue(x float64) + type BigBedReader struct + Genome Genome + Reader *BbiReader + func NewBigBedReader(b *BbiReader) *BigBedReader + func (bb *BigBedReader) Format(e *BedBbiBlockDecoderType) string + func (bb *BigBedReader) Iter() <-chan *BedBbiBlockDecoderType + func (bw *BigBedReader) Binsizes() []int + func (bw *BigBedReader) GetBinsize(length int, width int) int + func (bw *BigBedReader) Query(chr string, start int, end int, width int) (<-chan *BedBbiQueryType, error) + func (bw *BigBedReader) QueryBin(chr string, start int, end int, binsize int) (<-chan *BedBbiQueryType, error) + func (bw *BigBedReader) QueryRaw(chr string, start int, end int) (<-chan *BedBbiBlockDecoderType, error) + type BigWigReader struct + Genome Genome + Reader *BbiReader + func NewBigWigReader(b *BbiReader) *BigWigReader + func (bw *BigWigReader) Binsizes() []int + func (bw *BigWigReader) GetBinsize(length int, width int) int + func (bw *BigWigReader) Query(chr string, start int, end int, width int) (<-chan *BbiQueryType, error) + func (bw *BigWigReader) QueryBin(chr string, start int, end int, binsize int) (<-chan *BbiQueryType, error) + func (bw *BigWigReader) QueryRaw(chr string, start int, end int) (<-chan *BbiBlockDecoderType, error) + type Chromo struct + Idx int + Length int + Name string + type Genome struct + Chr2Idx map[string]int + Chrs []Chromo + type RTree struct + BaseEnd uint32 + BaseStart uint32 + BlockSize uint32 + ChrIdxEnd uint32 + ChrIdxStart uint32 + IdxSize uint64 + NItems uint64 + NItemsPerSlot uint32 + PtrIdxSize int64 + Root *RVertex + func NewRTree() *RTree + func (tree *RTree) BuildTree(leaves []*RVertex) error + func (tree *RTree) Read(file io.ReadSeeker) error + func (tree *RTree) Write(file io.WriteSeeker) error + func (tree *RTree) WriteSize(file io.WriteSeeker) error + type RTreeTraverser struct + Tree *RTree + func NewRTreeTraverser(tree *RTree) RTreeTraverser + func (traverser RTreeTraverser) QueryVertices(idx, from, to int) <-chan RTreeTraverserType + type RTreeTraverserType struct + Idx int + Vertex *RVertex + type RVertex struct + BaseEnd []uint32 + BaseStart []uint32 + Children []*RVertex + ChrIdxEnd []uint32 + ChrIdxStart []uint32 + DataOffset []uint64 + IsLeaf uint8 + NChildren uint16 + PtrDataOffset []int64 + PtrSizes []int64 + Sizes []uint64 + func (vertex *RVertex) Read(file io.ReadSeeker) error + func (vertex *RVertex) ReadBlockFromReader(bwf *BbiReader, i int) ([]byte, error) + func (vertex *RVertex) Write(file io.WriteSeeker) error + type RVertexGenerator struct + BlockSize int + Channel chan RVertexGeneratorType + ItemsPerSlot int + func NewRVertexGenerator(blockSize, itemsPerSlot int) (*RVertexGenerator, error) + func (generator *RVertexGenerator) Generate(idx int, sequence []float64, binsize, reductionLevel int, fixedStep bool) <-chan RVertexGeneratorType + type RVertexGeneratorType struct + Blocks [][]byte + Vertex *RVertex