slide

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ahead

func Ahead(query_left, query_right, subject_left, subject_right float64) bool

func Intersect

func Intersect(query_left, query_right, subject_left, subject_right float64) bool

func ParseGffAttributes

func ParseGffAttributes(field string) ([]string, map[string]string, error)

func SlidingEntryMeans

func SlidingEntryMeans(in BedOutputScanner, size float64, step float64) <-chan BedEntry

func SlidingGffBpCovered

func SlidingGffBpCovered(in BedOutputScanner, size float64, step float64) <-chan BedEntry

func SlidingGffBpCoveredFull

func SlidingGffBpCoveredFull(inconn io.Reader, outconn io.Writer, size float64, step float64) error

func SlidingGffEntryCount

func SlidingGffEntryCount(in BedOutputScanner, size float64, step float64) <-chan BedEntry

func SlidingGffEntryCountFull

func SlidingGffEntryCountFull(inconn io.Reader, outconn io.Writer, size float64, step float64) error

func SlidingMeans

func SlidingMeans(inconn io.Reader, outconn io.Writer, size float64, step float64)

func SlidingSyncSums

func SlidingSyncSums(inconn io.Reader, outconn io.Writer, size float64, step float64)

func WriteEntry

func WriteEntry(w io.Writer, b BedEntry) error

Types

type BedEntry

type BedEntry struct {
	Chrom string
	Left  float64
	Right float64
	Val   float64
	Other interface{}
}

func GffComment

func GffComment() BedEntry

func ParseGffLine

func ParseGffLine(line []string) (BedEntry, error)

type BedEntryScanner

type BedEntryScanner struct {
	Chan    <-chan BedEntry
	Current BedEntry
}

func NewBedEntryScanner

func NewBedEntryScanner(channel <-chan BedEntry) *BedEntryScanner

func (*BedEntryScanner) Entry

func (s *BedEntryScanner) Entry() BedEntry

func (*BedEntryScanner) Scan

func (s *BedEntryScanner) Scan() bool

type BedOutputScanner

type BedOutputScanner interface {
	Scan() bool
	Entry() BedEntry
}

type BedScanner

type BedScanner struct {
	Scanner  *fasttsv.Scanner
	CurEntry BedEntry
	LastErr  error
}

func NewBedReaderScanner

func NewBedReaderScanner(r io.Reader) *BedScanner

func NewBedScanner

func NewBedScanner(s *fasttsv.Scanner) *BedScanner

func (*BedScanner) Entry

func (s *BedScanner) Entry() BedEntry

func (*BedScanner) Scan

func (s *BedScanner) Scan() bool

type GffFields

type GffFields struct {
	IsComment      bool
	Source         string
	Type           string
	Score          float64
	Strand         byte
	Phase          byte
	AttributeNames []string
	Attributes     map[string]string
}

type GffScanner

type GffScanner struct {
	// contains filtered or unexported fields
}

func NewGffScanner

func NewGffScanner(r io.Reader) *GffScanner

func (*GffScanner) Entry

func (s *GffScanner) Entry() BedEntry

func (*GffScanner) Error

func (s *GffScanner) Error() error

func (*GffScanner) Line

func (s *GffScanner) Line() []string

func (*GffScanner) Scan

func (s *GffScanner) Scan() bool

type LineWriter

type LineWriter interface {
	Write([]string)
}

type Slider

type Slider struct {
	Chrom          string
	Left           float64
	Mid            float64
	Right          float64
	Size           float64
	StepLen        float64
	Items          *list.List
	Scanner        BedOutputScanner
	Unused         *list.List
	StartingChrom  bool
	DoneReading    bool
	DoneOutputting bool
}

func NewSlider

func NewSlider(b BedOutputScanner, size float64, step float64) Slider

func (*Slider) AddAllUnused

func (s *Slider) AddAllUnused()

func (*Slider) Mean

func (s *Slider) Mean() (float64, error)

func (*Slider) MeanEntry

func (s *Slider) MeanEntry() (BedEntry, error)

func (*Slider) RemoveOlds

func (s *Slider) RemoveOlds()

func (*Slider) ScanOne

func (s *Slider) ScanOne() (keepGoing bool)

func (*Slider) Step

func (s *Slider) Step() bool

func (*Slider) Sum

func (s *Slider) Sum() (float64, error)

func (*Slider) WriteWindow

func (s *Slider) WriteWindow(w LineWriter)

func (*Slider) WriteWindowSum

func (s *Slider) WriteWindowSum(w LineWriter)

type SyncScanner

type SyncScanner struct {
	Scanner  *fasttsv.Scanner
	CurEntry BedEntry
	LastErr  error
}

func NewSyncScanner

func NewSyncScanner(s *fasttsv.Scanner) *SyncScanner

func (*SyncScanner) Entry

func (s *SyncScanner) Entry() BedEntry

func (*SyncScanner) Scan

func (s *SyncScanner) Scan() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL