windows

package
v6.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBest

func GetBest(mets map[metrics.Metric][]float64, wins []Window, stop int, largeCore bool) map[metrics.Metric]Window

func GetBestN

func GetBestN(mets map[metrics.Metric][]float64, wins []Window, stop int, largeCore bool, n uint) map[metrics.Metric][]Window

GetBestN gets the best N windows for each metric. Quality is determined by sum of square error of metric, variance, and user-preference for size of core.

func UseFullRange

func UseFullRange(bestWindow Window, aln *nexus.Alignment, chars []byte) bool

UseFullRange checks invariant conditions and returns if any are true

Types

type Window

type Window [2]int

Window is an inclusive window into a UCE

func ExtendCandidate

func ExtendCandidate(w Window, start, stop, minWin int) []Window

func GenerateCandidates

func GenerateCandidates(start, stop, min int) []Window

GenerateCandidates produces candidate windows of minimum size spanning the total length with a minimum/2 overlap Windows must be:

  1. at least minimum window from the start of the UCE (ie, first start at minimum+1)
  2. at least minimum window from the end of the UCE (ie, last end at length-minimum+1)
  3. at least minimum window in length (ie, window{start, end)})

Input is treated inclusively, but returned with exclusive stop indexes

func GenerateWindows

func GenerateWindows(length, min int) []Window

GenerateWindows produces windows of at least a minimum size given a total length Windows must be:

  1. at least minimum window from the start of the UCE (ie, first start at minimum+1)
  2. at least minimum window from the end of the UCE (ie, last end at length-minimum+1)
  3. at least minimum window in length (ie, window{start, end)})

Input is treated inclusively, but returned with exclusive stop indexes

func New

func New(start, stop int) Window

func (*Window) Start

func (w *Window) Start() int

Start is the starting position of a window

func (*Window) Stop

func (w *Window) Stop() int

Stop is the inclusive stopping position of a window

Jump to

Keyboard shortcuts

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