gotoh

package
v0.0.0-...-160f2ba Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package gotoh implements the Gotoh version of pair-wise alignments. We use a full scoring matrix, and use this during the summation. It will change, so we can declare an "aligner" with its various temporary storage. This can then be re-used over different alignments and will go away when the aligner goes away.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Align

func Align(scr_mat_mat *matrix.FMatrix2d, scr_scheme *Al_score) (
	pairlist []ipair, max_scr float32)

Align implements Gotoh, O. J. Mol. Biol. (1982) 162, 705-708. It does not have the bugs described in Flouri, T, Kobert, K., Rognes, T and Stamatakis, doi: http://dx.doi.org/10.1101/031500 (2015).

func IdentScore

func IdentScore(s []byte, t []byte, scr *Match_scr) (smat *matrix.FMatrix2d)

IdentScore fills out a score matrix using identity. Values for match/mismatch come from the scr structure. for an M x N pair, we have an M x N matrix. There is no extra room at the start and end.

func PrintSeqDebug

func PrintSeqDebug(verbose bool, pairlist []ipair, s, t []byte, al_type Al_type)

PrintSeqDebug is a primitive printer for aligned sequences, but it is essential for debugging.

Types

type Al_score

type Al_score struct {
	Pnlty           // open and widen penalties
	Al_type Al_type // local / global
}

Match_score is for telling a score routine how to score an alignment. scoring

type Al_type

type Al_type byte

Al_type is a byte which can be global or local. By making it its own type, we can add a String() method to it.

const (
	Local  Al_type = iota // Local alignment
	Global                // global alignment
)

Local/Global are exported constants to say what kind of alignment one wants.

func (Al_type) String

func (a Al_type) String() string

String for the alignment type is mainly for debugging.

type Match_scr

type Match_scr struct {
	Match    float32 // matched characters
	Mismatch float32 // mismatched
}

type Pnlty

type Pnlty struct {
	Open float32
	Wdn  float32
}

Pnlty has the gap opening and widening values. Note, this is different to some earlier code. Opening costs you -(Open+Wdn). Each extension costs -Wdn

Jump to

Keyboard shortcuts

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