This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Compare Two Sequence To Find The Maximum Similarity

We know BLAST can compare two sequences, however it compares sequences by lining up them. My question is can we shift one sequence then compare the other. Let me give you a simple example:the length is 15

GTTCCTAGTCTAGAC
TCCTAGTCTAGACTT

If we shift it and compare

GTTCCTAGTCTAGAC
  |||||||||||||
  TCCTAGTCTAGACTT

Then there are 11 letters hit, we define the score by 11/15=73%. Of course, we can shift to whatever we want. How to find the max score? Is there such a software to do it? Thanks.

sequence blast

With the above example, you are talking about sequence identity not similarity.

Istvan is correct - strictly speaking BLAST does not compare two sequences. It is possible to align two sequences with BLAST - see Bl2Seq at http://blast.ncbi.nlm.nih.gov/Blast.cgi. Nonetheless, BLOAST is not a reliable tool for the goal you have in mind.

2 answers

what about using a simple Smith & Waterman algorithm ? e.g: emboss water

This is exactly how I would approach this.

I think that the goal is to propose a method, not to use an available one.

OK, so run SW iteratively shifting the query or alignment to the n+1 position with each successive comparison. There, method and tool are now together.

Matching by shifting can't handle internal gaps(Indels), they can put gaps only at the extremities of the sequences

neither substitution, sequencing errors, homology...

Log in to answer this question.