npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sequence-alignment

v0.0.8

Published

Sequence Alignment Algorithms implemented in Javascript, with a command line application

Readme

sequence-alignment-js

npm

Sequence Alignment Algorithms implemented in Javascript, with a command line application.

The core algorithm in this package, which is the space efficient version of Gotoh's algorithm, is based on Eugene W. Myers and Webb Miller (1988) Optimal alignments in linear space, Bioinformatics 4, 11-17.

Installation

npm i -g sequence-alignment

Usage

Help

Use align -h to show help page.

Examples

Global, Semiglobal and Local Alignment

Global alignment of DNA sequences, using default parameters of NCBI megablast (match = 1, mismatch = -2, gap = linear)

$ align ATCCGAACATCCAATCGAAGC AGCATGCAAT
ATCCGAACAT-CCAATCGAAGC
||||||||||||||||||||||
A---G--CATGC-AAT------
score: -4

Semiglobal and local alignment using -M s and -M l, respectively

$ align -M s ATCCGAACATCCAATCGAAGC AGCATGCAAT
ATCCGAACATC-CAA-TCGAAGC
|||||||||||||||||||||||
------AGC-ATGCAAT------
score: 5

$ align -M l ATCCGAACATCCAATCGAAGC AGCATGCAAT
A-CAT-CCAAT
|||||||||||
AGCATGC-AAT
score: 5

DNA/RNA/Protein

Use the -d, -r, -p flags to specify the type of sequence to be DNA, RNA and protein, respectively. Defaults to DNA.

# DNA
align ACCGGT ACGCAT
align -d ACCGGT ACGCAT
# RNA
align -r AUGCGU AUGCUG
# protein
align -p ACGHKL ACGLKL

Specifying Substitution Matrix or Match/Mismatch Scores

Use the -m option to specify the substitution matrix (usually for aligning protein sequences) OR match/mismatch scores (usually for DNA/RNA sequences).

# align protein sequences using BLOSUM62 matrix
align -p -m blosum62 ASDFG ASDGF
# align DNA sequences with match=2; mismatch=-1
align -d -m 2,-1 ACGTA AGTAC

Gap Penalty

If you used a matrix such as BLOSUM62, the gap

The gap penalty should be a positive number.

Use a single number to specify a constant (linear) gap penalty.

$ align ACCGGT AT -m 5,-1 -g 3
ACCGGT
||||||
A----T
score: -2

Use a pair of numbers to specify the gap open penalty and gap extend penalty, so that the affine gap penalty is used.

$ align ACCGGT AT -m 5,-1 -g 3,1
ACCGGT
||||||
A----T
score: 3