This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to set the number of mismatch in blastn

Hi everyone, I'm running blast nucleotide with word-size of 6 using the following command:

blastn -query 6452.fasta -db ref -out BlastResults.txt -num_threads 8 -outfmt '6 qseqid sseqid sseq' -word_size 6

Now I want to set the number of mismatch to 2 for the command. how should I add it? I added "-penalty 2" to command but it doesn't work!

Regards.

blastn mismatch penalty

Here's the error when I used "-penalty 2" for the command: Error: (CArgException::eConstraint) Argument "penalty". Illegal value, expected <=0: `2'

The penalties should be negative numbers (because they penalise the score), which is why 2 is not an allowed argument.

This isn't the same as the total number of mismatches, this is merely how much reduced an alignment score is, whenever a mismatch occurs.

I don't believe BLAST allows you to specify a particular number of mismatches - you'd have to post-filter your results or try a different approach.

Take the results from BLAST, and filter them after the fact to find alignments which only contain 1 or 2 gaps. This isn't an ideal approach though. You might have better luck with packages like fuzznuc depending on how similar you expect your results to be.

0 answers

No answers yet.

Log in to answer this question.