This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Online Blast Perl/Python Script

Hi All

I have a 10000 sequences in fasta file which I want to do online blast with nr data base . Do any one of you has any perl or python script to do that?

Thanks in advance

Regards

blast

Have you searched online for a solution to this? It's a very, very common problem and there are sure to be solutions.

If you are not so keen on using using perl or python, perhaps you could also try Taverna and workflows in myexperiment. You can adopt pre-built workflows in myexperiment for your purpose

4 answers

In BLAST+ to use remote databases, such as nr, you just add the -remote command along with the -db command. For example:

blastp -query my1000seqs.fasta -db nr -remote

Like Neil says, this is a very common task; indeed, if you just want to run the BLAST you describe (i.e. 10000 fasta sequences all in one file), you don't need to use perl or python, you can just give the one file with all the 100000 sequences in it as a query to blast directly

This should help: ftp://ftp.ncbi.nlm.nih.gov/blast/documents/web_blast.pl

I recommend you to download local blast in your computer and run the following:

  • update_blastdb.pl nr
  • for file in ls your_fasta_files_directory; do ./blastn -query $file -db nr -out $file.xml -task blastn -dust=yes -penalty=-3 -gapopen=5 -gapextend=2 -evalue 1e-10 -html=yes -besthitoverhang 0.1 -besthitscoreedge 0.1 -outfmt 5 -maxtargetseqs 10 -numthreads 4 -parse_deflines=yes; done

You can change parameter values as you want

Log in to answer this question.