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)。
1、安装pcre前应先检查一下有没有安装”gcc”,没有的话应先安装”gcc”,不然不能进行编译,对于ubuntu,可以直接用命令安装”sudo apt-get install gcc”。
2、解压
解压pcre
gunzip pcre-8.21.tar.gz
tar xvf pcre-8.21.tar
3、配置
cd pcre 8.21
./configure –prefix=/usr/local/pcre-8.21 –libdir=/usr/local/lib/pcre –includedir=/usr/local/include/pcre
4、编译
make
如果报错,说明你的机子还没安装make,使用”sudo apt-get install make”进行安装。
5、安装
make install
6、检查
ls /usr/local 检查是否有pcre-8.21目录
ls /usr/local/lib 检查是否有pcre目录
ls /usr/local/include 检查是否有pcre目录
7、将库文件导入cache
在/etc/ld.so.conf中最后加入:/usr/locla/lib/pcre,然后运行ldconfig,如果找不到ldconfig路径,就用”whereis”命令查找”whereis ldconfig”。
8、建立软连接
ln -s /usr/local/lib/pcre/libpcre.so.0 /lib64
为了使splign 能找到libpcre.so.0
安装好这些后splign就可以使用了,下面介绍splign的使用方法。
1、如果只是两个序列,直接用就可以了” ./splign -query cDNA.fa -subj genome.fa “。
2、如果是多序列批量处理,就要分多个步骤进行,下面以拟南芥为例.
(1)获得拟南芥(Arabidopsis thaliana)第一条染色体的所有cDNA序列(FASTA格式),存为文件”chr1_cDNA.fa”,下载获得拟南芥第一条染色体的基因组序列存为文件”chr1_genome.fa”,将这两个文件放在一个单独的文件夹”chr1″。
(2)建立LDS索引,使splign能快速识别你的序列
./splign -mklds chr1
(3)格式化需要比对的序列
formatdb -pF -oT -i chr1/chr1_cDNA.fa
formatdb -pF -oT -i chr1/chr1_genome.fa
formatdb是blast中的一个程序,对于如何下载blast可以参考我的另外一篇博文“最近blast本地化”,注意上面的formatdb应加上其所在的路径。
(4)进行序列比对
可以使用blast中的”megblast”程序,也可以下载”compart“。
compart -qdb chr1_cDNA.fa -sdb chr1_genome.fa >chr1.cpt
megablast -i chr1_cDNA.fa -d chr1_genome.fa -F “m D;R” -D 3 | grep -v “^#” | sort -k 2,2 -k 1,1 -T temp_dir > chr1.hit
(5)使用splign结合建立的索引整理比对的结果
如果比对程序是compart:
splign -ldsdir chr1 -comps chr1.cpt >chr1.splign
如果比对程序是megablast:
splign -ldsdir chr1 -hits chr1.hit >chr1.splign
chr1.splign文件就为各外显子所在染色体位置情况及其边界情况,下面是部分结果,关于splign的更详细使用情况可以参考其官方说明文件

+1 NM_099983.2 chr1 1 283 1 283 3631 3913 GT M283
+1 NM_099983.2 chr1 1 281 284 564 3996 4276 AGGT M281
+1 NM_099983.2 chr1 1 120 565 684 4486 4605 AGGT M120
+1 NM_099983.2 chr1 1 390 685 1074 4706 5095 AGGT M390
+1 NM_099983.2 chr1 1 153 1075 1227 5174 5326 AGGT M153
+1 NM_099983.2 chr1 1 461 1228 1688 5439 5899 AGAA M461
+2 NM_001197952.1 chr1 1 234 2434 2667 26543 26776 AGGT M234
+2 NM_001197952.1 chr1 1 151 2668 2818 26862 27012 AGGT M151

各字段说明如下:

Field Definition
1. Compartment (or model) ID Numeric ID preceeded by a plus or minus sign indicating query orientation.
2. Query Query (cDNA) sequence identifier.
3. Subject Subject (genomic) sequence identifier.
4. Identity The number of matches divided by the length of the alignment, if the segment is an exon. Dash, if the segment is unaligned.
5. Length The length of the alignment, if the segment is an exon. Dash, if the segment is unaligned.
6. Query start Starting coordinate on the query.
7. Query stop Ending coordinate on the query. When aligned in antisense, this coordinate is less than the query starting coordinate.
8. Subject start Starting coordinate on the subject sequence, if the segment is an exon. Dash, if the segment is unaligned.
9. Subject stop Ending coordinate on the subject sequence, if the segment is an exon. If the subject sequence is aligned in minus strand, this coordinate is be less than the subject start. Dash, if the segment is unaligned.
10. Type , if the segment is an exon or if the segment was left unaligned. For exons, acceptor is specified to the left of ‘<' and donor is specified to the right of '>‘. For unaligned segments, L-, M- or R- may preceed ‘GAP’ to indicate location on the query.
11. Alignment transcript Alignment transcript represents full details of the alignment in a form of a string composed of characters ‘M’, ‘R’, ‘I’ and ‘D’ where each character corresponds to an elementary command (Match, Replace, Insert or Delete) needed to transform the query segment into the subject segment. The string is encoded with RLE.

linux 安装和使用NCBI剪接边界工具splign》上有 2 条评论

回复 陈述事实 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注