Versions in this module Expand all Collapse all v1 v1.0.0 Aug 14, 2020 Changes in this version + const BIGWIG_MAGIC + const BbiMaxZoomLevels + const BbiResIncrement + const BbiTypeBedGraph + const BbiTypeFixed + const BbiTypeVariable + const CIRTREE_MAGIC + const IDX_MAGIC + var ErrFraglenEstimate = fmt.Errorf("estimating fragment length failed") + func BinDiscreteMax(sum, sumSquares, min, max, n float64) float64 + func BinDiscreteMean(sum, sumSquares, min, max, n float64) float64 + func BinDiscreteMin(sum, sumSquares, min, max, n float64) float64 + func BinMax(sum, sumSquares, min, max, n float64) float64 + func BinMean(sum, sumSquares, min, max, n float64) float64 + func BinMin(sum, sumSquares, min, max, n float64) float64 + func BinVariance(sum, sumSquares, min, max, n float64) float64 + func CrosscorrelateReads(reads ReadChannel, genome Genome, maxDelay, binSize int) ([]int, []float64, int, uint64, error) + func EstimateFragmentLength(reads ReadChannel, genome Genome, maxDelay, binSize int, fraglenRange [2]int) (int, []int, []float64, uint64, error) + func FindNearest(query, subject GRanges, k int) ([]int, []int, []int) + func FindOverlaps(query, subject GRanges) ([]int, []int) + func IsBamFile(filename string) (bool, error) + func IsBigWigFile(filename string) (bool, error) + func NewEndPointList() endPointList + func ObservedOverExpectedCpG(sequence []byte) float64 + func ParseCigar(cigar BamCigar) <-chan CigarBlock + func TrackAutocorrelation(track Track, from, to int, normalize bool) (x []int, y []float64, err error) + func TrackCrosscorrelation(track1, track2 Track, from, to int, normalize bool) (x []int, y []float64, err error) + type Alphabet interface + Bases func(i byte) ([]byte, error) + Code func(i byte) (byte, error) + Decode func(i byte) (byte, error) + IsAmbiguous func(i byte) (bool, error) + IsWildcard func(i byte) (bool, error) + Length func() int + LengthUnambiguous func() int + Matching func(i byte) ([]byte, error) + String func() string + type AmbiguousNucleotideAlphabet struct + func (AmbiguousNucleotideAlphabet) Bases(i byte) ([]byte, error) + func (AmbiguousNucleotideAlphabet) Code(i byte) (byte, error) + func (AmbiguousNucleotideAlphabet) Complement(i byte) (byte, error) + func (AmbiguousNucleotideAlphabet) ComplementCoded(i byte) (byte, error) + func (AmbiguousNucleotideAlphabet) Decode(i byte) (byte, error) + func (AmbiguousNucleotideAlphabet) IsAmbiguous(i byte) (bool, error) + func (AmbiguousNucleotideAlphabet) IsWildcard(i byte) (bool, error) + func (AmbiguousNucleotideAlphabet) Length() int + func (AmbiguousNucleotideAlphabet) LengthUnambiguous() int + func (AmbiguousNucleotideAlphabet) Matching(i byte) ([]byte, error) + func (AmbiguousNucleotideAlphabet) String() string + type BData struct + ItemCount uint64 + ItemsPerBlock uint32 + KeySize uint32 + Keys [][]byte + PtrKeys []int64 + PtrValues []int64 + ValueSize uint32 + Values [][]byte + func NewBData() *BData + func (data *BData) Add(key, value []byte) error + func (data *BData) Read(file io.ReadSeeker, order binary.ByteOrder) error + func (data *BData) Write(file io.WriteSeeker, order binary.ByteOrder) 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, order binary.ByteOrder) 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 BamAuxiliary struct + Tag [2]byte + Value interface{} + func (aux *BamAuxiliary) Read(reader io.Reader) (int, error) + func (aux *BamAuxiliary) String() string + type BamBlock struct + Auxiliary []BamAuxiliary + Bin uint16 + Cigar BamCigar + Flag BamFlag + LSeq int32 + MapQ uint8 + NCigarOp uint16 + NextPosition int32 + NextRefID int32 + Position int32 + Qual BamQual + RNLength uint8 + ReadName string + RefID int32 + Seq BamSeq + TLength int32 + type BamCigar []uint32 + func (cigar BamCigar) AlignmentLength() int + func (cigar BamCigar) String() string + type BamCoverageConfig struct + BinOverlap int + BinSize int + BinningMethod string + EstimateFraglen bool + FilterChroms []string + FilterDuplicates bool + FilterMapQ int + FilterPairedEnd bool + FilterReadLengths [2]int + FilterSingleEnd bool + FilterStrand byte + FraglenBinSize int + FraglenRange [2]int + LogScale bool + Logger *log.Logger + NormalizeTrack string + PairedAsSingleEnd bool + PairedEndStrandSpecific bool + Pseudocounts [2]float64 + ShiftReads [2]int + SmoothenControl bool + SmoothenMin float64 + SmoothenSizes []int + func BamCoverageDefaultConfig() BamCoverageConfig + type BamFile struct + func OpenBamFile(filename string, args ...interface{}) (*BamFile, error) + func (obj *BamFile) Close() error + type BamFlag uint16 + func (flag BamFlag) Bit(i uint) bool + func (flag BamFlag) Duplicate() bool + func (flag BamFlag) FirstInPair() bool + func (flag BamFlag) MateReverseStrand() bool + func (flag BamFlag) MateUnmapped() bool + func (flag BamFlag) NotPassingFilters() bool + func (flag BamFlag) ReadMappedProperPaired() bool + func (flag BamFlag) ReadPaired() bool + func (flag BamFlag) ReverseStrand() bool + func (flag BamFlag) SecondInPair() bool + func (flag BamFlag) SecondaryAlignment() bool + func (flag BamFlag) Unmapped() bool + type BamHeader struct + NRef int32 + Text string + TextLength int32 + type BamQual []byte + func (qual BamQual) String() string + type BamReader struct + Genome Genome + Header BamHeader + Options BamReaderOptions + func NewBamReader(r io.Reader, args ...interface{}) (*BamReader, error) + func (reader *BamReader) Read() <-chan *BamReaderType2 + func (reader *BamReader) ReadPairedEnd() <-chan *BamReaderType2 + func (reader *BamReader) ReadSimple(joinPairs, pairedEndStrandSpecific bool) ReadChannel + func (reader *BamReader) ReadSingleEnd() <-chan *BamReaderType1 + type BamReaderOptions struct + ReadAuxiliary bool + ReadCigar bool + ReadName bool + ReadQual bool + ReadSequence bool + type BamReaderType1 struct + Error error + type BamReaderType2 struct + Block1 BamBlock + Block2 BamBlock + Error error + type BamSeq []byte + func (seq BamSeq) String() string + type BbiBlockDecoder interface + Decode func() BbiBlockDecoderIterator + type BbiBlockDecoderIterator interface + Get func() *BbiBlockDecoderType + Next func() + Ok func() bool + type BbiBlockDecoderType struct + type BbiBlockEncoder interface + Encode func(chromid int, sequence []float64, binSize int) BbiBlockEncoderIterator + type BbiBlockEncoderIterator interface + Get func() *BbiBlockEncoderType + Next func() + Ok func() bool + type BbiBlockEncoderType struct + Block []byte + 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, order binary.ByteOrder) + func (header *BbiDataHeader) WriteBuffer(buffer []byte, order binary.ByteOrder) + type BbiFile struct + ChromData BData + Header BbiHeader + Index RTree + IndexZoom []RTree + Order binary.ByteOrder + func NewBbiFile() *BbiFile + func (bwf *BbiFile) Create(writer io.WriteSeeker) error + func (bwf *BbiFile) Open(reader_ io.ReadSeeker) error + func (bwf *BbiFile) Query(reader io.ReadSeeker, chromId, from, to, binSize int) <-chan BbiQueryType + func (bwf *BbiFile) ReadIndex(reader_ io.ReadSeeker) error + func (bwf *BbiFile) ReadZoomIndex(reader_ io.ReadSeeker, i int) error + func (bwf *BbiFile) WriteChromList(writer io.WriteSeeker) error + func (bwf *BbiFile) WriteIndex(writer io.WriteSeeker) error + func (bwf *BbiFile) WriteIndexZoom(writer io.WriteSeeker, i int) error + type BbiHeader struct + CtOffset uint64 + DataOffset uint64 + DefinedFieldCount uint16 + ExtensionOffset uint64 + FieldCould uint16 + IndexOffset uint64 + Magic uint32 + MaxVal float64 + MinVal float64 + NBasesCovered uint64 + NBlocks uint64 + PtrCtOffset int64 + PtrDataOffset int64 + PtrExtensionOffset int64 + PtrIndexOffset int64 + PtrSqlOffset int64 + PtrSummaryOffset int64 + PtrUncompressBufSize int64 + SqlOffset uint64 + SumData float64 + SumSquares float64 + SummaryOffset uint64 + UncompressBufSize uint32 + Version uint16 + ZoomHeaders []BbiHeaderZoom + ZoomLevels uint16 + func NewBbiHeader() *BbiHeader + func (header *BbiHeader) Read(file io.ReadSeeker, magic uint32) (binary.ByteOrder, error) + func (header *BbiHeader) SummaryAddValue(x float64, n int) + func (header *BbiHeader) Write(file io.WriteSeeker, order binary.ByteOrder) error + func (header *BbiHeader) WriteNBlocks(file io.WriteSeeker, order binary.ByteOrder) error + func (header *BbiHeader) WriteOffsets(file io.WriteSeeker, order binary.ByteOrder) error + func (header *BbiHeader) WriteSummary(file io.WriteSeeker, order binary.ByteOrder) error + func (header *BbiHeader) WriteUncompressBufSize(file io.WriteSeeker, order binary.ByteOrder) 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, order binary.ByteOrder) error + func (zoomHeader *BbiHeaderZoom) Write(file io.WriteSeeker, order binary.ByteOrder) error + func (zoomHeader *BbiHeaderZoom) WriteNBlocks(file io.WriteSeeker, order binary.ByteOrder) error + func (zoomHeader *BbiHeaderZoom) WriteOffsets(file io.WriteSeeker, order binary.ByteOrder) error + type BbiQueryType struct + DataType byte + Error error + Quit func() + func NewBbiQueryType(quit func()) BbiQueryType + type BbiRawBlockDecoder struct + Buffer []byte + Header BbiDataHeader + func NewBbiRawBlockDecoder(buffer []byte, order binary.ByteOrder) (*BbiRawBlockDecoder, error) + func (reader *BbiRawBlockDecoder) Decode() BbiBlockDecoderIterator + func (reader *BbiRawBlockDecoder) GetDataType() byte + type BbiRawBlockDecoderIterator struct + func (it *BbiRawBlockDecoderIterator) Get() *BbiBlockDecoderType + func (it *BbiRawBlockDecoderIterator) Next() + func (it *BbiRawBlockDecoderIterator) Ok() bool + type BbiRawBlockEncoder struct + ItemsPerSlot int + func NewBbiRawBlockEncoder(itemsPerSlot int, fixedStep bool, order binary.ByteOrder) (*BbiRawBlockEncoder, error) + func (encoder *BbiRawBlockEncoder) Encode(chromid int, sequence []float64, binSize int) BbiBlockEncoderIterator + type BbiRawBlockEncoderIterator struct + func (it *BbiRawBlockEncoderIterator) Get() *BbiBlockEncoderType + func (it *BbiRawBlockEncoderIterator) Next() + func (it *BbiRawBlockEncoderIterator) Ok() bool + type BbiSummaryRecord struct + ChromId int + From int + To int + func NewBbiSummaryRecord() BbiSummaryRecord + func (record *BbiSummaryRecord) AddRecord(x BbiSummaryRecord) + func (record *BbiSummaryRecord) Reset() + type BbiSummaryStatistics struct + Max float64 + Min float64 + Sum float64 + SumSquares float64 + Valid float64 + func (obj *BbiSummaryStatistics) Add(x BbiSummaryStatistics) + func (obj *BbiSummaryStatistics) AddValue(x float64) + func (obj *BbiSummaryStatistics) Reset() + type BbiZoomBlockDecoder struct + Buffer []byte + func NewBbiZoomBlockDecoder(buffer []byte, order binary.ByteOrder) *BbiZoomBlockDecoder + func (reader *BbiZoomBlockDecoder) Decode() BbiBlockDecoderIterator + type BbiZoomBlockDecoderIterator struct + func (it *BbiZoomBlockDecoderIterator) Get() *BbiBlockDecoderType + func (it *BbiZoomBlockDecoderIterator) Next() + func (it *BbiZoomBlockDecoderIterator) Ok() bool + type BbiZoomBlockEncoder struct + ItemsPerSlot int + func NewBbiZoomBlockEncoder(itemsPerSlot, reductionLevel int, order binary.ByteOrder) (*BbiZoomBlockEncoder, error) + func (encoder *BbiZoomBlockEncoder) Encode(chromid int, sequence []float64, binSize int) BbiBlockEncoderIterator + type BbiZoomBlockEncoderIterator struct + func (it *BbiZoomBlockEncoderIterator) Get() *BbiBlockEncoderType + func (it *BbiZoomBlockEncoderIterator) Next() + func (it *BbiZoomBlockEncoderIterator) Ok() bool + type BbiZoomBlockEncoderType struct + Block []byte + From int + To int + type BbiZoomRecord struct + ChromId uint32 + End uint32 + Max float32 + Min float32 + Start uint32 + Sum float32 + SumSquares float32 + Valid uint32 + func (record *BbiZoomRecord) AddValue(x float64) + func (record *BbiZoomRecord) Read(reader io.Reader, order binary.ByteOrder) error + func (record BbiZoomRecord) Write(writer io.Writer, order binary.ByteOrder) error + type BgzfExtra struct + BSize uint16 + SI1 uint8 + SI2 uint8 + SLen uint16 + type BgzfReader struct + func NewBgzfReader(r io.Reader) (*BgzfReader, error) + func (reader *BgzfReader) GetExtra() (*BgzfExtra, error) + type BigWigFile struct + func OpenBigWigFile(filename string) (*BigWigFile, error) + func (reader *BigWigFile) Close() error + type BigWigParameters struct + BlockSize int + ItemsPerSlot int + ReductionLevels []int + func DefaultBigWigParameters() BigWigParameters + type BigWigReader struct + Bwf BbiFile + Genome Genome + Reader io.ReadSeeker + func NewBigWigReader(reader io.ReadSeeker) (*BigWigReader, error) + func (reader *BigWigReader) GetBinSize() (int, error) + func (reader *BigWigReader) Query(seqRegex string, from, to, binSize int) <-chan BbiQueryType + func (reader *BigWigReader) QuerySequence(seqregex string, f BinSummaryStatistics, binSize, binOverlap int, init float64) ([]float64, int, error) + func (reader *BigWigReader) QuerySlice(seqregex string, from, to int, f BinSummaryStatistics, binSize, binOverlap int, ...) ([]float64, int, error) + func (reader *BigWigReader) ReadBlocks() <-chan BigWigReaderType + type BigWigReaderType struct + Block []byte + Error error + type BigWigWriter struct + Bwf BbiFile + Genome Genome + Leaves map[int][]*RVertex + Parameters BigWigParameters + Writer io.WriteSeeker + func NewBigWigWriter(writer io.WriteSeeker, genome Genome, parameters BigWigParameters) (*BigWigWriter, error) + func (bww *BigWigWriter) Close() error + func (bww *BigWigWriter) StartZoomData(i int) error + func (bww *BigWigWriter) Write(seqname string, sequence []float64, binSize int) error + func (bww *BigWigWriter) WriteIndex() error + func (bww *BigWigWriter) WriteIndexZoom(i int) error + func (bww *BigWigWriter) WriteZoom(seqname string, sequence []float64, binSize, reductionLevel, i int) error + type BigWigWriterType struct + Seqname string + Sequence []float64 + type BinSummaryStatistics func(sum, sumSquares, min, max, n float64) float64 + func BinSummaryStatisticsFromString(str string) BinSummaryStatistics + type CigarBlock struct + N int + Type byte + type ComplementableAlphabet interface + Bases func(i byte) ([]byte, error) + Code func(i byte) (byte, error) + Complement func(i byte) (byte, error) + ComplementCoded func(i byte) (byte, error) + Decode func(i byte) (byte, error) + IsAmbiguous func(i byte) (bool, error) + IsWildcard func(i byte) (bool, error) + Length func() int + LengthUnambiguous func() int + Matching func(i byte) ([]byte, error) + String func() string + type GPeaks struct + func ImportXlsPeaks(filename string) (GPeaks, error) + func NewGPeaks(seqnames []string, from, to, absSummit []int, ...) GPeaks + func ReadXlsPeaks(r io.Reader) (GPeaks, error) + func (p GPeaks) AbsSummit() []int + func (p GPeaks) FoldEnrichment() []float64 + func (p GPeaks) Pileup() []float64 + func (p GPeaks) Pvalue() []float64 + func (p GPeaks) Qvalue() []float64 + type GRange struct + Range Range + Seqname string + Strand byte + type GRanges struct + Ranges []Range + Seqnames []string + Strand []byte + func ImportCpGIslandsFromTable(filename string) (GRanges, error) + func ImportCpGIslandsFromUCSC(genome string) GRanges + func NewEmptyGRanges(n int) GRanges + func NewGRanges(seqnames []string, from, to []int, strand []byte) GRanges + func Promoters(genes Genes, offset1, offset2 int) (GRanges, error) + func RandomGRanges(n, wsize int, genome Genome, useStrand bool) GRanges + func ReadCpGIslandsFromTable(r io.ReadSeeker) (GRanges, error) + func (g *GRanges) ImportBed(filename string, columns int) error + func (g *GRanges) ImportBed3(filename string) error + func (g *GRanges) ImportBed6(filename string) error + func (g *GRanges) ImportBed9(filename string) error + func (g *GRanges) ImportBedGraph(filename string) error + func (g *GRanges) ReadBed(reader io.Reader, columns int) error + func (g *GRanges) ReadBed3(r io.Reader) error + func (g *GRanges) ReadBed6(r io.Reader) error + func (g *GRanges) ReadBed9(r io.Reader) error + func (g *GRanges) ReadBedGraph(r io.Reader) error + func (granges *GRanges) ImportBamPairedEnd(filename string, args ...interface{}) error + func (granges *GRanges) ImportBamSingleEnd(filename string, args ...interface{}) error + func (granges *GRanges) ImportGTF(filename string, optNames, optTypes []string, optDef []interface{}) error + func (granges *GRanges) ImportTable(filename string, names, types []string) error + func (granges *GRanges) ImportTableAll(filename string) error + func (granges *GRanges) ReadBamPairedEnd(r io.Reader, args ...interface{}) error + func (granges *GRanges) ReadBamSingleEnd(r io.Reader, args ...interface{}) error + func (granges *GRanges) ReadGTF(r io.Reader, optNames, optTypes []string, defaults []interface{}) error + func (granges *GRanges) ReadTable(s io.ReadSeeker, names, types []string) error + func (granges *GRanges) ReadTableAll(s io.ReadSeeker) error + func (granges GRanges) ExportBed3(filename string, compress bool) error + func (granges GRanges) ExportBed6(filename string, compress bool) error + func (granges GRanges) ExportBed9(filename string, compress bool) error + func (granges GRanges) ExportBedGraph(filename string, compress bool) error + func (granges GRanges) ExportGTF(filename string) error + func (granges GRanges) ExportTable(filename string, header, strand, compress bool, args ...interface{}) error + func (granges GRanges) Genes() Genes + func (granges GRanges) PrintPretty(n int, args ...interface{}) string + func (granges GRanges) PrintTable(header, strand bool, args ...interface{}) string + func (granges GRanges) String() string + func (granges GRanges) WriteBed3(w io.Writer) error + func (granges GRanges) WriteBed6(w io.Writer) error + func (granges GRanges) WriteBed9(w io.Writer) error + func (granges GRanges) WriteBedGraph(w io.Writer) error + func (granges GRanges) WriteGTF(w_ io.Writer) error + func (granges GRanges) WritePretty(writer io.Writer, n int, args ...interface{}) error + func (granges GRanges) WriteTable(writer io.Writer, header, strand bool, args ...interface{}) error + func (obj GRanges) AsReadChannel() ReadChannel + func (obj GRanges) Merge(granges ...GRanges) GRanges + func (r *GRanges) Clone() GRanges + func (r *GRanges) ImportBigWig(filename string, name string, s BinSummaryStatistics, binSize, binOverlap int, ...) error + func (r *GRanges) ImportTrack(track Track, revNegStrand bool) error + func (r *GRanges) ReadBigWig(bwr *BigWigReader, name string, f BinSummaryStatistics, ...) error + func (r GRanges) FilterGenome(genome Genome) GRanges + func (r GRanges) FilterStrand(s byte) GRanges + func (r GRanges) Intersection(s GRanges) GRanges + func (r GRanges) KeepOverlapsWith(subject GRanges) GRanges + func (r GRanges) Length() int + func (r GRanges) RandomPermutation() GRanges + func (r GRanges) Remove(indices []int) GRanges + func (r GRanges) RemoveOverlapsWith(subject GRanges) GRanges + func (r GRanges) Row(i int) GRangesRow + func (r GRanges) SetLengths(n int) GRanges + func (r GRanges) Slice(ifrom, ito int) GRanges + func (r GRanges) Sort(name string, reverse bool) (GRanges, error) + func (r GRanges) Subset(indices []int) GRanges + func (r1 GRanges) Append(r2 GRanges) GRanges + func (regions GRanges) ObservedOverExpectedCpG(genomicSequence StringSet) ([]float64, error) + type GRangesRow struct + func NewGRangesRow(granges GRanges, i int) GRangesRow + func (r GRangesRow) String() string + type GappedNucleotideAlphabet struct + func (GappedNucleotideAlphabet) Bases(i byte) ([]byte, error) + func (GappedNucleotideAlphabet) Code(i byte) (byte, error) + func (GappedNucleotideAlphabet) Complement(i byte) (byte, error) + func (GappedNucleotideAlphabet) ComplementCoded(i byte) (byte, error) + func (GappedNucleotideAlphabet) Decode(i byte) (byte, error) + func (GappedNucleotideAlphabet) IsAmbiguous(i byte) (bool, error) + func (GappedNucleotideAlphabet) IsWildcard(i byte) (bool, error) + func (GappedNucleotideAlphabet) Length() int + func (GappedNucleotideAlphabet) LengthUnambiguous() int + func (GappedNucleotideAlphabet) Matching(i byte) ([]byte, error) + func (GappedNucleotideAlphabet) String() string + type GenericMutableTrack struct + func (track GenericMutableTrack) AddRead(read Read, d int) error + func (track GenericMutableTrack) AddReadMeanOverlap(read Read, d int) error + func (track GenericMutableTrack) AddReadOverlap(read Read, d int) error + func (track GenericMutableTrack) AddReads(reads ReadChannel, d int, method string) int + func (track GenericMutableTrack) ImportSegmentation(bedFilename string, defState string) ([]string, error) + func (track GenericMutableTrack) MapList(tracks []Track, f func(string, int, ...float64) float64) error + func (track GenericMutableTrack) Normalize(treatment, control Track, c1, c2 float64, logScale bool) error + func (track GenericMutableTrack) QuantileNormalize(trackRef Track) error + func (track GenericMutableTrack) QuantileNormalizeToCounts(x []float64, y []int) error + func (track GenericMutableTrack) Smoothen(minCounts float64, windowSizes []int) error + func (track GenericMutableTrack) WindowMapList(tracks []Track, windowSize int, f func(string, int, ...[]float64) float64) error + func (track1 GenericMutableTrack) Map(track2 Track, f func(string, int, float64) float64) error + func (track1 GenericMutableTrack) WindowMap(track2 Track, windowSize int, f func(string, int, ...float64) float64) error + type GenericTrack struct + func (track GenericTrack) CumulativeHistogram(from, to float64, bins int) TrackHistogram + func (track GenericTrack) ExportBed(filename string, compress bool) error + func (track GenericTrack) ExportBigWig(filename string, args ...interface{}) error + func (track GenericTrack) ExportSegmentation(bedFilename, bedName, bedDescription string, compress bool, ...) error + func (track GenericTrack) GRanges(name string) (GRanges, error) + func (track GenericTrack) Histogram(from, to float64, bins int) TrackHistogram + func (track GenericTrack) Reduce(f func(string, int, float64, float64) float64, x0 float64) map[string]float64 + func (track GenericTrack) SummaryStatistics() TrackSummaryStatistics + func (track GenericTrack) WriteBed(w io.Writer) error + func (track GenericTrack) WriteBigWig(writer io.WriteSeeker, args ...interface{}) error + type Genes struct + Cds []Range + Names []string + func ImportGenesFromUCSC(genome, table string) (Genes, error) + func NewGenes(names, seqnames []string, txFrom, txTo, cdsFrom, cdsTo []int, strand []byte) Genes + func ReadUCSCGenes(filename string) (Genes, error) + func (g *Genes) Clone() Genes + func (g Genes) FindGene(name string) (int, bool) + func (genes *Genes) ImportCufflinksFPKMTracking(filename string, verbose bool) error + func (genes *Genes) ImportGTFExpr(filename string, geneIdName, exprIdName string) error + func (genes *Genes) ReadCufflinksFPKMTracking(r io.Reader, verbose bool) error + func (genes *Genes) ReadGTFExpr(r io.Reader, geneIdName, exprIdName string) error + func (genes Genes) ExportTable(filename string, header, strand, compress bool, args ...interface{}) error + func (genes Genes) PrintPretty(n int) string + func (genes Genes) PrintTable(header, strand bool, args ...interface{}) string + func (genes Genes) String() string + func (genes Genes) WritePretty(writer io.Writer, n int) error + func (genes Genes) WriteTable(writer io.Writer, header bool, args ...interface{}) error + func (obj Genes) FilterGenome(genome Genome) Genes + func (obj Genes) Intersection(subject Genes) Genes + func (obj Genes) KeepOverlapsWith(subject Genes) Genes + func (obj Genes) Remove(indices []int) Genes + func (obj Genes) RemoveOverlapsWith(subject Genes) Genes + func (obj Genes) Slice(ifrom, ito int) Genes + func (obj Genes) Sort(name string, reverse bool) (Genes, error) + func (obj Genes) Subset(indices []int) Genes + type Genome struct + Lengths []int + Seqnames []string + func BamImportGenome(filename string) (Genome, error) + func BamReadGenome(reader io.Reader) (Genome, error) + func BigWigImportGenome(filename string) (Genome, error) + func BigWigReadGenome(reader io.ReadSeeker) (Genome, error) + func NewGenome(seqnames []string, lengths []int) Genome + func (genome *Genome) AddSequence(seqname string, length int) (int, error) + func (genome *Genome) Import(filename string) error + func (genome *Genome) Read(r io.Reader) error + func (genome Genome) Clone() Genome + func (genome Genome) Equals(g Genome) bool + func (genome Genome) Filter(f func(name string, length int) bool) Genome + func (genome Genome) GetIdx(seqname string) (int, error) + func (genome Genome) Length() int + func (genome Genome) SeqLength(seqname string) (int, error) + func (genome Genome) String() string + func (genome Genome) SumLengths() int + type GenomeRng struct + Genome Genome + MaxLen int + Weights []float64 + func NewGenomeRng(genome Genome) GenomeRng + func (rng GenomeRng) Draw(wsize int) (int, int) + type Kmer string + func (obj Kmer) Matches(b Kmer, alphabet ComplementableAlphabet) bool + type KmerCatalogue struct + func NewKmerCatalogue(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet) (*KmerCatalogue, error) + func (obj *KmerCatalogue) AddKmerClass(kmer KmerClass) + func (obj *KmerCatalogue) CatalogueSize() int + func (obj *KmerCatalogue) Clone() *KmerCatalogue + func (obj *KmerCatalogue) GetKmerClass(kmer string) KmerClass + func (obj *KmerCatalogue) GetKmerClassFromId(k, id int) KmerClass + func (obj *KmerCatalogue) GetKmerClassIfPresent(kmer string) (KmerClass, bool) + type KmerCatalogueIterator struct + func NewKmerCatalogueIterator(catalogue KmerCatalogue) KmerCatalogueIterator + func (obj *KmerCatalogueIterator) Next() + func (obj KmerCatalogueIterator) Get() KmerClass + func (obj KmerCatalogueIterator) Ok() bool + type KmerClass struct + Elements []string + func NewKmerClass(k, i int, elements []string) KmerClass + func (obj KmerClass) CountAmbiguous(alphabet ComplementableAlphabet) int + func (obj KmerClass) CountWildcard(alphabet ComplementableAlphabet) int + func (obj KmerClass) Equals(b KmerClass) bool + func (obj KmerClass) Less(b KmerClass) bool + func (obj KmerClass) Matches(b KmerClass, alphabet ComplementableAlphabet) bool + func (obj KmerClass) String() string + type KmerClassId struct + I int + K int + func (a KmerClassId) Equals(b KmerClassId) bool + func (a KmerClassId) Less(b KmerClassId) bool + type KmerClassList []KmerClass + func (obj KmerClassList) Clone() KmerClassList + func (obj KmerClassList) Equals(b KmerClassList) bool + func (obj KmerClassList) Len() int + func (obj KmerClassList) Less(i, j int) bool + func (obj KmerClassList) Sort() + func (obj KmerClassList) Swap(i, j int) + func (obj KmerClassList) Union(b ...KmerClassList) KmerClassList + type KmerClassSet map[KmerClassId][]string + func (obj KmerClassSet) AsList() KmerClassList + type KmerCounter struct + func NewKmerCounter(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet, ...) (*KmerCounter, error) + func (obj *KmerCounter) Clone() *KmerCounter + func (obj *KmerCounter) CountKmers(sequence []byte) KmerCounts + func (obj *KmerCounter) Freeze() + func (obj *KmerCounter) IdentifyKmers(sequence []byte) KmerCounts + type KmerCounts struct + Counts map[KmerClassId]int + Kmers KmerClassList + func (obj *KmerCounts) SetKmers(kmers KmerClassList) + func (obj KmerCounts) At(i int) int + func (obj KmerCounts) GetCount(kmer KmerClass) int + func (obj KmerCounts) GetKmer(i int) KmerClass + func (obj KmerCounts) Iterate() KmerCountsIterator + func (obj KmerCounts) Len() int + func (obj KmerCounts) N() int + type KmerCountsIterator struct + func (obj *KmerCountsIterator) Next() + func (obj KmerCountsIterator) GetCount() int + func (obj KmerCountsIterator) GetIndex() int + func (obj KmerCountsIterator) GetKmer() KmerClass + func (obj KmerCountsIterator) Ok() bool + type KmerCountsList struct + Counts []map[KmerClassId]int + Kmers KmerClassList + func NewKmerCountsList(counts ...KmerCounts) KmerCountsList + func (obj *KmerCountsList) SetKmers(kmers KmerClassList) + func (obj *KmerCountsList) Slice(i, j int) KmerCountsList + func (obj KmerCountsList) Append(args ...KmerCounts) KmerCountsList + func (obj KmerCountsList) At(i int) KmerCounts + func (obj KmerCountsList) Len() int + type KmerCylinderIterator struct + func NewKmerCylinderIterator(k int, maxAmbiguous int, alphabet ComplementableAlphabet, j int, a_ string) KmerCylinderIterator + func (obj *KmerCylinderIterator) Next() + func (obj KmerCylinderIterator) Get() string + func (obj KmerCylinderIterator) Ok() bool + type KmerEquivalence struct + Alphabet ComplementableAlphabet + Complement bool + M int + MaxAmbiguous []int + N int + Revcomp bool + Reverse bool + func NewKmerEquivalence(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet) (KmerEquivalence, error) + func (a KmerEquivalence) Equals(b KmerEquivalence) bool + type KmerEquivalenceRelation struct + func NewKmerEquivalenceRelation(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet) (KmerEquivalenceRelation, error) + func (obj KmerEquivalenceRelation) EquivalenceClass(kmer string) KmerClass + type KmerGraph struct + func NewKmerGraph(kmers KmerClassList, rel KmerEquivalenceRelation) KmerGraph + func NewKmerGraphFromCatalogue(catalogue *KmerCatalogue) KmerGraph + func (obj KmerGraph) GetNode(kmer string) *KmerGraphNode + func (obj KmerGraph) RelatedKmers(kmer string) KmerClassList + type KmerGraphNode struct + ClusterId uint64 + Infra []*KmerGraphNode + Intra []*KmerGraphNode + Kmer KmerClass + Rank int + Supra []*KmerGraphNode + type KmerInstantiationIterator struct + func NewKmerInstantiationIterator(alphabet ComplementableAlphabet, a_ string, partial bool) KmerInstantiationIterator + func (obj *KmerInstantiationIterator) Next() + func (obj KmerInstantiationIterator) Get() string + func (obj KmerInstantiationIterator) Ok() bool + type KmerIterator struct + func NewKmerIterator(k int, maxAmbiguous int, alphabet ComplementableAlphabet) KmerIterator + func (obj *KmerIterator) Next() + func (obj KmerIterator) Get() string + func (obj KmerIterator) Ok() bool + type LazyTrack struct + BinOverlap int + BinSize int + BinSumStat BinSummaryStatistics + Bwr BigWigReader + Init float64 + Name string + func NewLazyTrack(reader io.ReadSeeker, name string, f BinSummaryStatistics, ...) (LazyTrack, error) + func (track *LazyTrack) FilterGenome(f func(name string, length int) bool) + func (track *LazyTrack) ReadBigWig(reader io.ReadSeeker, name string, f BinSummaryStatistics, ...) error + func (track LazyTrack) Clone() LazyTrack + func (track LazyTrack) CloneTrack() Track + func (track LazyTrack) GetBinSize() int + func (track LazyTrack) GetGenome() Genome + func (track LazyTrack) GetName() string + func (track LazyTrack) GetSeqNames() []string + func (track LazyTrack) GetSequence(query string) (TrackSequence, error) + func (track LazyTrack) GetSlice(r GRangesRow) ([]float64, error) + type LazyTrackFile struct + func (obj *LazyTrackFile) Close() error + func (obj *LazyTrackFile) ImportBigWig(filename, name string, s BinSummaryStatistics, binSize, binOverlap int, ...) error + type Meta struct + MetaData []interface{} + MetaName []string + func NewMeta(names []string, data []interface{}) Meta + func (m *Meta) AddMeta(name string, meta interface{}) + func (m *Meta) Clone() Meta + func (m *Meta) DeleteMeta(name string) + func (m *Meta) RenameMeta(nameOld, nameNew string) + func (m Meta) GetMeta(name string) interface{} + func (m Meta) GetMetaFloat(name string) []float64 + func (m Meta) GetMetaInt(name string) []int + func (m Meta) GetMetaRange(name string) []Range + func (m Meta) GetMetaStr(name string) []string + func (m Meta) Length() int + func (m Meta) MetaLength() int + func (m Meta) Row(i int) MetaRow + func (meta *Meta) PrintPretty(n int, args ...interface{}) string + func (meta *Meta) PrintTable(header bool, args ...interface{}) string + func (meta *Meta) ReadTable(r io.Reader, names, types []string) error + func (meta *Meta) ReduceFloat(name, nameNew string, f func([]float64) float64) + func (meta *Meta) ReduceInt(name, nameNew string, f func([]int) int) + func (meta *Meta) ReduceString(name, nameNew string, f func([]string) string) + func (meta *Meta) Sort(name string, reverse bool) (Meta, error) + func (meta *Meta) String() string + func (meta Meta) Merge(indices []int) Meta + func (meta Meta) Remove(indices []int) Meta + func (meta Meta) Slice(ifrom, ito int) Meta + func (meta Meta) Subset(indices []int) Meta + func (meta Meta) WritePretty(writer io.Writer, n int, args ...interface{}) error + func (meta Meta) WriteTable(writer io.Writer, header bool, args ...interface{}) error + func (meta1 Meta) Append(meta2 Meta) Meta + type MetaRow struct + func NewMetaRow(m Meta, i int) MetaRow + func (m MetaRow) GetMeta(name string) interface{} + func (m MetaRow) GetMetaFloat(name string) (float64, error) + func (m MetaRow) GetMetaInt(name string) (int, error) + func (m MetaRow) GetMetaStr(name string) (string, error) + type MutableTrack interface + CloneMutableTrack func() MutableTrack + GetMutableSequence func(seqname string) (TrackMutableSequence, error) + type NucleotideAlphabet struct + func (NucleotideAlphabet) Bases(i byte) ([]byte, error) + func (NucleotideAlphabet) Code(i byte) (byte, error) + func (NucleotideAlphabet) Complement(i byte) (byte, error) + func (NucleotideAlphabet) ComplementCoded(i byte) (byte, error) + func (NucleotideAlphabet) Decode(i byte) (byte, error) + func (NucleotideAlphabet) IsAmbiguous(i byte) (bool, error) + func (NucleotideAlphabet) IsWildcard(i byte) (bool, error) + func (NucleotideAlphabet) Length() int + func (NucleotideAlphabet) LengthUnambiguous() int + func (NucleotideAlphabet) Matching(i byte) ([]byte, error) + func (NucleotideAlphabet) String() string + type OptionBinOverlap struct + Value int + type OptionBinSize struct + Value int + type OptionBinningMethod struct + Value string + type OptionEstimateFraglen struct + Value bool + type OptionFilterChroms struct + Value []string + type OptionFilterDuplicates struct + Value bool + type OptionFilterMapQ struct + Value int + type OptionFilterPairedEnd struct + Value bool + type OptionFilterReadLengths struct + Value [2]int + type OptionFilterSingleEnd struct + Value bool + type OptionFilterStrand struct + Value byte + type OptionFraglenBinSize struct + Value int + type OptionFraglenRange struct + Value [2]int + type OptionLogScale struct + Value bool + type OptionLogger struct + Value *log.Logger + type OptionNormalizeTrack struct + Value string + type OptionPairedAsSingleEnd struct + Value bool + type OptionPairedEndStrandSpecific struct + Value bool + type OptionPrintScientific struct + Value bool + type OptionPseudocounts struct + Value [2]float64 + type OptionShiftReads struct + Value [2]int + type OptionSmoothenControl struct + Value bool + type OptionSmoothenMin struct + Value float64 + type OptionSmoothenSizes struct + Value []int + type OrderedStringSet struct + Seqnames []string + Sequences StringSet + func EmptyOrderedStringSet() OrderedStringSet + func NewOrderedStringSet(seqnames []string, sequences [][]byte) OrderedStringSet + func (obj *OrderedStringSet) ImportFasta(filename string) error + func (obj *OrderedStringSet) ReadFasta(reader io.Reader) error + func (obj OrderedStringSet) ExportFasta(filename string, compress bool) error + func (obj OrderedStringSet) GetSlice(name string, r Range) ([]byte, error) + func (obj OrderedStringSet) Scan(query []byte) GRanges + func (obj OrderedStringSet) WriteFasta(writer io.Writer) error + type PWM struct + func (t PWM) MaxScore(sequence []byte, revcomp bool) float64 + func (t PWM) MeanScore(sequence []byte, revcomp bool) float64 + func (t PWM) Scores(sequence []byte, revcomp bool) []float64 + 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) IsNil() bool + func (tree *RTree) Read(file io.ReadSeeker, order binary.ByteOrder) error + func (tree *RTree) Write(file io.WriteSeeker, order binary.ByteOrder) error + func (tree *RTree) WriteSize(file io.WriteSeeker, order binary.ByteOrder) error + type RTreeTraverser struct + func NewRTreeTraverser(tree *RTree, chromId, from, to int) RTreeTraverser + func (traverser *RTreeTraverser) Get() *RTreeTraverserType + func (traverser *RTreeTraverser) Next() + func (traverser *RTreeTraverser) Ok() bool + 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, order binary.ByteOrder) error + func (vertex *RVertex) ReadBlock(reader io.ReadSeeker, bwf *BbiFile, i int) ([]byte, error) + func (vertex *RVertex) Write(file io.WriteSeeker, order binary.ByteOrder) error + func (vertex *RVertex) WriteBlock(writer io.WriteSeeker, bwf *BbiFile, i int, block []byte) error + type RVertexGenerator struct + BlockSize int + ItemsPerSlot int + func NewRVertexGenerator(blockSize, itemsPerSlot int, order binary.ByteOrder) (*RVertexGenerator, error) + func (generator *RVertexGenerator) Generate(idx int, sequence []float64, binSize, reductionLevel int, fixedStep bool) <-chan RVertexGeneratorType + type RVertexGeneratorType struct + Blocks [][]byte + Vertex *RVertex + type RVertexIndexPair struct + Index int + Vertex *RVertex + type RVertexStack []RVertexIndexPair + func (stack *RVertexStack) Length() int + func (stack *RVertexStack) Pop() (*RVertex, int) + func (stack *RVertexStack) Push(v *RVertex, i int) + type Range struct + From int + To int + func NewRange(from, to int) Range + func (r Range) Intersection(s Range) Range + func (r Range) String() string + type Read struct + Duplicate bool + MapQ int + PairedEnd bool + type ReadChannel <-chan Read + type SimpleTrack struct + BinSize int + Data TMapType + Genome Genome + Name string + func AllocSimpleTrack(name string, genome Genome, binSize int) SimpleTrack + func BamCoverage(filenameTrack string, filenamesTreatment, filenamesControl []string, ...) (SimpleTrack, []fraglenEstimate, []fraglenEstimate, error) + func EmptySimpleTrack(name string) SimpleTrack + func NewSimpleTrack(name string, sequences [][]float64, genome Genome, binSize int) (SimpleTrack, error) + func (track *SimpleTrack) FilterGenome(f func(name string, length int) bool) + func (track *SimpleTrack) ImportBedGrah(filename string) error + func (track *SimpleTrack) ImportBigWig(filename string, name string, s BinSummaryStatistics, binSize, binOverlap int, ...) error + func (track *SimpleTrack) ImportWiggle(filename string) error + func (track *SimpleTrack) ReadBedGraph(reader io.Reader) error + func (track *SimpleTrack) ReadBigWig(reader io.ReadSeeker, name string, f BinSummaryStatistics, ...) error + func (track *SimpleTrack) ReadWiggle(reader io.Reader) error + func (track SimpleTrack) Clone() SimpleTrack + func (track SimpleTrack) CloneMutableTrack() MutableTrack + func (track SimpleTrack) CloneTrack() Track + func (track SimpleTrack) ExportBigWig(filename string, args ...interface{}) error + func (track SimpleTrack) GetBinSize() int + func (track SimpleTrack) GetGenome() Genome + func (track SimpleTrack) GetMutableSequence(query string) (TrackMutableSequence, error) + func (track SimpleTrack) GetName() string + func (track SimpleTrack) GetSeqNames() []string + func (track SimpleTrack) GetSequence(query string) (TrackSequence, error) + func (track SimpleTrack) GetSlice(r GRangesRow) ([]float64, error) + func (track SimpleTrack) Index(position int) int + func (track SimpleTrack) ShallowClone() SimpleTrack + func (track SimpleTrack) WriteBigWig(writer io.WriteSeeker, args ...interface{}) error + func (track SimpleTrack) WriteWiggle(filename, description string) error + type StringSet map[string][]byte + func EmptyStringSet() StringSet + func NewStringSet(seqnames []string, sequences [][]byte) StringSet + func (s StringSet) ExportFasta(filename string, compress bool) error + func (s StringSet) GetSlice(name string, r Range) ([]byte, error) + func (s StringSet) ImportFasta(filename string) error + func (s StringSet) ReadFasta(reader io.Reader) error + func (s StringSet) Scan(query []byte) GRanges + func (s StringSet) WriteFasta(writer io.Writer) error + type TFMatrix struct + Values [][]float64 + func EmptyTFMatrix() TFMatrix + func NewTFMatrix(values [][]float64, alphabet Alphabet) TFMatrix + func (t *TFMatrix) ImportMatrix(filename string) error + func (t *TFMatrix) ReadMatrix(reader io.Reader) error + func (t *TFMatrix) WriteJaspar(writer io.Writer) error + func (t *TFMatrix) WriteMatrix(writer io.Writer) error + func (t TFMatrix) Get(c byte, j int) float64 + func (t TFMatrix) GetRow(c byte) []float64 + func (t TFMatrix) Length() int + func (t TFMatrix) RevComp() TFMatrix + func (t TFMatrix) Score(sequence []byte, revcomp bool, x0 float64, f func(float64, float64) float64) (float64, error) + type TMapType map[string][]float64 + type Track interface + CloneTrack func() Track + GetBinSize func() int + GetGenome func() Genome + GetName func() string + GetSeqNames func() []string + GetSequence func(seqname string) (TrackSequence, error) + GetSlice func(r GRangesRow) ([]float64, error) + type TrackHistogram struct + Name string + X []float64 + Y []float64 + func (histogram TrackHistogram) String() string + type TrackMutableSequence struct + type TrackSequence struct + func (obj TrackSequence) At(i int) float64 + func (obj TrackSequence) AtBin(i int) float64 + func (obj TrackSequence) GetBinSize() int + func (obj TrackSequence) NBins() int + func (obj TrackSequence) Set(i int, v float64) + func (obj TrackSequence) SetBin(i int, v float64) + type TrackSummaryStatistics struct + Max float64 + Mean float64 + Min float64 + N int + Name string + func (statistics TrackSummaryStatistics) String() string