sequence-align
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i sequence-align

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

151 kB

Total Files

41

Last publish

Collaborators

  • pfefferniels