This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to blast multiple sequences against one database at once? (command line)

Hi,

I'm very new to the command line and I am trying to use blast. I have a set of sequences in one fasta file that I need to blast against a database that is also is a fasta file. Is there a blast option or can I do a for loop for that?

Thanks in advance!

unix blast

1 answer

Unless you want to get separate result files for each sequence you can cat seq1.fa seq2.fa ... seqN.fa > total.fa. And then use total.fa as -query total.fa for your blast. If you do want separate result files then use a loop/xargs construct to feed blast with one file at a time.

I want seperate results, I'm trying to do a loop. Thank you!

Log in to answer this question.