原来一直用blast的,但NCBI已停止了对blast的更新,而强力推荐使用blast+,这次因为要做blast的数据量比较大,所以试了一下blast+,同时也用blast做了一下,发现blast+果然要快得多,看来习惯要改变了。其实blast+和blast的原理差不多,只不过程序参数和名称有了点变化而已,现简要介绍一下其本地化的方法:
1、下载最新版的程序,根据自己的系统选择合适的版本。
2、解压后进入程序目录……ncbi-blast-2.2.31+/bin,各个程序的功能说明可以参考我的另外一篇博客。
3、各程序的参数说明可以用自带的help,例如想查blastx的参数说明可以用: ./blastx -help
4、做blast前一般要先格式化数据库,除非只是几个序列之间的比对,例如格式化一个蛋白数据库可以用下列参数:
$HOME/……/ncbi-blast-2.2.31+/bin/makeblastdb -in uniprot_sport -dbtype prot -input_type fasta -parse_seqids -hash_index
主要几个程序的使用例子:
blastp -query protein.fa -out /protein.output -db dbname -outfmt 0 -evalue 1e-3 -max_target_seqs 20
blastn -query nucl.fa -out output -db dbname -outfmt 6 -evalue 1e-5 -num_descriptions 10
blastx -query nucl.fa -out output -db dbname -outfmt 6 -evalue 1e-5 -num_descriptions 10
参数说明:
-query: 输入文件路径及文件名
-out:输出文件路径及文件名
-db:格式化了的数据库路径及数据库名
-outfmt:输出文件格式,2.2.31版共有14种格式,6是tabular格式对应BLAST的m8格式
-evalue:设置输出结果的e-value值
-max_target_seqs:找到的最大的目标的数目,也可用-num_descriptions,tabular格式输出结果的条数
分类目录归档:NCBI
linux 安装和使用NCBI剪接边界工具splign
splign是NCBI中一个比对cDNA和genome的一个工具,通过splign可以很方便的找到cDNA各个外显子。Windows下安装非常简单,下载后就可以直接用了,但linux版本下运行需要一些相关的包,下面介绍一下splign在linux下的安装和使用(windows中splign的使用和linux一样)。
首先下载相应的版本,我的linux系统是ubuntu 64位的,下载Linux x64,解压”gunzip splign”,修改文件属性为可执行文件”chomd 777 splign”,试着运行一下”./splign”,一般会报错”splign: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory”,那是因为缺少模块 “libpcre.so.0″, 应下载安装pcre包(pcre-8.21)。 继续阅读
最新blast本地化
原来做过本地blast,但那是三年前的事了,这次来新单位后要重新自己构建blast,才发现NCBI中blast已经有了很多变化,默认连接的下载页面变成了blast+,blast+中主要程序描述如下:
Program | Function |
---|---|
blastdbcheck | 检查数据库完整性 |
blastcmd | 从blast数据库中检索序列或其它信息 |
blast_aliastool | 创建数据库别名 |
blastn | 核酸序列与核酸数据库比较 |
blastp | 蛋白质序列与蛋白质数据库比较 |
blastx | 核酸序列与蛋白持数据库比较 |
blast_formatter | 使用指定的ID格式化网络blast结果 |
convert2blastmask | 转换小写的masking成makeblastdb可读格式 |
dustmasker | 过滤掉低重复序列 |
lagacy_blast.pl | 转换一个legacy blast search程序为blast+配对并执行 |
makeblastdb | 格式化一个FASTA文件为一个blast数据库 |
makembindex | 为一个存在的核酸数据库建立一个megablast索引 |
psiblast | 查找蛋白质家族,计算提供的蛋白质的遗传距离或者建立位置特异性矩阵 |
rpsblast | 从一个蛋白质保守区域数据库中检索蛋白序列的功能区域 |
rpsblast | 将核酸序列以六种阅读框的形式转换成蛋白序列后从蛋白保守区域数据库中检索蛋白功能区域 |
segmasker | 过滤掉低重复序列并转换成蛋白序列 |
tblastn | 在核酸数据库中检索蛋白序列 |
tblastx |
核酸与核酸数据库在蛋白质水平比较 |
update_blastdb.pl | 在NCBI中下载blast数据库 |
这个blast+程序虽然功能强大了,但一下子还用不习惯,而且平时用得最多的比较两个序列的程序也没有,于是想找原来的blast,阅读了大量的说明,花了我半天的时间终于找到了,地址为:ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/LATEST ,下载与系统匹配的就可以了,一般如果是windows XP 系统就下载win32的,windows 7或windows 8 64位的就下载win64,而我的系统为ubuntu 64位系统就下载了blast-2.2.26-x64-linux.tar.gz,解压后在解压文件的/bin/文件夹就可以看到熟悉的blastall,formatdb,bl2seq等程序了,具体功能描述如下(原始说明):
Program | Function |
---|---|
bl2seq | Directly comparing two FASTA sequences |
blastall | legacy blast containing the subfunction of blastn, blastp, blastx, tblastn, and tblastx |
blastclust | Clusters input FASTA sequences into related groups |
blastpgp | Standalone PSI-BLAST for search of distantly related protein sequences and generate position-specific matrices |
copymat | Copies blastpgp output for input to makemat |
fastacmd | Retrieves specific sequence or dumps the sequences from a formatted blast database |
formatdb | Convert FASTA formatted seqeucne file into BLAST database |
formatrpsdb | Format scoremat files into an RPSBLAST database |
impala | protein profile search program, mostly replaced by rpsblast |
makemat | Convert the copymat files into scoremat format, no loger needed by new blastpgp output |
megablast | Faster batch blastn program that uses greedy-algorithm. Works in contiguous or more sensitive discontiguous mode |
rpsblast | reverse PSI-BLAST program for searching against conserved domain database |
seedtop | Pattern search program |
关于程序调用方法网上有很多资料,就不多在这里重复,这里只举个简单的例子,如调用bl2seq,“./bl2seq -i seq1.fa -j seq2.fa”。
UCSC中基因组版本与其它数据库版本对应关系
因为各数据库对基因组有一套自己的命名法则,往往说的名称不一样,但基因组序列相同,如UCSC的hg19和NCBI的GRCh37就是同一基因组,现将UCSC中基因组版本与其它数据库版本的对应关系列出,方便大家查找。 继续阅读
NCBI中RefSeq各种accession说明(二)
在前面介绍了一些常见序列的accession号,其实在NCBI中还有很多accession号,仅与RNA相关的就有116种,这里各举一个例子供参考。不同的编码代号代表不同的意思,如NM_开头的表示标准序列,XM_表示预测的蛋白编码序列,NR_表示非编码蛋白的mRNA序列,AF开头的表示克隆序列,BC开头的表示模板序列,大家可以细细研究。 继续阅读
利用NCBI查找基因信息
检索基因的注释信息,在我们平常的学习和工作中经常会遇到,现总结归纳一下,好备不时之需。
以human “UST”基因为例。 继续阅读