2
$\begingroup$

In my work I've found that in circumstances where there is a mismatch near the edges of the query sequence, blastn prefers to return a shorter contiguous alignment, rather than allowing for a mismatch near the 5' or 3' end of the query sequence.

For example, consider the subject sequence (bold indicates alignment with mismatch in brackets):

GACCAACCTGCTGGATCTGCTGATCGGCG[G]TTTGCGAAATA

and query sequence:

CTGGATCTGCTGATCGGCG[A]T

Blasting this will return the 19bp contiguous alignment upstream of the mismatch, rather than returning a 21bp alignment with a single mismatch at the G/A base at position 20 in the query.

I'm using the command line version of blastn, and I've tried messing with the penalties as well as setting -task blastn-short, but nothing seems to fix this issue.

I speculate that the various gap and mismatch penalties are working out such that a shorter contiguous alignment is preferred over a slightly longer alignment with a mismatch, but I haven't been able to figure out how to modify the penalties in such a way as to change this preference.

$\endgroup$
1
  • 1
    $\begingroup$ Nope, altering the weights is the solution as you said. So please do answer your own question —this a totally encouraged behaviour. $\endgroup$ Oct 8 at 9:20
0
$\begingroup$

Here's my working solution,

So I found a choice of parameters that resolves this, -reward 3 -gapopen 5 -gapextend 5.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.