Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type AmbiguousNucleotideAlphabet
- 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
- type BTree
- type BVertex
- type BamAuxiliary
- type BamBlock
- type BamCigar
- type BamCoverageConfig
- type BamFile
- type BamFlag
- 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
- type BamQual
- type BamReader
- type BamReaderOptions
- type BamReaderType1
- type BamReaderType2
- type BamSeq
- type BbiBlockDecoder
- type BbiBlockDecoderIterator
- type BbiBlockDecoderType
- type BbiBlockEncoder
- type BbiBlockEncoderIterator
- type BbiBlockEncoderType
- type BbiDataHeader
- type 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
- 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
- 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
- type BbiRawBlockDecoder
- type BbiRawBlockDecoderIterator
- type BbiRawBlockEncoder
- type BbiRawBlockEncoderIterator
- type BbiSummaryRecord
- type BbiSummaryStatistics
- type BbiZoomBlockDecoder
- type BbiZoomBlockDecoderIterator
- type BbiZoomBlockEncoder
- type BbiZoomBlockEncoderIterator
- type BbiZoomBlockEncoderType
- type BbiZoomRecord
- type BgzfExtra
- type BgzfReader
- type BigWigFile
- type BigWigParameters
- type BigWigReader
- 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
- type BigWigWriter
- 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
- type BinSummaryStatistics
- type CigarBlock
- type ComplementableAlphabet
- type GPeaks
- type GRange
- type GRanges
- 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 (r1 GRanges) Append(r2 GRanges) GRanges
- func (obj GRanges) AsReadChannel() ReadChannel
- func (r *GRanges) Clone() GRanges
- 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 (r GRanges) FilterGenome(genome Genome) GRanges
- func (r GRanges) FilterStrand(s byte) GRanges
- func (granges GRanges) Genes() Genes
- func (granges *GRanges) ImportBamPairedEnd(filename string, args ...interface{}) error
- func (granges *GRanges) ImportBamSingleEnd(filename string, args ...interface{}) 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 (r *GRanges) ImportBigWig(filename string, name string, s BinSummaryStatistics, binSize, binOverlap int, ...) 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 (r *GRanges) ImportTrack(track Track, revNegStrand bool) error
- func (r GRanges) Intersection(s GRanges) GRanges
- func (r GRanges) KeepOverlapsWith(subject GRanges) GRanges
- func (r GRanges) Length() int
- func (obj GRanges) Merge(granges ...GRanges) GRanges
- func (regions GRanges) ObservedOverExpectedCpG(genomicSequence StringSet) ([]float64, error)
- func (granges GRanges) PrintPretty(n int, args ...interface{}) string
- func (granges GRanges) PrintTable(header, strand bool, args ...interface{}) string
- func (r GRanges) RandomPermutation() GRanges
- func (granges *GRanges) ReadBamPairedEnd(r io.Reader, args ...interface{}) error
- func (granges *GRanges) ReadBamSingleEnd(r io.Reader, args ...interface{}) 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 (r *GRanges) ReadBigWig(bwr *BigWigReader, name string, f BinSummaryStatistics, ...) 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 (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 (granges GRanges) String() string
- func (r GRanges) Subset(indices []int) GRanges
- 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
- type GRangesRow
- type GappedNucleotideAlphabet
- 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
- 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 (track1 GenericMutableTrack) Map(track2 Track, f func(string, int, float64) float64) 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 (track1 GenericMutableTrack) WindowMap(track2 Track, windowSize int, f func(string, int, ...float64) float64) error
- func (track GenericMutableTrack) WindowMapList(tracks []Track, windowSize int, f func(string, int, ...[]float64) float64) error
- type GenericTrack
- 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
- func (g *Genes) Clone() Genes
- func (genes Genes) ExportTable(filename string, header, strand, compress bool, args ...interface{}) error
- func (obj Genes) FilterGenome(genome Genome) 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 (obj Genes) Intersection(subject Genes) Genes
- func (obj Genes) KeepOverlapsWith(subject Genes) Genes
- func (genes Genes) PrintPretty(n int) string
- func (genes Genes) PrintTable(header, strand bool, args ...interface{}) string
- func (genes *Genes) ReadCufflinksFPKMTracking(r io.Reader, verbose bool) error
- func (genes *Genes) ReadGTFExpr(r io.Reader, geneIdName, exprIdName string) error
- 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 (genes Genes) String() string
- func (obj Genes) Subset(indices []int) Genes
- func (genes Genes) WritePretty(writer io.Writer, n int) error
- func (genes Genes) WriteTable(writer io.Writer, header bool, args ...interface{}) error
- type Genome
- func (genome *Genome) AddSequence(seqname string, length int) (int, 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) Import(filename string) error
- func (genome Genome) Length() int
- func (genome *Genome) Read(r io.Reader) error
- func (genome Genome) SeqLength(seqname string) (int, error)
- func (genome Genome) String() string
- func (genome Genome) SumLengths() int
- type GenomeRng
- type Kmer
- type KmerCatalogue
- 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
- type 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
- type KmerClassList
- 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
- type KmerCounter
- type KmerCounts
- type KmerCountsIterator
- type KmerCountsList
- type KmerCylinderIterator
- type KmerEquivalence
- type KmerEquivalenceRelation
- type KmerGraph
- type KmerGraphNode
- type KmerInstantiationIterator
- type KmerIterator
- type LazyTrack
- func (track LazyTrack) Clone() LazyTrack
- func (track LazyTrack) CloneTrack() Track
- func (track *LazyTrack) FilterGenome(f func(name string, length int) bool)
- 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)
- func (track *LazyTrack) ReadBigWig(reader io.ReadSeeker, name string, f BinSummaryStatistics, ...) error
- type LazyTrackFile
- type Meta
- func (m *Meta) AddMeta(name string, meta interface{})
- func (meta1 Meta) Append(meta2 Meta) Meta
- func (m *Meta) Clone() Meta
- func (m *Meta) DeleteMeta(name 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 (meta Meta) Merge(indices []int) Meta
- func (m Meta) MetaLength() int
- 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) Remove(indices []int) Meta
- func (m *Meta) RenameMeta(nameOld, nameNew string)
- func (m Meta) Row(i int) MetaRow
- func (meta Meta) Slice(ifrom, ito int) Meta
- func (meta *Meta) Sort(name string, reverse bool) (Meta, error)
- func (meta *Meta) String() string
- 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
- type MetaRow
- type MutableTrack
- type NucleotideAlphabet
- 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
- type OptionBinSize
- type OptionBinningMethod
- type OptionEstimateFraglen
- type OptionFilterChroms
- type OptionFilterDuplicates
- type OptionFilterMapQ
- type OptionFilterPairedEnd
- type OptionFilterReadLengths
- type OptionFilterSingleEnd
- type OptionFilterStrand
- type OptionFraglenBinSize
- type OptionFraglenRange
- type OptionLogScale
- type OptionLogger
- type OptionNormalizeTrack
- type OptionPairedAsSingleEnd
- type OptionPairedEndStrandSpecific
- type OptionPrintScientific
- type OptionPseudocounts
- type OptionShiftReads
- type OptionSmoothenControl
- type OptionSmoothenMin
- type OptionSmoothenSizes
- type OrderedStringSet
- func (obj OrderedStringSet) ExportFasta(filename string, compress bool) error
- func (obj OrderedStringSet) GetSlice(name string, r Range) ([]byte, error)
- func (obj *OrderedStringSet) ImportFasta(filename string) error
- func (obj *OrderedStringSet) ReadFasta(reader io.Reader) error
- func (obj OrderedStringSet) Scan(query []byte) GRanges
- func (obj OrderedStringSet) WriteFasta(writer io.Writer) error
- type PWM
- type 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
- type RTreeTraverserType
- type RVertex
- 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
- type RVertexGeneratorType
- type RVertexIndexPair
- type RVertexStack
- type Range
- type Read
- type ReadChannel
- type SimpleTrack
- 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) Clone() SimpleTrack
- func (track SimpleTrack) CloneMutableTrack() MutableTrack
- func (track SimpleTrack) CloneTrack() Track
- func (track SimpleTrack) ExportBigWig(filename string, args ...interface{}) error
- func (track *SimpleTrack) FilterGenome(f func(name string, length int) bool)
- 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) 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) Index(position int) int
- 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) ShallowClone() SimpleTrack
- func (track SimpleTrack) WriteBigWig(writer io.WriteSeeker, args ...interface{}) error
- func (track SimpleTrack) WriteWiggle(filename, description string) error
- type 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
- func (t TFMatrix) Get(c byte, j int) float64
- func (t TFMatrix) GetRow(c byte) []float64
- func (t *TFMatrix) ImportMatrix(filename string) error
- func (t TFMatrix) Length() int
- func (t *TFMatrix) ReadMatrix(reader io.Reader) error
- func (t TFMatrix) RevComp() TFMatrix
- func (t TFMatrix) Score(sequence []byte, revcomp bool, x0 float64, f func(float64, float64) float64) (float64, error)
- func (t *TFMatrix) WriteJaspar(writer io.Writer) error
- func (t *TFMatrix) WriteMatrix(writer io.Writer) error
- type TMapType
- type Track
- type TrackHistogram
- type TrackMutableSequence
- type TrackSequence
- type TrackSummaryStatistics
Constants ¶
const BIGWIG_MAGIC = 0x888FFC26
const BbiMaxZoomLevels = 10 /* Max number of zoom levels */
const BbiResIncrement = 4 /* Amount to reduce at each zoom level */
const BbiTypeBedGraph = 1
const BbiTypeFixed = 3
const BbiTypeVariable = 2
const CIRTREE_MAGIC = 0x78ca8c91
const IDX_MAGIC = 0x2468ace0
Variables ¶
var ErrFraglenEstimate = fmt.Errorf("estimating fragment length failed")
Functions ¶
func BinDiscreteMax ¶
func BinDiscreteMean ¶
func BinDiscreteMin ¶
func BinVariance ¶
func CrosscorrelateReads ¶
func CrosscorrelateReads(reads ReadChannel, genome Genome, maxDelay, binSize int) ([]int, []float64, int, uint64, error)
Compute crosscorrelation between reads on the forward and reverse strand.
func EstimateFragmentLength ¶
func FindNearest ¶
For every query region find the k nearest subject regions including all overlapping regions.
func FindOverlaps ¶
func IsBigWigFile ¶
func NewEndPointList ¶
func NewEndPointList() endPointList
func ObservedOverExpectedCpG ¶
Gardiner-Garden and Frommer, J. Mol. Biol. (1987) 196 (2), 261-282:
observed * length / (number of C * number of G)
func ParseCigar ¶
func ParseCigar(cigar BamCigar) <-chan CigarBlock
func TrackAutocorrelation ¶
func TrackAutocorrelation(track Track, from, to int, normalize bool) (x []int, y []float64, err error)
Compute the sample autocorrelation. If [normalize] is true the result is normalized by mean and variance. The arguments [from] and [to] specify the range of the delay in basepairs.
func TrackCrosscorrelation ¶
func TrackCrosscorrelation(track1, track2 Track, from, to int, normalize bool) (x []int, y []float64, err error)
Compute the sample cross-correlation between track1 and track2. If [normalize] is true the result is normalized by mean and variance. The arguments [from] and [to] specify the range of the delay in basepairs.
Types ¶
type AmbiguousNucleotideAlphabet ¶
type AmbiguousNucleotideAlphabet struct { }
func (AmbiguousNucleotideAlphabet) Bases ¶
func (AmbiguousNucleotideAlphabet) Bases(i byte) ([]byte, error)
func (AmbiguousNucleotideAlphabet) Code ¶
func (AmbiguousNucleotideAlphabet) Code(i byte) (byte, error)
func (AmbiguousNucleotideAlphabet) Complement ¶
func (AmbiguousNucleotideAlphabet) Complement(i byte) (byte, error)
func (AmbiguousNucleotideAlphabet) ComplementCoded ¶
func (AmbiguousNucleotideAlphabet) ComplementCoded(i byte) (byte, error)
func (AmbiguousNucleotideAlphabet) Decode ¶
func (AmbiguousNucleotideAlphabet) Decode(i byte) (byte, error)
func (AmbiguousNucleotideAlphabet) IsAmbiguous ¶
func (AmbiguousNucleotideAlphabet) IsAmbiguous(i byte) (bool, error)
func (AmbiguousNucleotideAlphabet) IsWildcard ¶
func (AmbiguousNucleotideAlphabet) IsWildcard(i byte) (bool, error)
func (AmbiguousNucleotideAlphabet) Length ¶
func (AmbiguousNucleotideAlphabet) Length() int
func (AmbiguousNucleotideAlphabet) LengthUnambiguous ¶
func (AmbiguousNucleotideAlphabet) LengthUnambiguous() int
func (AmbiguousNucleotideAlphabet) Matching ¶
func (AmbiguousNucleotideAlphabet) Matching(i byte) ([]byte, error)
func (AmbiguousNucleotideAlphabet) String ¶
func (AmbiguousNucleotideAlphabet) String() string
type BData ¶
type BTree ¶
type BamAuxiliary ¶
type BamAuxiliary struct { Tag [2]byte Value interface{} }
func (*BamAuxiliary) String ¶
func (aux *BamAuxiliary) String() string
type BamCoverageConfig ¶
type BamCoverageConfig struct { Logger *log.Logger BinningMethod string BinSize int BinOverlap int NormalizeTrack string ShiftReads [2]int PairedAsSingleEnd bool PairedEndStrandSpecific bool LogScale bool Pseudocounts [2]float64 EstimateFraglen bool FraglenRange [2]int FraglenBinSize int FilterChroms []string FilterMapQ int FilterReadLengths [2]int FilterDuplicates bool FilterStrand byte FilterPairedEnd bool FilterSingleEnd bool SmoothenControl bool SmoothenSizes []int SmoothenMin float64 }
func BamCoverageDefaultConfig ¶
func BamCoverageDefaultConfig() BamCoverageConfig
type BamFile ¶
type BamFile struct { BamReader // contains filtered or unexported fields }
func OpenBamFile ¶
type BamFlag ¶
type BamFlag uint16
func (BamFlag) FirstInPair ¶
func (BamFlag) MateReverseStrand ¶
func (BamFlag) MateUnmapped ¶
func (BamFlag) NotPassingFilters ¶
func (BamFlag) ReadMappedProperPaired ¶
func (BamFlag) ReadPaired ¶
func (BamFlag) ReverseStrand ¶
func (BamFlag) SecondInPair ¶
func (BamFlag) SecondaryAlignment ¶
type BamReader ¶
type BamReader struct { BgzfReader Options BamReaderOptions Header BamHeader Genome Genome }
func (*BamReader) Read ¶
func (reader *BamReader) Read() <-chan *BamReaderType2
Read single or paired end reads
func (*BamReader) ReadPairedEnd ¶
func (reader *BamReader) ReadPairedEnd() <-chan *BamReaderType2
func (*BamReader) ReadSimple ¶
func (reader *BamReader) ReadSimple(joinPairs, pairedEndStrandSpecific bool) ReadChannel
Simplified reader of single and paired-end reads. All reads that are not mapped are dropped. For paired end reads, if [joinPairs] is true then the range gives the position and length of the entire fragment. If any of the two reads is marked as duplicate, then the result is marked as duplicate. The mapping quality of the result is the minimum quality of the two reads. Any paired end reads that are not properly paired are ignored
func (*BamReader) ReadSingleEnd ¶
func (reader *BamReader) ReadSingleEnd() <-chan *BamReaderType1
type BamReaderOptions ¶
type BamReaderType1 ¶
type BamReaderType2 ¶
type BbiBlockDecoder ¶
type BbiBlockDecoder interface {
Decode() BbiBlockDecoderIterator
}
type BbiBlockDecoderIterator ¶
type BbiBlockDecoderIterator interface { Get() *BbiBlockDecoderType Ok() bool Next() }
type BbiBlockDecoderType ¶
type BbiBlockDecoderType struct {
BbiSummaryRecord
}
type BbiBlockEncoder ¶
type BbiBlockEncoder interface {
Encode(chromid int, sequence []float64, binSize int) BbiBlockEncoderIterator
}
type BbiBlockEncoderIterator ¶
type BbiBlockEncoderIterator interface { Get() *BbiBlockEncoderType Ok() bool Next() }
type BbiBlockEncoderType ¶
type BbiDataHeader ¶
type BbiDataHeader struct { ChromId uint32 Start uint32 End uint32 Step uint32 Span uint32 Type byte Reserved byte ItemCount uint16 }
func (*BbiDataHeader) ReadBuffer ¶
func (header *BbiDataHeader) ReadBuffer(buffer []byte, order binary.ByteOrder)
func (*BbiDataHeader) WriteBuffer ¶
func (header *BbiDataHeader) WriteBuffer(buffer []byte, order binary.ByteOrder)
type BbiFile ¶
type BbiFile struct { Header BbiHeader ChromData BData Index RTree IndexZoom []RTree Order binary.ByteOrder }
func NewBbiFile ¶
func NewBbiFile() *BbiFile
func (*BbiFile) Query ¶
func (bwf *BbiFile) Query(reader io.ReadSeeker, chromId, from, to, binSize int) <-chan BbiQueryType
func (*BbiFile) ReadZoomIndex ¶
func (bwf *BbiFile) ReadZoomIndex(reader_ io.ReadSeeker, i int) error
func (*BbiFile) WriteChromList ¶
func (bwf *BbiFile) WriteChromList(writer io.WriteSeeker) error
func (*BbiFile) WriteIndex ¶
func (bwf *BbiFile) WriteIndex(writer io.WriteSeeker) error
func (*BbiFile) WriteIndexZoom ¶
func (bwf *BbiFile) WriteIndexZoom(writer io.WriteSeeker, i int) error
type BbiHeader ¶
type BbiHeader struct { Magic uint32 Version uint16 ZoomLevels uint16 CtOffset uint64 DataOffset uint64 IndexOffset uint64 FieldCould uint16 DefinedFieldCount uint16 SqlOffset uint64 SummaryOffset uint64 UncompressBufSize uint32 ExtensionOffset uint64 NBasesCovered uint64 MinVal float64 MaxVal float64 SumData float64 SumSquares float64 ZoomHeaders []BbiHeaderZoom NBlocks uint64 // offset positions PtrCtOffset int64 PtrDataOffset int64 PtrIndexOffset int64 PtrSqlOffset int64 PtrSummaryOffset int64 PtrUncompressBufSize int64 PtrExtensionOffset int64 }
func NewBbiHeader ¶
func NewBbiHeader() *BbiHeader
func (*BbiHeader) SummaryAddValue ¶
func (*BbiHeader) WriteNBlocks ¶
func (*BbiHeader) WriteOffsets ¶
func (*BbiHeader) WriteSummary ¶
func (*BbiHeader) WriteUncompressBufSize ¶
type BbiHeaderZoom ¶
type BbiHeaderZoom struct { ReductionLevel uint32 Reserved uint32 DataOffset uint64 IndexOffset uint64 NBlocks uint32 PtrDataOffset int64 PtrIndexOffset int64 }
func (*BbiHeaderZoom) Read ¶
func (zoomHeader *BbiHeaderZoom) Read(file io.ReadSeeker, order binary.ByteOrder) error
func (*BbiHeaderZoom) Write ¶
func (zoomHeader *BbiHeaderZoom) Write(file io.WriteSeeker, order binary.ByteOrder) error
func (*BbiHeaderZoom) WriteNBlocks ¶
func (zoomHeader *BbiHeaderZoom) WriteNBlocks(file io.WriteSeeker, order binary.ByteOrder) error
func (*BbiHeaderZoom) WriteOffsets ¶
func (zoomHeader *BbiHeaderZoom) WriteOffsets(file io.WriteSeeker, order binary.ByteOrder) error
type BbiQueryType ¶
type BbiQueryType struct { BbiSummaryRecord DataType byte Quit func() Error error }
func NewBbiQueryType ¶
func NewBbiQueryType(quit func()) BbiQueryType
type BbiRawBlockDecoder ¶
type BbiRawBlockDecoder struct { Header BbiDataHeader Buffer []byte // contains filtered or unexported fields }
func NewBbiRawBlockDecoder ¶
func NewBbiRawBlockDecoder(buffer []byte, order binary.ByteOrder) (*BbiRawBlockDecoder, error)
func (*BbiRawBlockDecoder) Decode ¶
func (reader *BbiRawBlockDecoder) Decode() BbiBlockDecoderIterator
func (*BbiRawBlockDecoder) GetDataType ¶
func (reader *BbiRawBlockDecoder) GetDataType() byte
type BbiRawBlockDecoderIterator ¶
type BbiRawBlockDecoderIterator struct { *BbiRawBlockDecoder // contains filtered or unexported fields }
func (*BbiRawBlockDecoderIterator) Get ¶
func (it *BbiRawBlockDecoderIterator) Get() *BbiBlockDecoderType
func (*BbiRawBlockDecoderIterator) Next ¶
func (it *BbiRawBlockDecoderIterator) Next()
func (*BbiRawBlockDecoderIterator) Ok ¶
func (it *BbiRawBlockDecoderIterator) Ok() bool
type BbiRawBlockEncoder ¶
type BbiRawBlockEncoder struct { ItemsPerSlot int // contains filtered or unexported fields }
func NewBbiRawBlockEncoder ¶
func (*BbiRawBlockEncoder) Encode ¶
func (encoder *BbiRawBlockEncoder) Encode(chromid int, sequence []float64, binSize int) BbiBlockEncoderIterator
type BbiRawBlockEncoderIterator ¶
type BbiRawBlockEncoderIterator struct { *BbiRawBlockEncoder // contains filtered or unexported fields }
func (*BbiRawBlockEncoderIterator) Get ¶
func (it *BbiRawBlockEncoderIterator) Get() *BbiBlockEncoderType
func (*BbiRawBlockEncoderIterator) Next ¶
func (it *BbiRawBlockEncoderIterator) Next()
func (*BbiRawBlockEncoderIterator) Ok ¶
func (it *BbiRawBlockEncoderIterator) Ok() bool
type BbiSummaryRecord ¶
type BbiSummaryRecord struct { ChromId int From int To int BbiSummaryStatistics }
func NewBbiSummaryRecord ¶
func NewBbiSummaryRecord() BbiSummaryRecord
func (*BbiSummaryRecord) AddRecord ¶
func (record *BbiSummaryRecord) AddRecord(x BbiSummaryRecord)
func (*BbiSummaryRecord) Reset ¶
func (record *BbiSummaryRecord) Reset()
type BbiSummaryStatistics ¶
type BbiSummaryStatistics struct { Valid float64 Min float64 Max float64 Sum float64 SumSquares float64 }
func (*BbiSummaryStatistics) Add ¶
func (obj *BbiSummaryStatistics) Add(x BbiSummaryStatistics)
func (*BbiSummaryStatistics) AddValue ¶
func (obj *BbiSummaryStatistics) AddValue(x float64)
func (*BbiSummaryStatistics) Reset ¶
func (obj *BbiSummaryStatistics) Reset()
type BbiZoomBlockDecoder ¶
type BbiZoomBlockDecoder struct { Buffer []byte // contains filtered or unexported fields }
func NewBbiZoomBlockDecoder ¶
func NewBbiZoomBlockDecoder(buffer []byte, order binary.ByteOrder) *BbiZoomBlockDecoder
func (*BbiZoomBlockDecoder) Decode ¶
func (reader *BbiZoomBlockDecoder) Decode() BbiBlockDecoderIterator
type BbiZoomBlockDecoderIterator ¶
type BbiZoomBlockDecoderIterator struct { *BbiZoomBlockDecoder // contains filtered or unexported fields }
func (*BbiZoomBlockDecoderIterator) Get ¶
func (it *BbiZoomBlockDecoderIterator) Get() *BbiBlockDecoderType
func (*BbiZoomBlockDecoderIterator) Next ¶
func (it *BbiZoomBlockDecoderIterator) Next()
func (*BbiZoomBlockDecoderIterator) Ok ¶
func (it *BbiZoomBlockDecoderIterator) Ok() bool
type BbiZoomBlockEncoder ¶
type BbiZoomBlockEncoder struct { ItemsPerSlot int // contains filtered or unexported fields }
func NewBbiZoomBlockEncoder ¶
func NewBbiZoomBlockEncoder(itemsPerSlot, reductionLevel int, order binary.ByteOrder) (*BbiZoomBlockEncoder, error)
func (*BbiZoomBlockEncoder) Encode ¶
func (encoder *BbiZoomBlockEncoder) Encode(chromid int, sequence []float64, binSize int) BbiBlockEncoderIterator
type BbiZoomBlockEncoderIterator ¶
type BbiZoomBlockEncoderIterator struct { *BbiZoomBlockEncoder // contains filtered or unexported fields }
func (*BbiZoomBlockEncoderIterator) Get ¶
func (it *BbiZoomBlockEncoderIterator) Get() *BbiBlockEncoderType
func (*BbiZoomBlockEncoderIterator) Next ¶
func (it *BbiZoomBlockEncoderIterator) Next()
func (*BbiZoomBlockEncoderIterator) Ok ¶
func (it *BbiZoomBlockEncoderIterator) Ok() bool
type BbiZoomBlockEncoderType ¶
type BbiZoomRecord ¶
type BbiZoomRecord struct { ChromId uint32 Start uint32 End uint32 Valid uint32 Min float32 Max float32 Sum float32 SumSquares float32 }
func (*BbiZoomRecord) AddValue ¶
func (record *BbiZoomRecord) AddValue(x float64)
type BgzfReader ¶
func NewBgzfReader ¶
func NewBgzfReader(r io.Reader) (*BgzfReader, error)
func (*BgzfReader) GetExtra ¶
func (reader *BgzfReader) GetExtra() (*BgzfExtra, error)
type BigWigFile ¶
type BigWigFile struct { io.ReadSeeker // contains filtered or unexported fields }
func OpenBigWigFile ¶
func OpenBigWigFile(filename string) (*BigWigFile, error)
func (*BigWigFile) Close ¶
func (reader *BigWigFile) Close() error
type BigWigParameters ¶
func DefaultBigWigParameters ¶
func DefaultBigWigParameters() BigWigParameters
type BigWigReader ¶
type BigWigReader struct { Reader io.ReadSeeker Bwf BbiFile Genome Genome }
func NewBigWigReader ¶
func NewBigWigReader(reader io.ReadSeeker) (*BigWigReader, error)
func (*BigWigReader) GetBinSize ¶
func (reader *BigWigReader) GetBinSize() (int, error)
func (*BigWigReader) Query ¶
func (reader *BigWigReader) Query(seqRegex string, from, to, binSize int) <-chan BbiQueryType
func (*BigWigReader) QuerySequence ¶
func (reader *BigWigReader) QuerySequence(seqregex string, f BinSummaryStatistics, binSize, binOverlap int, init float64) ([]float64, int, error)
func (*BigWigReader) QuerySlice ¶
func (reader *BigWigReader) QuerySlice(seqregex string, from, to int, f BinSummaryStatistics, binSize, binOverlap int, init float64) ([]float64, int, error)
func (*BigWigReader) ReadBlocks ¶
func (reader *BigWigReader) ReadBlocks() <-chan BigWigReaderType
type BigWigReaderType ¶
type BigWigWriter ¶
type BigWigWriter struct { Writer io.WriteSeeker Bwf BbiFile Genome Genome Parameters BigWigParameters Leaves map[int][]*RVertex // contains filtered or unexported fields }
func NewBigWigWriter ¶
func NewBigWigWriter(writer io.WriteSeeker, genome Genome, parameters BigWigParameters) (*BigWigWriter, error)
func (*BigWigWriter) Close ¶
func (bww *BigWigWriter) Close() error
func (*BigWigWriter) StartZoomData ¶
func (bww *BigWigWriter) StartZoomData(i int) error
func (*BigWigWriter) Write ¶
func (bww *BigWigWriter) Write(seqname string, sequence []float64, binSize int) error
func (*BigWigWriter) WriteIndex ¶
func (bww *BigWigWriter) WriteIndex() error
func (*BigWigWriter) WriteIndexZoom ¶
func (bww *BigWigWriter) WriteIndexZoom(i int) error
type BigWigWriterType ¶
type BinSummaryStatistics ¶
func BinSummaryStatisticsFromString ¶
func BinSummaryStatisticsFromString(str string) BinSummaryStatistics
type CigarBlock ¶
type ComplementableAlphabet ¶
type ComplementableAlphabet interface { Bases(i byte) ([]byte, error) Matching(i byte) ([]byte, error) Code(i byte) (byte, error) Decode(i byte) (byte, error) Complement(i byte) (byte, error) ComplementCoded(i byte) (byte, error) IsAmbiguous(i byte) (bool, error) IsWildcard(i byte) (bool, error) Length() int LengthUnambiguous() int String() string }
type GPeaks ¶
type GPeaks struct {
GRanges
}
func ImportXlsPeaks ¶
func (GPeaks) FoldEnrichment ¶
type GRanges ¶
func NewEmptyGRanges ¶
func Promoters ¶
Generate a GRanges object where each range is a window around the transcription start site (TSS) of a gene. The arguments offset1, and offset2 determine the size of the window starting from the TSS in 5' and 3' direction respectively. Genomic bounds are not checked. (This is required by the GRanges ImportTrack() method!)
func RandomGRanges ¶
Generate a GRanges object where each genomic range is generated at random. Each chromosome is weighted by its length.
func ReadCpGIslandsFromTable ¶
func ReadCpGIslandsFromTable(r io.ReadSeeker) (GRanges, error)
func (GRanges) AsReadChannel ¶
func (obj GRanges) AsReadChannel() ReadChannel
Convert GRanges object to ReadChannel
func (GRanges) ExportBedGraph ¶
func (GRanges) ExportTable ¶
func (GRanges) FilterGenome ¶
Remove all entries that are not in the given genome.
func (GRanges) FilterStrand ¶
func (*GRanges) ImportBamPairedEnd ¶
func (*GRanges) ImportBamSingleEnd ¶
func (*GRanges) ImportBed3 ¶
func (*GRanges) ImportBed6 ¶
func (*GRanges) ImportBed9 ¶
func (*GRanges) ImportBedGraph ¶
func (*GRanges) ImportBigWig ¶
func (*GRanges) ImportTable ¶
func (*GRanges) ImportTableAll ¶
func (*GRanges) ImportTrack ¶
Add data from a track to the GRanges object. The data will be contained in a meta-data column with the same name as the track. It is required that each range has the same length.
func (GRanges) Intersection ¶
func (GRanges) KeepOverlapsWith ¶
func (GRanges) ObservedOverExpectedCpG ¶
func (GRanges) PrintPretty ¶
func (GRanges) PrintTable ¶
func (GRanges) RandomPermutation ¶
func (*GRanges) ReadBamPairedEnd ¶
func (*GRanges) ReadBamSingleEnd ¶
func (*GRanges) ReadBigWig ¶
func (r *GRanges) ReadBigWig(bwr *BigWigReader, name string, f BinSummaryStatistics, binSize, binOverlap int, init float64, revNegStrand bool) error
func (*GRanges) ReadGTF ¶
func (granges *GRanges) ReadGTF(r io.Reader, optNames, optTypes []string, defaults []interface{}) error
Parse expression data from a GTF file (gene transfer format). The data is added as a meta column named "expr" to the gene list. Parameters:
geneIdName: Name of the optional field containing the gene id exprIdName: Name of the optional field containing the expression data genes: List of query genes
func (*GRanges) ReadTable ¶
func (granges *GRanges) ReadTable(s io.ReadSeeker, names, types []string) error
func (*GRanges) ReadTableAll ¶
func (granges *GRanges) ReadTableAll(s io.ReadSeeker) error
func (GRanges) RemoveOverlapsWith ¶
func (GRanges) Row ¶
func (r GRanges) Row(i int) GRangesRow
func (GRanges) SetLengths ¶
Set length of each range to the given value. Ranges with no strand information are not changed.
func (GRanges) WriteGTF ¶
Export GRanges as GTF file. Required GTF fields should be provided as meta columns named sources, features, scores, and frames. All other meta columns are exported as optional fields.
func (GRanges) WritePretty ¶
type GRangesRow ¶
func NewGRangesRow ¶
func NewGRangesRow(granges GRanges, i int) GRangesRow
func (GRangesRow) String ¶
func (r GRangesRow) String() string
type GappedNucleotideAlphabet ¶
type GappedNucleotideAlphabet struct { }
func (GappedNucleotideAlphabet) Bases ¶
func (GappedNucleotideAlphabet) Bases(i byte) ([]byte, error)
func (GappedNucleotideAlphabet) Complement ¶
func (GappedNucleotideAlphabet) Complement(i byte) (byte, error)
func (GappedNucleotideAlphabet) ComplementCoded ¶
func (GappedNucleotideAlphabet) ComplementCoded(i byte) (byte, error)
func (GappedNucleotideAlphabet) Decode ¶
func (GappedNucleotideAlphabet) Decode(i byte) (byte, error)
func (GappedNucleotideAlphabet) IsAmbiguous ¶
func (GappedNucleotideAlphabet) IsAmbiguous(i byte) (bool, error)
func (GappedNucleotideAlphabet) IsWildcard ¶
func (GappedNucleotideAlphabet) IsWildcard(i byte) (bool, error)
func (GappedNucleotideAlphabet) Length ¶
func (GappedNucleotideAlphabet) Length() int
func (GappedNucleotideAlphabet) LengthUnambiguous ¶
func (GappedNucleotideAlphabet) LengthUnambiguous() int
func (GappedNucleotideAlphabet) Matching ¶
func (GappedNucleotideAlphabet) Matching(i byte) ([]byte, error)
func (GappedNucleotideAlphabet) String ¶
func (GappedNucleotideAlphabet) String() string
type GenericMutableTrack ¶
type GenericMutableTrack struct {
MutableTrack
}
func (GenericMutableTrack) AddRead ¶
func (track GenericMutableTrack) AddRead(read Read, d int) error
Add a single read to the track by incrementing the value of each bin that overlaps with the read. Single end reads are extended in 3' direction to have a length of [d]. This is the same as the macs2 `extsize' parameter. Reads are not extended if [d] is zero. The function returns an error if the read's position is out of range
func (GenericMutableTrack) AddReadMeanOverlap ¶
func (track GenericMutableTrack) AddReadMeanOverlap(read Read, d int) error
Add a single read to the track by adding the fraction of overlap between the read and each bin. Single end reads are extended in 3' direction to have a length of [d]. This is the same as the macs2 `extsize' parameter. Reads are not extended if [d] is zero. The function returns an error if the read's position is out of range
func (GenericMutableTrack) AddReadOverlap ¶
func (track GenericMutableTrack) AddReadOverlap(read Read, d int) error
Add a single read to the track by adding the number of overlapping nucleotides between the read and each bin. Single end reads are extended in 3' direction to have a length of [d]. This is the same as the macs2 `extsize' parameter. Reads are not extended if [d] is zero. The function returns an error if the read's position is out of range
func (GenericMutableTrack) AddReads ¶
func (track GenericMutableTrack) AddReads(reads ReadChannel, d int, method string) int
Add reads to track. All single end reads are extended in 3' direction to have a length of [d]. This is the same as the macs2 `extsize' parameter. Reads are not extended if [d] is zero. If [method] is "default", the value of each bin that overlaps the read is incremented. If [method] is "overlap", each bin that overlaps the read is incremented by the number of overlapping nucleotides. If [method] is "mean overlap", each bin that overlaps the read is incremented by the fraction of overlapping nucleotides within the bin. The function returns an error if the read's position is out of range
func (GenericMutableTrack) ImportSegmentation ¶
func (track GenericMutableTrack) ImportSegmentation(bedFilename string, defState string) ([]string, error)
func (GenericMutableTrack) Map ¶
Apply a function f to the sequences of track2. The function is given as arguments the name of the sequence, the position, and the value at that position. The return value is stored in track1 if it is not nil.
func (GenericMutableTrack) Normalize ¶
func (track GenericMutableTrack) Normalize(treatment, control Track, c1, c2 float64, logScale bool) error
Combine treatment and control from a ChIP-seq experiment into a single track. At each genomic location, the number of binned reads from the treatment experiment is divided by the number of control reads. To avoid division by zero, a pseudocount is added to both treatment and control. The parameter d determines the extension of reads.
func (GenericMutableTrack) QuantileNormalize ¶
func (track GenericMutableTrack) QuantileNormalize(trackRef Track) error
Quantile normalize track to reference
func (GenericMutableTrack) QuantileNormalizeToCounts ¶
func (track GenericMutableTrack) QuantileNormalizeToCounts(x []float64, y []int) error
func (GenericMutableTrack) Smoothen ¶
func (track GenericMutableTrack) Smoothen(minCounts float64, windowSizes []int) error
Smoothen track data with an adaptive window method. For each region the smallest window size among windowSizes is selected which contains at least minCounts counts. If the minimum number of counts is not reached, the larges window size is selected.
func (GenericMutableTrack) WindowMap ¶
func (track1 GenericMutableTrack) WindowMap(track2 Track, windowSize int, f func(string, int, ...float64) float64) error
Apply a window function f to the sequences of track2. The function is given as arguments the name of the sequence, the position, and the value at that position. The return value is stored in track1 if it is not nil.
func (GenericMutableTrack) WindowMapList ¶
type GenericTrack ¶
type GenericTrack struct {
Track
}
func (GenericTrack) CumulativeHistogram ¶
func (track GenericTrack) CumulativeHistogram(from, to float64, bins int) TrackHistogram
func (GenericTrack) ExportBed ¶
func (track GenericTrack) ExportBed(filename string, compress bool) error
func (GenericTrack) ExportBigWig ¶
func (track GenericTrack) ExportBigWig(filename string, args ...interface{}) error
func (GenericTrack) ExportSegmentation ¶
func (GenericTrack) Histogram ¶
func (track GenericTrack) Histogram(from, to float64, bins int) TrackHistogram
func (GenericTrack) SummaryStatistics ¶
func (track GenericTrack) SummaryStatistics() TrackSummaryStatistics
func (GenericTrack) WriteBigWig ¶
func (track GenericTrack) WriteBigWig(writer io.WriteSeeker, args ...interface{}) error
type Genes ¶
type Genes struct { GRanges // pointer to some meta columns Names []string Cds []Range // contains filtered or unexported fields }
Container for genes. Tx contains the transcription start and end positions. Cds specifies the coding regions.
func ImportGenesFromUCSC ¶
func ReadUCSCGenes ¶
Import genes from UCSC text files. The format is a whitespace separated table with columns: Name, Seqname, TranscriptStart, TranscriptEnd, CodingStart, CodingEnd, and Strand.
func (Genes) ExportTable ¶
func (Genes) FilterGenome ¶
func (*Genes) ImportCufflinksFPKMTracking ¶
func (*Genes) ImportGTFExpr ¶
func (Genes) Intersection ¶
func (Genes) KeepOverlapsWith ¶
func (Genes) PrintPretty ¶
func (Genes) PrintTable ¶
func (*Genes) ReadCufflinksFPKMTracking ¶
Import expression data from cufflinks. The data is added to the gene list as a meta column named "expr".
func (*Genes) ReadGTFExpr ¶
Parse expression data from a GTF file (gene transfer format). The data is added as a meta column named "expr" to the gene list. Parameters:
geneIdName: Name of the optional field containing the gene id exprIdName: Name of the optional field containing the expression data genes: List of query genes
func (Genes) RemoveOverlapsWith ¶
type Genome ¶
Structure containing chromosome sizes.
func BamImportGenome ¶
func BigWigImportGenome ¶
func BigWigReadGenome ¶
func BigWigReadGenome(reader io.ReadSeeker) (Genome, error)
func (*Genome) AddSequence ¶
func (*Genome) Read ¶
Import chromosome sizes from a UCSC text file. The format is a whitespace separated table where the first column is the name of the chromosome and the second column the chromosome length.
func (Genome) SeqLength ¶
Length of the given chromosome. Returns an error if the chromosome is not found.
func (Genome) SumLengths ¶
type GenomeRng ¶
func NewGenomeRng ¶
type KmerCatalogue ¶
type KmerCatalogue struct { KmerEquivalenceRelation // contains filtered or unexported fields }
func NewKmerCatalogue ¶
func NewKmerCatalogue(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet) (*KmerCatalogue, error)
func (*KmerCatalogue) AddKmerClass ¶
func (obj *KmerCatalogue) AddKmerClass(kmer KmerClass)
func (*KmerCatalogue) CatalogueSize ¶
func (obj *KmerCatalogue) CatalogueSize() int
func (*KmerCatalogue) Clone ¶
func (obj *KmerCatalogue) Clone() *KmerCatalogue
func (*KmerCatalogue) GetKmerClass ¶
func (obj *KmerCatalogue) GetKmerClass(kmer string) KmerClass
func (*KmerCatalogue) GetKmerClassFromId ¶
func (obj *KmerCatalogue) GetKmerClassFromId(k, id int) KmerClass
func (*KmerCatalogue) GetKmerClassIfPresent ¶
func (obj *KmerCatalogue) GetKmerClassIfPresent(kmer string) (KmerClass, bool)
type KmerCatalogueIterator ¶
type KmerCatalogueIterator struct {
// contains filtered or unexported fields
}
func NewKmerCatalogueIterator ¶
func NewKmerCatalogueIterator(catalogue KmerCatalogue) KmerCatalogueIterator
func (KmerCatalogueIterator) Get ¶
func (obj KmerCatalogueIterator) Get() KmerClass
func (*KmerCatalogueIterator) Next ¶
func (obj *KmerCatalogueIterator) Next()
func (KmerCatalogueIterator) Ok ¶
func (obj KmerCatalogueIterator) Ok() bool
type KmerClass ¶
type KmerClass struct { KmerClassId // list of equivalent K-mers Elements []string }
func NewKmerClass ¶
func (KmerClass) CountAmbiguous ¶
func (obj KmerClass) CountAmbiguous(alphabet ComplementableAlphabet) int
func (KmerClass) CountWildcard ¶
func (obj KmerClass) CountWildcard(alphabet ComplementableAlphabet) int
type KmerClassId ¶
func (KmerClassId) Equals ¶
func (a KmerClassId) Equals(b KmerClassId) bool
func (KmerClassId) Less ¶
func (a KmerClassId) Less(b KmerClassId) bool
type KmerClassList ¶
type KmerClassList []KmerClass
func (KmerClassList) Clone ¶
func (obj KmerClassList) Clone() KmerClassList
func (KmerClassList) Equals ¶
func (obj KmerClassList) Equals(b KmerClassList) bool
func (KmerClassList) Len ¶
func (obj KmerClassList) Len() int
func (KmerClassList) Less ¶
func (obj KmerClassList) Less(i, j int) bool
func (KmerClassList) Sort ¶
func (obj KmerClassList) Sort()
func (KmerClassList) Swap ¶
func (obj KmerClassList) Swap(i, j int)
func (KmerClassList) Union ¶
func (obj KmerClassList) Union(b ...KmerClassList) KmerClassList
type KmerClassSet ¶
type KmerClassSet map[KmerClassId][]string
func (KmerClassSet) AsList ¶
func (obj KmerClassSet) AsList() KmerClassList
type KmerCounter ¶
type KmerCounter struct { KmerCatalogue // contains filtered or unexported fields }
func NewKmerCounter ¶
func NewKmerCounter(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet, kmers ...KmerClass) (*KmerCounter, error)
func (*KmerCounter) Clone ¶
func (obj *KmerCounter) Clone() *KmerCounter
func (*KmerCounter) CountKmers ¶
func (obj *KmerCounter) CountKmers(sequence []byte) KmerCounts
func (*KmerCounter) Freeze ¶
func (obj *KmerCounter) Freeze()
func (*KmerCounter) IdentifyKmers ¶
func (obj *KmerCounter) IdentifyKmers(sequence []byte) KmerCounts
type KmerCounts ¶
type KmerCounts struct { // this is a sorted list of k-mers and might contain more entries than // the counts map Kmers KmerClassList Counts map[KmerClassId]int }
func (KmerCounts) At ¶
func (obj KmerCounts) At(i int) int
func (KmerCounts) GetCount ¶
func (obj KmerCounts) GetCount(kmer KmerClass) int
func (KmerCounts) GetKmer ¶
func (obj KmerCounts) GetKmer(i int) KmerClass
func (KmerCounts) Iterate ¶
func (obj KmerCounts) Iterate() KmerCountsIterator
func (KmerCounts) Len ¶
func (obj KmerCounts) Len() int
func (KmerCounts) N ¶
func (obj KmerCounts) N() int
func (*KmerCounts) SetKmers ¶
func (obj *KmerCounts) SetKmers(kmers KmerClassList)
type KmerCountsIterator ¶
type KmerCountsIterator struct { KmerCounts // contains filtered or unexported fields }
func (KmerCountsIterator) GetCount ¶
func (obj KmerCountsIterator) GetCount() int
func (KmerCountsIterator) GetIndex ¶
func (obj KmerCountsIterator) GetIndex() int
func (KmerCountsIterator) GetKmer ¶
func (obj KmerCountsIterator) GetKmer() KmerClass
func (*KmerCountsIterator) Next ¶
func (obj *KmerCountsIterator) Next()
func (KmerCountsIterator) Ok ¶
func (obj KmerCountsIterator) Ok() bool
type KmerCountsList ¶
type KmerCountsList struct { Kmers KmerClassList Counts []map[KmerClassId]int }
func NewKmerCountsList ¶
func NewKmerCountsList(counts ...KmerCounts) KmerCountsList
func (KmerCountsList) Append ¶
func (obj KmerCountsList) Append(args ...KmerCounts) KmerCountsList
func (KmerCountsList) At ¶
func (obj KmerCountsList) At(i int) KmerCounts
func (KmerCountsList) Len ¶
func (obj KmerCountsList) Len() int
func (*KmerCountsList) SetKmers ¶
func (obj *KmerCountsList) SetKmers(kmers KmerClassList)
func (*KmerCountsList) Slice ¶
func (obj *KmerCountsList) Slice(i, j int) KmerCountsList
type KmerCylinderIterator ¶
type KmerCylinderIterator struct {
// contains filtered or unexported fields
}
func NewKmerCylinderIterator ¶
func NewKmerCylinderIterator(k int, maxAmbiguous int, alphabet ComplementableAlphabet, j int, a_ string) KmerCylinderIterator
func (KmerCylinderIterator) Get ¶
func (obj KmerCylinderIterator) Get() string
func (*KmerCylinderIterator) Next ¶
func (obj *KmerCylinderIterator) Next()
func (KmerCylinderIterator) Ok ¶
func (obj KmerCylinderIterator) Ok() bool
type KmerEquivalence ¶
type KmerEquivalence struct {
N, M int // min and max kmer size
Complement bool
Reverse bool
Revcomp bool
MaxAmbiguous []int // maximum number of ambiguous letters
Alphabet ComplementableAlphabet
}
func NewKmerEquivalence ¶
func NewKmerEquivalence(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet) (KmerEquivalence, error)
func (KmerEquivalence) Equals ¶
func (a KmerEquivalence) Equals(b KmerEquivalence) bool
type KmerEquivalenceRelation ¶
type KmerEquivalenceRelation struct { KmerEquivalence // contains filtered or unexported fields }
func NewKmerEquivalenceRelation ¶
func NewKmerEquivalenceRelation(n, m int, comp, rev, rc bool, maxAmbiguous []int, al ComplementableAlphabet) (KmerEquivalenceRelation, error)
func (KmerEquivalenceRelation) EquivalenceClass ¶
func (obj KmerEquivalenceRelation) EquivalenceClass(kmer string) KmerClass
type KmerGraph ¶
type KmerGraph struct {
// contains filtered or unexported fields
}
func NewKmerGraph ¶
func NewKmerGraph(kmers KmerClassList, rel KmerEquivalenceRelation) KmerGraph
func NewKmerGraphFromCatalogue ¶
func NewKmerGraphFromCatalogue(catalogue *KmerCatalogue) KmerGraph
func (KmerGraph) GetNode ¶
func (obj KmerGraph) GetNode(kmer string) *KmerGraphNode
func (KmerGraph) RelatedKmers ¶
func (obj KmerGraph) RelatedKmers(kmer string) KmerClassList
type KmerGraphNode ¶
type KmerGraphNode struct { Kmer KmerClass ClusterId uint64 Rank int // less specific k-mers Infra []*KmerGraphNode // more specific k-mers Supra []*KmerGraphNode // k-mers of same length with wildcards at equivalent positions Intra []*KmerGraphNode }
type KmerInstantiationIterator ¶
type KmerInstantiationIterator struct {
// contains filtered or unexported fields
}
func NewKmerInstantiationIterator ¶
func NewKmerInstantiationIterator(alphabet ComplementableAlphabet, a_ string, partial bool) KmerInstantiationIterator
func (KmerInstantiationIterator) Get ¶
func (obj KmerInstantiationIterator) Get() string
func (*KmerInstantiationIterator) Next ¶
func (obj *KmerInstantiationIterator) Next()
func (KmerInstantiationIterator) Ok ¶
func (obj KmerInstantiationIterator) Ok() bool
type KmerIterator ¶
type KmerIterator struct {
// contains filtered or unexported fields
}
func NewKmerIterator ¶
func NewKmerIterator(k int, maxAmbiguous int, alphabet ComplementableAlphabet) KmerIterator
func (KmerIterator) Get ¶
func (obj KmerIterator) Get() string
func (*KmerIterator) Next ¶
func (obj *KmerIterator) Next()
func (KmerIterator) Ok ¶
func (obj KmerIterator) Ok() bool
type LazyTrack ¶
type LazyTrack struct { Name string BinSize int BinOverlap int Bwr BigWigReader BinSumStat BinSummaryStatistics Init float64 }
func NewLazyTrack ¶
func NewLazyTrack(reader io.ReadSeeker, name string, f BinSummaryStatistics, binSize, binOverlap int, init float64) (LazyTrack, error)
func (LazyTrack) CloneTrack ¶
func (*LazyTrack) FilterGenome ¶
func (LazyTrack) GetBinSize ¶
func (LazyTrack) GetSeqNames ¶
func (LazyTrack) GetSequence ¶
func (track LazyTrack) GetSequence(query string) (TrackSequence, error)
func (*LazyTrack) ReadBigWig ¶
func (track *LazyTrack) ReadBigWig(reader io.ReadSeeker, name string, f BinSummaryStatistics, binSize, binOverlap int, init float64) error
type LazyTrackFile ¶
type LazyTrackFile struct { LazyTrack // contains filtered or unexported fields }
func (*LazyTrackFile) Close ¶
func (obj *LazyTrackFile) Close() error
func (*LazyTrackFile) ImportBigWig ¶
func (obj *LazyTrackFile) ImportBigWig(filename, name string, s BinSummaryStatistics, binSize, binOverlap int, init float64) error
type Meta ¶
type Meta struct { MetaName []string MetaData []interface{} // contains filtered or unexported fields }
func (*Meta) DeleteMeta ¶
func (Meta) GetMetaFloat ¶
func (Meta) GetMetaInt ¶
func (Meta) GetMetaRange ¶
func (Meta) GetMetaStr ¶
func (Meta) Merge ¶
Return a new Meta object where a given set of rows has been merged. The argument indices should assign the same target index to all rows that should be merged, i.e. indices := []int{0, 1, 1, 2, 3} would merge rows 1 and 2 but leave all rows 0, 3 and 4 as they are. Rows are merged by replacing one-dimensional slices by two-dimensional slices. The Reduce{String,Float64,Int} methods may be used afterwards to apply a function to the merged data. A Meta object that already contains two-dimensional slices cannot be merged.
func (*Meta) PrintPretty ¶
func (*Meta) PrintTable ¶
func (*Meta) ReduceFloat ¶
Reduce a column with a two-dimensional float64 slice by applying the given function f. If nameNew != "" the old meta column is kept.
func (*Meta) ReduceInt ¶
Reduce a column with a two-dimensional int slice by applying the given function f. If nameNew != "" the old meta column is kept.
func (*Meta) ReduceString ¶
Reduce a column with a two-dimensional string slice by applying the given function f. If nameNew != "" the old meta column is kept.
func (*Meta) RenameMeta ¶
func (Meta) WritePretty ¶
type MutableTrack ¶
type MutableTrack interface { Track GetMutableSequence(seqname string) (TrackMutableSequence, error) CloneMutableTrack() MutableTrack }
type NucleotideAlphabet ¶
type NucleotideAlphabet struct { }
func (NucleotideAlphabet) Complement ¶
func (NucleotideAlphabet) Complement(i byte) (byte, error)
func (NucleotideAlphabet) ComplementCoded ¶
func (NucleotideAlphabet) ComplementCoded(i byte) (byte, error)
func (NucleotideAlphabet) IsAmbiguous ¶
func (NucleotideAlphabet) IsAmbiguous(i byte) (bool, error)
func (NucleotideAlphabet) IsWildcard ¶
func (NucleotideAlphabet) IsWildcard(i byte) (bool, error)
func (NucleotideAlphabet) Length ¶
func (NucleotideAlphabet) Length() int
func (NucleotideAlphabet) LengthUnambiguous ¶
func (NucleotideAlphabet) LengthUnambiguous() int
func (NucleotideAlphabet) String ¶
func (NucleotideAlphabet) String() string
type OptionBinOverlap ¶
type OptionBinOverlap struct {
Value int
}
type OptionBinSize ¶
type OptionBinSize struct {
Value int
}
type OptionBinningMethod ¶
type OptionBinningMethod struct {
Value string
}
type OptionEstimateFraglen ¶
type OptionEstimateFraglen struct {
Value bool
}
type OptionFilterChroms ¶
type OptionFilterChroms struct {
Value []string
}
type OptionFilterDuplicates ¶
type OptionFilterDuplicates struct {
Value bool
}
type OptionFilterMapQ ¶
type OptionFilterMapQ struct {
Value int
}
type OptionFilterPairedEnd ¶
type OptionFilterPairedEnd struct {
Value bool
}
type OptionFilterReadLengths ¶
type OptionFilterReadLengths struct {
Value [2]int
}
type OptionFilterSingleEnd ¶
type OptionFilterSingleEnd struct {
Value bool
}
type OptionFilterStrand ¶
type OptionFilterStrand struct {
Value byte
}
type OptionFraglenBinSize ¶
type OptionFraglenBinSize struct {
Value int
}
type OptionFraglenRange ¶
type OptionFraglenRange struct {
Value [2]int
}
type OptionLogScale ¶
type OptionLogScale struct {
Value bool
}
type OptionLogger ¶
type OptionNormalizeTrack ¶
type OptionNormalizeTrack struct {
Value string
}
type OptionPairedAsSingleEnd ¶
type OptionPairedAsSingleEnd struct {
Value bool
}
type OptionPairedEndStrandSpecific ¶
type OptionPairedEndStrandSpecific struct {
Value bool
}
type OptionPrintScientific ¶
type OptionPrintScientific struct {
Value bool
}
type OptionPseudocounts ¶
type OptionPseudocounts struct {
Value [2]float64
}
type OptionShiftReads ¶
type OptionShiftReads struct {
Value [2]int
}
type OptionSmoothenControl ¶
type OptionSmoothenControl struct {
Value bool
}
type OptionSmoothenMin ¶
type OptionSmoothenMin struct {
Value float64
}
type OptionSmoothenSizes ¶
type OptionSmoothenSizes struct {
Value []int
}
type OrderedStringSet ¶
Structure containing genomic sequences.
func EmptyOrderedStringSet ¶
func EmptyOrderedStringSet() OrderedStringSet
func NewOrderedStringSet ¶
func NewOrderedStringSet(seqnames []string, sequences [][]byte) OrderedStringSet
func (OrderedStringSet) ExportFasta ¶
func (obj OrderedStringSet) ExportFasta(filename string, compress bool) error
func (OrderedStringSet) GetSlice ¶
func (obj OrderedStringSet) GetSlice(name string, r Range) ([]byte, error)
func (*OrderedStringSet) ImportFasta ¶
func (obj *OrderedStringSet) ImportFasta(filename string) error
func (OrderedStringSet) Scan ¶
func (obj OrderedStringSet) Scan(query []byte) GRanges
func (OrderedStringSet) WriteFasta ¶
func (obj OrderedStringSet) WriteFasta(writer io.Writer) error
type PWM ¶
type PWM struct {
TFMatrix
}
type RTree ¶
type RTreeTraverser ¶
type RTreeTraverser struct {
// contains filtered or unexported fields
}
func NewRTreeTraverser ¶
func NewRTreeTraverser(tree *RTree, chromId, from, to int) RTreeTraverser
func (*RTreeTraverser) Get ¶
func (traverser *RTreeTraverser) Get() *RTreeTraverserType
func (*RTreeTraverser) Next ¶
func (traverser *RTreeTraverser) Next()
func (*RTreeTraverser) Ok ¶
func (traverser *RTreeTraverser) Ok() bool
type RTreeTraverserType ¶
type RVertex ¶
type RVertex struct { IsLeaf uint8 NChildren uint16 ChrIdxStart []uint32 BaseStart []uint32 ChrIdxEnd []uint32 BaseEnd []uint32 DataOffset []uint64 Sizes []uint64 Children []*RVertex // positions of DataOffset and Sizes values in file PtrDataOffset []int64 PtrSizes []int64 }
func (*RVertex) WriteBlock ¶
type RVertexGenerator ¶
type RVertexGenerator struct { BlockSize int ItemsPerSlot int // contains filtered or unexported fields }
func NewRVertexGenerator ¶
func NewRVertexGenerator(blockSize, itemsPerSlot int, order binary.ByteOrder) (*RVertexGenerator, error)
func (*RVertexGenerator) Generate ¶
func (generator *RVertexGenerator) Generate(idx int, sequence []float64, binSize, reductionLevel int, fixedStep bool) <-chan RVertexGeneratorType
type RVertexGeneratorType ¶
type RVertexIndexPair ¶
type RVertexStack ¶
type RVertexStack []RVertexIndexPair
func (*RVertexStack) Length ¶
func (stack *RVertexStack) Length() int
func (*RVertexStack) Pop ¶
func (stack *RVertexStack) Pop() (*RVertex, int)
func (*RVertexStack) Push ¶
func (stack *RVertexStack) Push(v *RVertex, i int)
type Range ¶
type Range struct {
From, To int
}
func NewRange ¶
Range object used to identify a genomic subsequence. By convention the first position in a sequence is numbered 0. The arguments from, to are interpreted as the interval [from, to).
func (Range) Intersection ¶
type Read ¶
Structure containing information about a read. For paired-end sequencing the range may cover the whole fragment instead of a single read
type ReadChannel ¶
type ReadChannel <-chan Read
type SimpleTrack ¶
A track is a container for experimental data mapped to genomic locations. The data is binned in order to reduce memory usage. The first position in a sequence is numbered 0.
func AllocSimpleTrack ¶
func AllocSimpleTrack(name string, genome Genome, binSize int) SimpleTrack
func BamCoverage ¶
func BamCoverage(filenameTrack string, filenamesTreatment, filenamesControl []string, fraglenTreatment, fraglenControl []int, options ...interface{}) (SimpleTrack, []fraglenEstimate, []fraglenEstimate, error)
func EmptySimpleTrack ¶
func EmptySimpleTrack(name string) SimpleTrack
func NewSimpleTrack ¶
func (SimpleTrack) Clone ¶
func (track SimpleTrack) Clone() SimpleTrack
func (SimpleTrack) CloneMutableTrack ¶
func (track SimpleTrack) CloneMutableTrack() MutableTrack
func (SimpleTrack) CloneTrack ¶
func (track SimpleTrack) CloneTrack() Track
func (SimpleTrack) ExportBigWig ¶
func (track SimpleTrack) ExportBigWig(filename string, args ...interface{}) error
func (*SimpleTrack) FilterGenome ¶
func (track *SimpleTrack) FilterGenome(f func(name string, length int) bool)
func (SimpleTrack) GetBinSize ¶
func (track SimpleTrack) GetBinSize() int
func (SimpleTrack) GetGenome ¶
func (track SimpleTrack) GetGenome() Genome
func (SimpleTrack) GetMutableSequence ¶
func (track SimpleTrack) GetMutableSequence(query string) (TrackMutableSequence, error)
func (SimpleTrack) GetName ¶
func (track SimpleTrack) GetName() string
func (SimpleTrack) GetSeqNames ¶
func (track SimpleTrack) GetSeqNames() []string
func (SimpleTrack) GetSequence ¶
func (track SimpleTrack) GetSequence(query string) (TrackSequence, error)
func (SimpleTrack) GetSlice ¶
func (track SimpleTrack) GetSlice(r GRangesRow) ([]float64, error)
func (*SimpleTrack) ImportBedGrah ¶
func (track *SimpleTrack) ImportBedGrah(filename string) error
func (*SimpleTrack) ImportBigWig ¶
func (track *SimpleTrack) ImportBigWig(filename string, name string, s BinSummaryStatistics, binSize, binOverlap int, init float64) error
func (*SimpleTrack) ImportWiggle ¶
func (track *SimpleTrack) ImportWiggle(filename string) error
func (SimpleTrack) Index ¶
func (track SimpleTrack) Index(position int) int
func (*SimpleTrack) ReadBedGraph ¶
func (track *SimpleTrack) ReadBedGraph(reader io.Reader) error
Import data from wiggle files.
func (*SimpleTrack) ReadBigWig ¶
func (track *SimpleTrack) ReadBigWig(reader io.ReadSeeker, name string, f BinSummaryStatistics, binSize, binOverlap int, init float64) error
func (*SimpleTrack) ReadWiggle ¶
func (track *SimpleTrack) ReadWiggle(reader io.Reader) error
Import data from wiggle files.
func (SimpleTrack) ShallowClone ¶
func (track SimpleTrack) ShallowClone() SimpleTrack
func (SimpleTrack) WriteBigWig ¶
func (track SimpleTrack) WriteBigWig(writer io.WriteSeeker, args ...interface{}) error
func (SimpleTrack) WriteWiggle ¶
func (track SimpleTrack) WriteWiggle(filename, description string) error
Export the track to wiggle format. For sparse tracks (more than half of the values are zero), variable step formatting is used.
type StringSet ¶
Structure containing genomic sequences.
func EmptyStringSet ¶
func EmptyStringSet() StringSet
func NewStringSet ¶
func (StringSet) ImportFasta ¶
type TFMatrix ¶
type TFMatrix struct {
Values [][]float64
}
func EmptyTFMatrix ¶
func EmptyTFMatrix() TFMatrix
func NewTFMatrix ¶
func (*TFMatrix) ImportMatrix ¶
Read a PWM matrix from file.
func (*TFMatrix) ReadMatrix ¶
Read a PWM matrix.
type TrackHistogram ¶
func (TrackHistogram) String ¶
func (histogram TrackHistogram) String() string
type TrackMutableSequence ¶
type TrackMutableSequence struct {
TrackSequence
}
type TrackSequence ¶
type TrackSequence struct {
// contains filtered or unexported fields
}
func (TrackSequence) At ¶
func (obj TrackSequence) At(i int) float64
func (TrackSequence) AtBin ¶
func (obj TrackSequence) AtBin(i int) float64
func (TrackSequence) GetBinSize ¶
func (obj TrackSequence) GetBinSize() int
func (TrackSequence) NBins ¶
func (obj TrackSequence) NBins() int
func (TrackSequence) Set ¶
func (obj TrackSequence) Set(i int, v float64)
func (TrackSequence) SetBin ¶
func (obj TrackSequence) SetBin(i int, v float64)
Source Files ¶
- alphabet.go
- bam.go
- bbi.go
- bgzf.go
- bigWig.go
- cpg.go
- genes.go
- genesExpr.go
- genes_pretty.go
- genes_table.go
- genes_ucsc.go
- genome.go
- granges.go
- granges_bam.go
- granges_bed.go
- granges_bedGraph.go
- granges_bigWig.go
- granges_cpg.go
- granges_findNearest.go
- granges_findOverlaps.go
- granges_gtf.go
- granges_merge.go
- granges_pretty.go
- granges_random.go
- granges_row.go
- granges_table.go
- kmer.go
- kmer_catalogue.go
- kmer_catalogue_iterator.go
- kmer_class.go
- kmer_counter.go
- kmer_counts.go
- kmer_equivalence_relation.go
- kmer_graph.go
- kmer_iterator.go
- meta.go
- meta_pretty.go
- meta_row.go
- meta_table.go
- orderedstringset.go
- peaks.go
- promoters.go
- range.go
- reads.go
- stringset.go
- tf.go
- track.go
- track_bed.go
- track_bigWig.go
- track_coverage.go
- track_granges.go
- track_lazy.go
- track_segmentation.go
- track_simple.go
- track_simple_bedGraph.go
- track_simple_bigWig.go
- track_simple_wig.go
- track_statistics.go
- track_utility.go
- utility.go