Difference between revisions of "Parsing Blast Results from Your Favorite Database"

From GcatWiki
Jump to: navigation, search
Line 6: Line 6:
 
#:*-db = database to search
 
#:*-db = database to search
 
#:*-outfmt = output format '''<span style="color:#FF0000">DO NOT CHANGE THIS UNLESS YOU KNOW HOW TO EDIT blastParse.py</span>'''
 
#:*-outfmt = output format '''<span style="color:#FF0000">DO NOT CHANGE THIS UNLESS YOU KNOW HOW TO EDIT blastParse.py</span>'''
 +
#:*-out = output file for blast results
 
#Download blastParse.py
 
#Download blastParse.py
 
#Place blastParse.py into the same folder as your blast results file
 
#Place blastParse.py into the same folder as your blast results file

Revision as of 19:39, 23 February 2011

This tutorial assumes the user has blast version __________ installed and has already made their local blast database (on their computer). It is also written for Macintosh users; however, all scripts and tools are Windows compatible or have similar programs for Windows.

  1. Run your search using the command
    /usr/local/ncbi/blast/bin/blastn -query querySequence.fasta -db dataBase.fasta -outfmt "7 qacc sacc evalue qstart qend sstart send" -out blast_output.txt
    What does this command do? "-" indicates a command. The text that follows is the actual command parameters.
    • -query = query file
    • -db = database to search
    • -outfmt = output format DO NOT CHANGE THIS UNLESS YOU KNOW HOW TO EDIT blastParse.py
    • -out = output file for blast results
  2. Download blastParse.py
  3. Place blastParse.py into the same folder as your blast results file
  4. Open terminal and navigate into the folder containing blastParse.py using following Unix commands
    cd OR ls
  5. Run blastParse.py using the command
    python blastParse.py
  6. Follow prompts of the BLASTPARSE program
  7. Results will be saved as tab delimited data in text files. If you would like to visualize the data, open files in excel to make graphs (right click > open with > excel).