Skip to main content

Smith-Waterman local aligner

Project description

swalign

This package implements a Smith-Waterman style local alignment algorithm. You can align a query sequence to a reference. The scoring functions can be based on a matrix, or simple identity. Weights can be adjusted for match/mismatch and gaps, with gap extention penalties. Additionally, the gap penalty can be subject to a decay to prioritize long gaps.

The input files are FASTA format sequences, or strings of sequences.

Here is some skeleton code to get you started:

import swalign
# choose your own values here… 2 and -1 are common.
match = 2
mismatch = -1
scoring = swalign.NucleotideScoringMatrix(match, mismatch)

sw = swalign.LocalAlignment(scoring)  # you can also choose gap penalties, etc...
alignment = sw.align('ACACACTA','AGCACACA')
alignment.dump()

For other uses, see the script in bin/swalign or https://compgen.io/projects/swalign

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for swalign, version 0.3.6
Filename, size File type Python version Upload date Hashes
Filename, size swalign-0.3.6-py3-none-any.whl (8.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size swalign-0.3.6.tar.gz (7.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page