Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NeedlemanWunsch ¶
NeedlemanWunsch performs global alignment between two strings using the Needleman-Wunsch algorithm. It returns the final score and the optimal alignments of the two strings in O(nm) time and O(nm) space. https://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm
Example ¶
package main
import (
"fmt"
"github.com/TimothyStiles/poly/align"
)
func main() {
a := "GATTACA"
b := "GCATGCU"
scoring := align.NewScoring()
score, alignA, alignB := align.NeedlemanWunsch(a, b, scoring)
fmt.Printf("score: %d, A: %s, B: %s", score, alignA, alignB)
}
Types ¶
Click to show internal directories.
Click to hide internal directories.