Run a local blast

Source: Internet
Author: User

In this context, 'local' means you are running blast on your own server, not at CLR or anyone else's server. this gives you the flexibility of comparing your query either against precomputed databases (like NR, swissprot, trembl, etc .) or against a customized database, containing a specific set of sequences.

 

Query sequence set: contigs. supercontigs. filtered_012808.fasta

Reference Database: all_gene-CDS-111313.txt

(Hint: choose among: blastp, blastn, blastx, tblastn, tblastx)

Blast reference: http://www.ncbi.nlm.nih.gov/BLAST/blast_program.shtml

 

Generate a customized search database

$ Makeblastdb-dbtype nucl-In contigs. supercontigs. filtered_012808.fasta

 

Blast all_gene-CDS-111313.txt

$ Bladen-query all_gene-CDS-111313.txt-DB contigs. supercontigs. filtered_012808.fasta-outfmt 6-out gene. bladen

 

Wait until it finishes then take a look at the output:

$ Less gene. blastn

 

Blast tabular format (as specified in-outfmt 6) has multiple columns, and is the easiest output format to work with. http://www.pangloss.com/wiki/Blast

 

Cout the column (-F 2 ):

$ Cut-F 2 gene. blastn | sort-u> hits. IDS

 

How many unique hits did we get? This equals to the number of lines in the file:

$ WC-l hits. IDS

 

It appears we are getting lots of hits. We may need to go back to the blast command to add an e-value cutoff to be more stringent. How to add E-value cutoff? Let's look at the help for tblastn

$ Blastn-help

 

Now run blast with more stringent settings (e-value cutoff: 1e-20 ):

$ Bladen-query all_gene-CDS-111313.txt-DB contigs. supercontigs. filtered_012808.fasta-outfmt 6-out gene. bladen-evalue 1e-20

$ Cut-F 2 gene. blastn | sort-u> hits. IDS

 

Extract sequences from contigs. supercontigs. filtered_012808.fasta

The command fasomerecords can be used to extract multiple sequences, now let's get all the blast hits to retrieve a gene family.

$ Fasomerecords contigs. supercontigs. filtered_012808.fasta hits. IDS hits. FASTA

Run a local blast

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.