This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Number of Blast hits for multiple sequence fasta

Using command line blast v. 2.2.31+ the neither of the following commands will return only 2 subjects per query:

blastn -query multiple_sequences.fa -db database -task blastn -dust no -outfmt "7 std" -max_target_seqs 2 -out outputfile
blastn -query multiple_sequences.fa -db database -task blastn -dust no -outfmt "7 std" -num_alignments 2 -out outputfile

There are a few posts about this, but none related to submitting with multiple sequences in the fasta. Any ideas why these commands do not work for only outputting two subject sequences per query?

blast

Look for this command; I think it is.

-max-hsps 2

1 answer

Hi,
Just found this link;
http://seqanswers.com/forums/archive/index.php/t-27735.html

Seems it has something to do with HSP? Although i can't find any additional information about this om the NCBI site itself.
Also maybe you would want to try outfmt 6, it does not have any comment lines which makes it easier to parse (then you can just create a small script or awk argument that only takes the first hit)

As far as I know, max_targets looks at the number of matched sequences, not the number of actually produced hits. Meaning, if you have multiple hits to the same sequence (say an entire chromosome) this still only counts as a single hit on the target.

Log in to answer this question.