Local BLAST

“The Basic Local Alignment Search Tool (BLAST) finds regions of similarity between biological sequences. The program compares nucleotide or protein sequences to sequence databases and calculates the statistical significance.”

Installation for Gnome users:

sudo apt-get install blast++

Website:

http://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs&DOC_TYPE=Download

$makeblastdb: Creating a local BLAST database

The first thing you need is to create a local database using a multi-sequence FASTA file as input, and set which type of sequences are in your file.

makeblastdb -in file.fasta -dbtype nucl -out file.blastdb

Note that in the previous example we used nucleotides ‘nucl’ as -dbtype. Use -dbtype as ‘prot’ if you have amino acid sequences.

$BLAST: Searching for similarities

Now, to search for similarities against the database created, specify the new multi-sequence FASTA file, the e-value cutoff, the format and name for the output.

blastn -db file.blastdb -query file.fas -num_threads 4 -evalue 1e-20 -outfmt 6 -out result.txt

*the -outfmt 6 parameter gives the BLAST output in a tabular table:

  1. query (e.g., gene) sequence id
  2. subject (e.g., reference genome) sequence id
  3. percentage of identical matches
  4. alignment length
  5. number of mismatches
  6. number of gap openings
  7. start of alignment in query
  8. end of alignment in query
  9. start of alignment in subject
  10. end of alignment in subject
  11. expect value
  12. bit score

*** There are more formatting options ( -outfmt ) for the alignment view:

0 = pairwise,
1 = query-anchored showing identities,
2 = query-anchored no identities,
3 = flat query-anchored, show identities,
4 = flat query-anchored, no identities,
5 = XML Blast output,
6 = tabular,
7 = tabular with comment lines,
8 = Text ASN.1,
9 = Binary ASN.1,
10 = Comma-separated values,
11 = BLAST archive format (ASN.1)

For detailed options type “$blastn -help” on terminal.

Advertisements
This entry was posted in Local Tools. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s