How to run BLAST locally for multiple fasta files
2
0
Entering edit mode
2.6 years ago
Paula ▴ 60

Hi All!

I would like to know how can I run BLAST locally in multiple files. Here is the command I am using for a single file:

bsub -n 16 blastp -query sequences_dsrb_sol_1_10.fasta -db database/nhr -outfmt '6 std salltitles' -num_threads 16 -max_target_seqs 1 -evalue 1e-30 -out faa_two_testing_s3_proteins_sol_1_10_taxonomy.txt

And here is the command I tried for multiple files:

bsub -n 16 ls *.fasta | parallel -a - blastp -query {} -db database/nhr -outfmt '6 std salltitles' -num_threads 16 -max_target_seqs 1 -evalue 1e-30 -out {}.txt

However, I get the following error:

/usr/bin/bash: blastp: command not found

Do you know any other methods to run BLAST in parallel for multiple fasta files?

Thank you!

fasta blast • 1.2k views
ADD COMMENT
0
Entering edit mode
2.6 years ago
GenoMax 147k

Are you using a job scheduler on a compute cluster? Based on bsub in your command, you must be. If you are on a cluster using parallel on top likely does not make sense since you may as well start individual jobs in parallel (pun intended) using the scheduler.

Since the error is about blastp not being found you first need to sort out $PATH or if your cluster uses modules system then load the module for blast first.

ADD COMMENT
0
Entering edit mode

Hi GenoMax!

I try to load the module from the shell file but it always sends an error. Even if I run it outside without a shell file, seems like it doesn't run BLAST if the parallel command is there. Do you know what could be happening?

Thanks!

ADD REPLY
0
Entering edit mode

contact your system admin and ask them how your system is set up

ADD REPLY
0
Entering edit mode

So sounds like you are using modules for software management on your cluster? So relevant module would need to be added in the shell or inside your script.

If you have a job scheduler available then using that for independent jobs to run blast on the list of files makes more sense than using parallel.

ADD REPLY
0
Entering edit mode
2.4 years ago
Hugo ▴ 380

You can use SEDA (https://www.sing-group.org/seda/). The "BLAST" operation (https://www.sing-group.org/seda/manual/operations.html#blast) allows to do this.

ADD COMMENT

Login before adding your answer.

Traffic: 2455 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6