Need a smith-Waterman that returns from/to in query and target sequences
3
0
Entering edit mode
6.9 years ago

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.

alignment pairwise smith-waterman • 3.1k views
ADD COMMENT
0
Entering edit mode

Please do not delete posts that have already received answers.

ADD REPLY
0
Entering edit mode
6.9 years ago

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.
ADD COMMENT
0
Entering edit mode

I forgot to say no JAVA! thanks for the answer, is valid anyway

ADD REPLY
0
Entering edit mode
6.9 years ago

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).

ADD COMMENT
0
Entering edit mode

in I cannot find them in the results

ADD REPLY
0
Entering edit mode
6.1 years ago

I've made a library implemented Smith-Waterman in python, and it must be helpful for you. => https://github.com/kyu999/ssw_aligner

ADD COMMENT

Login before adding your answer.

Traffic: 1617 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6