This is an old revision of the document!
Sequence similarity search remotely by batch, on the online public NCBI databases
When batch blast is useful
Comparing many sequences (queries) at a time to the NCBI public databases saves time compared to performing repeated searches for each different queries, and has the advantage to compare to the most up to date version of the public databases. It is unfortunately not possible to perform this task directly from the online access of the various BLAST programs offered on the BLAST NCBI website. The commandline programs written by the NCBI team must be run from the terminal to complete this type of batch similarity search, and the main commands and steps are detailed here.
Batch blast at the QCBS
As part of a collaborative project undertaken by a team of QCBS researchers, we aimed at isolating from the NCBI databases the orthologs of 29 different genes in 94 different species where the genome or transcriptome is partially sequences. We would soon realized that performing these searches, and downloading the best hits cannot not quickly done by multiple copying and pasting. The steps described below were done on Mac OS X 10.6.8, in the 2102 summer.
=Downloading and installing the BLAST program= BLAST+, the new versions of the BLAST programs written by NCBI with improved performance and speed now allows batch blast to be performed to the online NCBI databases. It is available for download on this NCBI ftp page. At that time, ncbi-blast-2.2.26+-universal-macosx.tar.gz was downloaded, but the current version is now 2.2.27+.
As explained in the BLAST+ installation instructions pages (UNIX and MAC or Windows PC), to unzip and install the program file, open the terminal, change directory until you are in the same location as the zipped file, and type the command (on a Mac): tar xvpf ncbi-blast-2.2.26+-universal-macosx.tar.gz
The program is now installed on your computer. To run one of the BLAST programs (blastp, blastn, blastx…), change directory to where the program is located. Typically, it is /Applications/ncbi-blast-2.2.26+/bin .
Run the sequence similarity search: To know the commands that will be useful for your search, read the BLAST+ user manual http://www.ncbi.nlm.nih.gov/books/NBK1762/ , the commanline manual http://www.ncbi.nlm.nih.gov/books/NBK1763/ , and consult the help menu for the program you want to use. For instance: ./blastp –help
Read carefully all the options, and launch the command! For instance, if the objective is to find, among the set of amino acid sequence from Aspergillus fumigatus in the non-redundant (nr) database, those that are similar to a set of 32 different Schizosaccharomyces pombe proteins written in txt file in fasta format, the typed command can be:
./blastp -evalue 1e-20 -max_target_seqs 1 -db nr -query /Users/yourusernam/Documents/Folder1/Folder1_1/Folder1_1_1/Schizosaccharomyces_pombe.fasta -entrez_query “Aspergillus fumigatus[Organism]” -out /Users/yourusernam/Documents/Folder1/Folder1_1/Folder1_1_1/Aspergillus_fumigatus_blast.output.txt -remote
If the desired output has to have only the query name, the sequence database name, the evalue, and the number of identical sites, the following options can be added at the end of the command:
-outfmt '6 qseqid sseqid evalue nident'
All in this one command: ./blastp -evalue 1e-20 -max_target_seqs 1 -db nr -query /Users/yourusernam/Documents/Folder1/Folder1_1/Folder1_1_1/Schizosaccharomyces_pombe.fasta -entrez_query “Aspergillus fumigatus[Organism]” -out /Users/yourusernam/Documents/Folder1/Folder1_1/Folder1_1_1/Aspergillus_fumigatus_blast.output.txt -remote -outfmt '6 qseqid sseqid evalue nident'
