Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
commandline_remote_blast [2012/10/25 18:44] anniearchambault |
commandline_remote_blast [2015/04/14 16:30] (current) sebastien.renaut |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===When batch blast is useful=== | ===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 [[http://blast.ncbi.nlm.nih.gov/Blast.cgi|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. | + | 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 of comparing 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 [[http://blast.ncbi.nlm.nih.gov/Blast.cgi|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=== | ===Batch blast at the QCBS=== | ||
| - | As part of a collaborative project undertaken by a team of [[http://qcbs.ca/research/working-groups/working-group-1/|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. | + | As part of a collaborative project undertaken by a team of [[http://qcbs.ca/research/working-groups/working-group-1/|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 summer 2012. |
| ==Downloading and installing the BLAST program== | ==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 from your computer to the online NCBI databases. It is available for download on this [[ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/|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+. | + | BLAST+, the new version of the BLAST programs written by NCBI with improved performance and speed now allows batch blast to be performed from your computer to the online NCBI databases. It is available for download on this [[ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/|NCBI ftp page]]. At the time, ncbi-blast-2.2.26+-universal-macosx.tar.gz was downloaded, but it is frequently updated |
| As explained in the BLAST+ installation instructions pages ([[http://www.ncbi.nlm.nih.gov/books/NBK52640/|UNIX and MAC]] or [[http://www.ncbi.nlm.nih.gov/books/NBK52637/|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): | As explained in the BLAST+ installation instructions pages ([[http://www.ncbi.nlm.nih.gov/books/NBK52640/|UNIX and MAC]] or [[http://www.ncbi.nlm.nih.gov/books/NBK52637/|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): | ||
| Line 19: | Line 19: | ||
| To run one of the BLAST programs (blastp, blastn, blastx…), change directory to where the BLAST+ program is located. For instance, /Applications/ncbi-blast-2.2.26+/bin. | To run one of the BLAST programs (blastp, blastn, blastx…), change directory to where the BLAST+ program is located. For instance, /Applications/ncbi-blast-2.2.26+/bin. | ||
| - | To know the command that will be useful for your search, read the [[http://www.ncbi.nlm.nih.gov/books/NBK1762/|LAST+ user manual]], the [[http://www.ncbi.nlm.nih.gov/books/NBK1763/|commanline manual]], and consult the help menu for the program you want to use. To know more on the meaning of the read this [[http://www.ncbi.nlm.nih.gov/BLAST/tutorial/Altschul-1.html|NCBI tutorial]] For instance: | + | To know the command that will be useful for your search, read the [[http://www.ncbi.nlm.nih.gov/books/NBK1762/|LAST+ user manual]], the [[http://www.ncbi.nlm.nih.gov/books/NBK1763/|commanline manual]], and consult the help menu for the program you want to use. To know more on the meaning of output statistics, read this [[http://www.ncbi.nlm.nih.gov/BLAST/tutorial/Altschul-1.html|NCBI tutorial]] For instance: |
| <code> | <code> | ||
| ./blastp –help | ./blastp –help | ||
| Line 43: | Line 43: | ||
| cut -f 2 -d "|" Aspergillus_fumigatus_blast.output.txt > ../onlygi/Aspergillus_fumigatus_blast.output.list.onlygi.txt | cut -f 2 -d "|" Aspergillus_fumigatus_blast.output.txt > ../onlygi/Aspergillus_fumigatus_blast.output.list.onlygi.txt | ||
| </code> | </code> | ||
| + | |||
| + | ==Another useful command== | ||
| + | Saving comma or tab separated values files from the MAC OS 10.6.8 often introduced end of line characters (^M) problematic for manipulating txt files. Applying the following command can delete the ^M characters, and make the file readable for most programs. | ||
| + | <code> | ||
| + | tr '\r' '\n' < filename.txt > filename_nolineend.txt | ||
| + | </code> | ||
| ===Conclusion=== | ===Conclusion=== | ||
