I forgot to say no JAVA! thanks for the answer, is valid anyway
I 'm looking for a smith.waterman implementation that given two sequences (and all respective parameters like match, mismatch/gap penalty and so) returns me the list of alignments and the begining and end in both sequences.
Implementations that do not do what we need:
- Biopython pairwise2 does not return that
- This c library neither ttps://github.com/mengyao/Complete-Striped-Smith-Waterman-Library
- python's swalign https://pypi.python.org/pypi/swalign
Preferably should be a C library we can port into python, but given the things we found I don't think we are going to be so lucky.
3 answers
not tested: there is an implementation of SW in BioJava: http://biojava.org/docs/api4.2.1/org/biojava/nbio/alignment/SmithWaterman.html
the method 'getPair' returns a http://biojava.org/docs/api4.2.1/org/biojava/nbio/core/alignment/template/SequencePair.html
with:
int getIndexInQueryAt(int alignmentIndex)
Returns the query index corresponding to a given alignment column.
int getIndexInQueryForTargetAt(int targetIndex)
Returns the query index corresponding to a given target index.
int getIndexInTargetAt(int alignmentIndex)
Returns the target index corresponding to a given alignment column.
int getIndexInTargetForQueryAt(int queryIndex)
Returns the target index corresponding to a given query index.
In my opinion, water from EMBOSS package (written in C) is one of the greatest implementions of the Smith-Waterman algorithm. If you are using Debian/Ubuntu, water is available as repository (named emboss).
Before you install it, you can check water on-line.
EDIT: I'm not sure whether water can report multiple alternative alignments (with the same scores).
in I cannot find them in the results
I've made a library implemented Smith-Waterman in python, and it must be helpful for you. => https://github.com/kyu999/ssw_aligner
Log in to answer this question.
Please do not delete posts that have already received answers.