Documentation ¶
Index ¶
- Constants
- Variables
- func Check(err error)
- func CloseFile(file closer)
- func CountNbLines(filename string) int
- func CreatePeakIntervalTree()
- func CreatePeakIntervalTreeCustom(peakPos [3]int, sep string)
- func ExceCmd(cmd string)
- func InitIntervalDictsThreading(threadnb int)
- func LoadCellDictsFromBedFileToIndex(fname Filename) map[string]int
- func LoadCellDictsToIndex(fname Filename) map[string]int
- func LoadCellIDDict(fname string) map[string]bool
- func LoadPeaks(fname Filename) int
- func LoadPeaksAndTrim(fname Filename) int
- func LoadPeaksCustom(fname Filename, sep string, peakPos [3]int) int
- func LoadPeaksDict(fname Filename) (peakiddict map[string]uint)
- func LoadPeaksSubset(fname Filename, firstPeak, lastPeak int)
- func LoadRefBedFileWithSymbol(peaksymbolfile Filename)
- func LoadRefCustomFileWithSymbol(peaksymbolfile Filename, sep string, symbol SymbolType, refPos [3]int)
- func LoadSymbolFile(peaksymbolfile, peakfile Filename)
- func MaxIntList(intlist []int) (max int)
- func ReturnReader(fname string, startingLine int) (*bufio.Scanner, *os.File)
- func ReturnReaderForBamfile(fname string, threadnb int) (*bam.Reader, *os.File)
- func ReturnReaderForBzipfile(fname string, startingLine int) (*bufio.Scanner, *os.File)
- func ReturnReaderForBzipfileOld(fname string, seekPos int) (*bufio.Scanner, *os.File)
- func ReturnReaderForBzipfilePureGo(fname string, startingLine int) (*bufio.Scanner, *os.File)
- func ReturnReaderForGzipfile(fname string, startingLine int) (*bufio.Scanner, *os.File)
- func ReturnWriter(fname string) io.WriteCloser
- func ReturnWriterForBzipfile(fname string) *bzip2.Writer
- func ReturnWriterForGzipFile(fname string) io.WriteCloser
- func SortLogfile(filename Filename, separator string, outfname string, ...)
- type ArrayFlags
- type Filename
- type IntInterval
- type Pair
- type PairList
- type Peak
- type PeakIntervalTreeObject
- type SymbolType
Constants ¶
const BUFFERSIZE = 1000000
BUFFERSIZE ...
Variables ¶
var CHRINTERVALDICT map[string]*interval.IntTree
CHRINTERVALDICT chr ID <-> interval tree
var CHRINTERVALDICTTHREAD map[int]map[string]*interval.IntTree
CHRINTERVALDICTTHREAD threadNB -> chr ID -> pos
var INTERVALMAPPING map[uintptr]string
INTERVALMAPPING peak ID pos <->pos
var PEAKIDDICT map[string]uint
PEAKIDDICT peak ID<->pos
var PEAKSYMBOLDICT map[Peak][]string
PEAKSYMBOLDICT map[peak]symbol
Functions ¶
func CreatePeakIntervalTreeCustom ¶ added in v0.31.8
CreatePeakIntervalTreeCustom ...
func InitIntervalDictsThreading ¶
func InitIntervalDictsThreading(threadnb int)
InitIntervalDictsThreading Init interval dict threading map by copying the interval map for each trheads
func LoadCellDictsFromBedFileToIndex ¶ added in v0.29.1
LoadCellDictsFromBedFileToIndex create cell ID <-> index dict using a single cell bed file storing unique CELL ID Ex: chr1 15555 15522 CELLID1 chr1 25555 25522 CELLID1 chr1 35555 35522 CELLID1 chr1 15555 15522 CELLID2 chr1 25555 25522 CELLID2
will give map(CELLID1:0, CELLID2:1)
func LoadCellDictsToIndex ¶
LoadCellDictsToIndex create cell ID index dict
func LoadCellIDDict ¶
LoadCellIDDict create cell ID bool dict
func LoadPeaksAndTrim ¶ added in v0.29.1
LoadPeaksAndTrim load peak file and return peak peak id trimmed for "chr" -> dict
func LoadPeaksCustom ¶ added in v0.31.8
LoadPeaksCustom load peak file globally
func LoadPeaksDict ¶ added in v0.31.6
LoadPeaksDict load peak file return map[string]int
func LoadPeaksSubset ¶
LoadPeaksSubset load peak file but using only a subset of peaks and return peak peak id -> dict
func LoadRefBedFileWithSymbol ¶ added in v0.31.0
func LoadRefBedFileWithSymbol(peaksymbolfile Filename)
LoadRefBedFileWithSymbol peaksymbolfile, peakfile Filename
func LoadRefCustomFileWithSymbol ¶ added in v0.31.7
func LoadRefCustomFileWithSymbol(peaksymbolfile Filename, sep string, symbol SymbolType, refPos [3]int)
LoadRefCustomFileWithSymbol peaksymbolfile, peakfile Filename
func LoadSymbolFile ¶ added in v0.31.0
func LoadSymbolFile(peaksymbolfile, peakfile Filename)
LoadSymbolFile peaksymbolfile, peakfile Filename
func MaxIntList ¶ added in v0.31.15
MaxIntList int give the max of list
func ReturnReader ¶
ReturnReader ...
func ReturnReaderForBamfile ¶ added in v0.31.4
ReturnReaderForBamfile ...
func ReturnReaderForBzipfile ¶
ReturnReaderForBzipfile ...
func ReturnReaderForBzipfileOld ¶
ReturnReaderForBzipfileOld ...
func ReturnReaderForBzipfilePureGo ¶
ReturnReaderForBzipfilePureGo ...
func ReturnReaderForGzipfile ¶
ReturnReaderForGzipfile ...
func ReturnWriterForBzipfile ¶
ReturnWriterForBzipfile ...
func ReturnWriterForGzipFile ¶
func ReturnWriterForGzipFile(fname string) io.WriteCloser
ReturnWriterForGzipFile ...
Types ¶
type Filename ¶
type Filename string
Filename type used to check if files exists
func (*Filename) ReturnReader ¶
ReturnReader Return reader for file
type IntInterval ¶
IntInterval Integer-specific intervals
func (IntInterval) Overlap ¶
func (i IntInterval) Overlap(b interval.IntRange) bool
Overlap rule for two Interval
func (IntInterval) Range ¶
func (i IntInterval) Range() interval.IntRange
Range Return the range of Interval
func (IntInterval) String ¶
func (i IntInterval) String() string
String Return the string re[ of Interval
type PairList ¶
type PairList []Pair
PairList ...
func RankByWordCountAndDeleteOldMap ¶
RankByWordCountAndDeleteOldMap ...
type Peak ¶ added in v0.31.0
Peak Descriptor of a peak as string slice
func (*Peak) PeakToString ¶ added in v0.31.1
PeakToString Convert Peak to string
func (*Peak) SplitToPeak ¶ added in v0.31.6
SplitToPeak Convert string split to peak
func (*Peak) StringToPeak ¶ added in v0.31.0
StringToPeak Convert Peak string to peak
func (*Peak) StringToPeakNoCheck ¶ added in v0.31.0
StringToPeakNoCheck Convert Peak string to peak
func (*Peak) StringToPeakWithPos ¶ added in v0.31.12
StringToPeakWithPos Convert Peak string to peak
type PeakIntervalTreeObject ¶ added in v0.31.6
type PeakIntervalTreeObject struct { Chrintervaldict map[string]*interval.IntTree Intervalmapping map[uintptr]string Peakiddict *map[string]uint }
PeakIntervalTreeObject Peak IntervalTree Object
func CreatePeakIntervalTreeObject ¶ added in v0.31.6
func CreatePeakIntervalTreeObject(peakiddict map[string]uint, verbose bool) ( intervalObject PeakIntervalTreeObject)
CreatePeakIntervalTreeObject create a peak intervall dict object
func CreatePeakIntervalTreeObjectFromFile ¶ added in v0.31.6
func CreatePeakIntervalTreeObjectFromFile(bedfile Filename) (intervalObject PeakIntervalTreeObject)
CreatePeakIntervalTreeObjectFromFile create a peak intervall dict object
type SymbolType ¶ added in v0.31.16
SymbolType Descriptor of a symbol: either a string or int slice