Skip to content

A easy and clear javascript solution of the smith-waterman algorithm.

License

Notifications You must be signed in to change notification settings

timeipert/smith-waterman-score

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

smith-waterman-score

A easy and clear javascript solution of the smith-waterman algorithm.

Install via npm:

npm install --save smith-waterman-score

Then just call it like this:

const smith_waterman = require('smith-waterman-score')
const result = smith_waterman('*uddudrud', '*uduudrur', {'match': 1, 'mismatch': -1, 'gap': -1})

It will return you an object with two relevant informations:

console.log(result.peak)

// { 'cell': [8,8], 'value': 6 }

console.log(result.trace)

//  [
//    {patChar: 'u', patIndex: 8, seqChar: 'u', seqIndex: 8}
//    ...
//  ]

Releases

No releases published

Packages

No packages published