Run a local BLAST

In this context, ‘local’ means you are running BLAST on your own server, not at NCBI 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 the all_gene-CDS-111313.txt

$ blastn -query all_gene-CDS-111313.txt -db contigs.supercontigs.filtered_012808.fasta-outfmt 6 -out gene.blastn

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):

$ blastn -query all_gene-CDS-111313.txt -db contigs.supercontigs.filtered_012808.fasta -outfmt 6 -out gene.blastn -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

时间: 2024-10-25 03:11:09

Run a local BLAST的相关文章

Can I run a local BLAST search again multiple blast databases simultaneously?

from: https://secure.clcbio.com/helpspot/index.php?pg=kb.page&id=113 Can I run a local BLAST search again multiple blast databases simultaneously? (blast, blastn, blastp, blastx, serveral databases)By default, you will be offered single BLAST databas

Running command-line BLAST

http://angus.readthedocs.io/en/2014/running-command-line-blast.html Running command-line BLAST The goal of this tutorial is to run you through a demonstration of the command line, which you may not have seen or used much before. Prepare for this tuto

【Nutch基础教程之七】Nutch的2种执行模式:local及deploy

在对nutch源码执行ant runtime后,会创建一个runtime的文件夹.在runtime文件夹下有deploy和local 2个文件夹. [[email protected] runtime]$ ls deploy  local 这2个文件夹分别代表nutch的2种执行方式:部署模式及本地模式. 1.nutch.sh中关于2种执行方式的执行 if $local; then # fix for the external Xerces lib issue with SAXParserFac

Acunetix WVS 10 - Local Privilege escalation

'''========================================================================Acunetix WVS 10 - from guest to Sytem (Local privilege escalation) CVE: CVE-2015-4027Author: (me) Daniele LinguaglossaAffected Product: Acunetix WVS 10Exploit: Local privilege

【Nutch基础教程之七】Nutch的2种运行模式:local及deploy

在对nutch源代码运行ant runtime后,会创建一个runtime的目录,在runtime目录下有deploy和local 2个目录. [[email protected] runtime]$ ls deploy  local 这2个目录分别代表nutch的2种运行方式:部署模式及本地模式. 以下以inject为例,示范2种运行模式. 一.本地模式 1.基本用法: $ bin/nutch inject Usage: InjectorJob <url_dir> [-crawlId <

flask LOCAL线程隔离技术

from threading import Thread from werkzeug.local import Local local = Local()#实例化一个线程隔离对象 request = '123' class MyThread(Thread): def run(self): global request request = 'abc' print('子线程',request) mythread = MyThread() mythread.start() mythread.join(

BadVPN详解之--组网原理剖析

这可能是第一篇关于BadVPN原理的中文介绍,所以我恪守职责,希望能将BadVPN的原理阐述清楚,而不仅仅是为了欺世盗名取天下之先. 序:格尔上市 这一段插在这里有点突兀,与BadVPN无关,只是我的一点实感,忽略即可.       明天小小要去厦门演出,今天是什么日子?是小小准备且出发的日子.但是同样在今天,也就是2017年4月21日(写完本文时估计已经到了22日...),上海格尔软件股份有限公司成功上市了.也许你不知道这个公司,确实这公司的业务是很小众,不像BAT布局那般宏大,但这并不意味着

Mysql二进制安装

Mysql安装 安装步骤 1.新建用户 groupadd mysql useradd -r -g mysql mysql cd /usr/local/----------------------------注意路径 chown -R mysql:mysql  mysql chmod -R 775  mysql 2.安装依赖包 yum install libai* -y yum install ncurses-devel -y yum -y install bison yum install zl

jQuery Ajax 全解析

jQuery Ajax 全解析 本文地址: jQuery Ajax 全解析 本文作者:QLeelulu 转载请标明出处! jQuery确实是一个挺好的轻量级的JS框架,能帮助我们快速的开发JS应用,并在一定程度上改变了我们写JavaScript代码的习惯. 废话少说,直接进入正题,我们先来看一些简单的方法,这些方法都是对jQuery.ajax()进行封装以方便我们使用的方法,当然,如果要处理复杂的逻辑,还是需要用到jQuery.ajax()的(这个后面会说到). 1. load( url, [d