Documentation ¶
Index ¶
- Constants
- Variables
- func AssertIfFileExists(filename string)
- func Check(err error)
- func CheckIfFileExists(filename string) bool
- func CheckIfFolderExists(foldername string) bool
- func CheckIfPeakPosIsMutltipleOf3(peakPos []int) (numberOfPeaks int)
- func CloseFile(file closer)
- func CountNbLines(filename string) int
- func CreatePeakIntervalTree()
- func CreatePeakIntervalTreeCustom(peakPos []int, sep string)
- func ExceCmd(cmd string)
- func ExceCmdReturnOutput(cmd string) 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 LoadIndex(fname Filename, sep string) (indexArray []string, indexDict map[string]int)
- func LoadIndexMarkDupplicates(fname Filename, sep string) (indexArray []string, indexDict map[string]int, cleanIndexDict map[string]int)
- func LoadPeaks(fname Filename, trim bool, keepLine bool) int
- func LoadPeaksAndTrimandReturnOrientation(fname Filename, orientationColID int) (nbPeaks int, orientationDict map[uint]string)
- func LoadPeaksCustom(fname Filename, sep string, peakPos []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 []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 ReturnReaderForSamfile(fname Filename) (*sam.Reader, *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, ...)
- func TryExceCmd(cmd string) error
- type ArrayFlags
- type Filename
- type IntInterval
- type Pair
- type PairList
- type Peak
- func (peak *Peak) Chr() (chr string)
- func (peak *Peak) PeakToString() (peakstr string)
- func (peak *Peak) SplitToPeak(split []string)
- func (peak *Peak) StringToPeak(str string)
- func (peak *Peak) StringToPeakNoCheck(str string)
- func (peak *Peak) StringToPeakWithPos(str string, refPos [3]int)
- func (peak *Peak) StringToPeakWithPosAndStart(str string, refPosList []int, start int)
- type PeakIntervalTreeObject
- type Reader
- 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 PEAKSCOREDICT map[Peak]float64
PEAKSCOREDICT dict containing score for ref peaks
var PEAKSYMBOLDICT map[Peak][]string
PEAKSYMBOLDICT map[peak]symbol
Functions ¶
func AssertIfFileExists ¶
func AssertIfFileExists(filename string)
AssertIfFileExists panic if err is nil from os.Stats
func CheckIfFileExists ¶
CheckIfFileExists return true or flase
func CheckIfFolderExists ¶
CheckIfFolderExists return true or flase
func CheckIfPeakPosIsMutltipleOf3 ¶
CheckIfPeakPosIsMutltipleOf3 check if list is multiple of 3
func CreatePeakIntervalTreeCustom ¶
CreatePeakIntervalTreeCustom ...
func ExceCmdReturnOutput ¶
ExceCmdReturnOutput return output of comand
func InitIntervalDictsThreading ¶
func InitIntervalDictsThreading(threadnb int)
InitIntervalDictsThreading Init interval dict threading map by copying the interval map for each trheads
func LoadCellDictsFromBedFileToIndex ¶
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 LoadIndexMarkDupplicates ¶
func LoadIndexMarkDupplicates(fname Filename, sep string) (indexArray []string, indexDict map[string]int, cleanIndexDict map[string]int)
LoadIndexMarkDupplicates Load index file and return an index dict
func LoadPeaksAndTrimandReturnOrientation ¶
func LoadPeaksAndTrimandReturnOrientation(fname Filename, orientationColID int) (nbPeaks int, orientationDict map[uint]string)
LoadPeaksAndTrimAndReturnOrienation load peak fil,
return peak peak id trimmed for "chr" -> dict and return Orientation dict (i.e. the sense of the peak)
func LoadPeaksCustom ¶
LoadPeaksCustom load peak file globally
func LoadPeaksDict ¶
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 ¶
func LoadRefBedFileWithSymbol(peaksymbolfile Filename)
LoadRefBedFileWithSymbol peaksymbolfile, peakfile Filename
func LoadRefCustomFileWithSymbol ¶
func LoadRefCustomFileWithSymbol( peaksymbolfile Filename, sep string, symbol SymbolType, refPos []int, scorefiltercolumns int)
LoadRefCustomFileWithSymbol peaksymbolfile, peakfile Filename
func LoadSymbolFile ¶
func LoadSymbolFile(peaksymbolfile, peakfile Filename)
LoadSymbolFile peaksymbolfile, peakfile Filename
func ReturnReader ¶
ReturnReader ...
func ReturnReaderForBamfile ¶
ReturnReaderForBamfile ...
func ReturnReaderForBzipfile ¶
ReturnReaderForBzipfile ...
func ReturnReaderForBzipfileOld ¶
ReturnReaderForBzipfileOld ...
func ReturnReaderForBzipfilePureGo ¶
ReturnReaderForBzipfilePureGo ...
func ReturnReaderForGzipfile ¶
ReturnReaderForGzipfile ...
func ReturnReaderForSamfile ¶
ReturnReaderForSamfile ...
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 ¶
Peak Descriptor of a peak as string slice
func (*Peak) PeakToString ¶
PeakToString Convert Peak to string
func (*Peak) SplitToPeak ¶
SplitToPeak Convert string split to peak
func (*Peak) StringToPeak ¶
StringToPeak Convert Peak string to peak
func (*Peak) StringToPeakNoCheck ¶
StringToPeakNoCheck Convert Peak string to peak
func (*Peak) StringToPeakWithPos ¶
StringToPeakWithPos Convert Peak string to peak
type PeakIntervalTreeObject ¶
type PeakIntervalTreeObject struct { Chrintervaldict map[string]*interval.IntTree Intervalmapping map[uintptr]string Peakiddict *map[string]uint }
PeakIntervalTreeObject Peak IntervalTree Object
func CreatePeakIntervalTreeObject ¶
func CreatePeakIntervalTreeObject(peakiddict map[string]uint, peakPos []int, verbose bool) ( intervalObject PeakIntervalTreeObject)
CreatePeakIntervalTreeObject create a peak intervall dict object
func CreatePeakIntervalTreeObjectFromFile ¶
func CreatePeakIntervalTreeObjectFromFile(bedfile Filename, sep string, peakPos []int) ( intervalObject PeakIntervalTreeObject)
CreatePeakIntervalTreeObjectFromFile create a peak intervall dict object
type SymbolType ¶
SymbolType Descriptor of a symbol: either a string or int slice