Entering edit mode
4.3 years ago
bioguy ▴ 50
Am trying to run blastn to check if a sequence has a similar match within a database within a certain percent identity– to speed things up, I'd like blast to stop searching after finding a single hit (it doesn't matter what the match is, just that it exists).
Is there a parameter that does this? From my understanding, max target seqs does not do what I want...
I think it does exactly what you need it to do. What it does not do is get you the "best" n hits. It gets you the first n hits, which may or may not be the best.
See this paper:
Further reading: BLAST, setting maximum number of hits
max_target_seqsfor how many maximum target sequences and
max_hspsfor how many maximum hits within target sequences, but still in this case it's picking the latter hit although presumably it has encountered the other hit first. AFAIK there's no
grep -m 1equivalent to blast although perhaps it's possible to disable search within hsps by changing the source code. In other words, it may not return the optimal hit, but it seems to return the optimal hit within the first good enough target sequence. If subject sequences are long, this may have significant speed implications..
Looks to me like it's going through the entire sequence space despite
-max_target_seqs 1. This was with v. 2.7.1+