dp

package
v0.0.0-...-7b6cf24 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2012 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package providing PALS dynamic programming alignment routines.

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxIGap    int     = 5
	DiffCost   int     = 3
	SameCost   int     = 1
	MatchCost  int     = DiffCost + SameCost
	BlockCost  int     = DiffCost * MaxIGap
	RMatchCost float64 = float64(DiffCost) + 1
)

Functions

This section is empty.

Types

type Aligner

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

An Aligner provides allows local alignment of subsections of long sequences.

func NewAligner

func NewAligner(target, query *seq.Seq, k, minLength int, minId float64, threads int) *Aligner

Create a new Aligner based on target and query sequences.

func (*Aligner) AlignTraps

func (self *Aligner) AlignTraps(trapezoids filter.Trapezoids) (segments DPHits)

Align pairs of sequence segments defined by trapezoids. Returns aligning segment pairs satisfying length and identity requirements.

type DPHit

type DPHit struct {
	Abpos, Bbpos              int     // Start coordinate of local alignment
	Aepos, Bepos              int     // End coordinate of local alignment
	LowDiagonal, HighDiagonal int     // Alignment is between (anti)diagonals LowDiagonal & HighDiagonal
	Score                     int     // Score of alignment where match = SameCost, difference = -DiffCost
	Error                     float64 // Lower bound on error rate of match
}

DPHit holds details of alignment result.

type DPHits

type DPHits []DPHit

DPHits is a collection of alignment results.

func (DPHits) Sum

func (self DPHits) Sum() (a, b int, e error)

Returns the sums of alignment lengths.

type Params

type Params struct {
	MinHitLength int
	MinId        float64
}

Holds dp alignment parameters.

Jump to

Keyboard shortcuts

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