sequence-align
v1.0.1
Published
sequence-align --------------
Downloads
4
Readme
sequence-align
Implementation of the Needleman-Wunsch algorithm in Tyescript, based on SeqAlign.
How to use
Install
npm install sequence-align
Example usage:
import { Aligner, SeqNode, AlignType } from 'sequence-align'
const aligner = new Aligner<string>(AlignType.Global)
const nodes1: Sequence<string> = [
new SeqNode('n1', [40]),
new SeqNode('n2', [45]),
new SeqNode('n3', [50]),
new SeqNode('n4', [55])
]
const nodes2: Sequence<string> = [
new SeqNode('n1', [40]),
new SeqNode('n3', [50]),
new SeqNode('n4', [55])
]
aligner.align(nodes1, nodes2, {
gapOpen: -2,
gapExt: -1
})
const result = aligner.retrieveAlignments()
console.log(result)