SNAP是Ian Korf独自开发的软件,简单易用。
2. SNAP的安装
$ wget http://korflab.ucdavis.edu/Software/snap-2013-02-16.tar.gz
$ tar zxf snap-2013-02-16.tar.gz
$ cd snap
$ make
3. SNAP的Parameter Estimation
3.1 需要 genes that are not too related to each other。和AUGUSTUS一致,基因两两之间的identity不要超过80%。Gene structures must be in ZFF format.
ZFF格式是Ian Korf自行使用的一个格式,有长短两种格式。In the short format, there are 4 fields: Label, Begin, End, Group.if Begin > End, the feature is on the minus strand.
>sequence-1
Einit 201 325 Y73E7A.6
Eterm 2175 2319 Y73E7A.6
>sequence-2
Einit 201 462 Y73E7A.7
Exon 1803 2031 Y73E7A.7
Exon 2929 3031 Y73E7A.7
Exon 3467 3624 Y73E7A.7
Exon 4185 4406 Y73E7A.7
Eterm 5103 5280 Y73E7A.7
不管是在正链,还是负链,从上到下,起始位置是逐渐变大的;如果是在正链上,Begin > End, Einit在Eterm前面;如果是在负链上,则 Begin < End, Eterm在Einit前面。
3.2 做Parameter Estimation需要一定数目的genes,这些genes的ZFF文件和相应的genome序列文件。
注意geneome序列文件只是包含有这些基因的序列,如果含有其它的序列的话,程序运行会出问题(core dump等)。
使用gff3_to_zff.pl来将gff3文件转换成zff文件; 再使用order.pl来调整Einit, Exon, Eterm的顺序。
$ ./gff3_to_zff.pl genes.gff3 > genes.zff
$ ./order.pl genes.zff > species.ann
提取出相应的genome的序列,并对其进行排序:
$ grep '^>' species.ann | tr -d '>' > species.seqs2keep
$ ./fasta_sort.pl species.seqs2keep < geome.fasta > species.dna
3.3 检测genes中的错误和警示,然后对genes进行修正或丢弃
$ $SnapHome/fathom species.ann species.dna -gene-stats &> gene-stats.log
$ $SnapHome/fathom species.ann species.dna -validate &> validate.log
$ grep OK validate.log > species.zff2keep
$ perl -p -i -e 's/.*:\s+(\S+)\s+OK/$1/' species.zff2keep
$ ./filterGenes.pl species.zff2keep species.ann > tmp
$ mv tmp species.ann
3.4 将序列打断成一个序列一个gene的片段,在CDS两端各加1000bp长度序列,并将所有的genes转换到正义链上。
$ $SnapHome/fathom species.ann species.dna -categorize 1000
$ $SnapHome/fathom species.ann species.dna -export 1000
3.5 run the parameter estimation program
$ mkdir params; cd params
$ $SnapHome/forge ../export.ann ../export.dna
$ cd ..
3.6 Last is to build an HMM
$ $SnapHome/hmm-assembler.pl species params > species.hmm
SNAP的Parameter Estimation能很快地完成。不像AUGUSTUS那样耗时。
4. 运行snap进行基因预测
$ $SnapHome/snap species.hmm species.geonme > species.zff
$ $SnapHome/zff2gff3.pl species.zff > species.gff3
5. 将预测的zff结果转换成gff3结果
在4中转换成的gff3文件的最后一列attributes中,只有Name标签。而使用EVM软件将基因预测结果融合的时候,需要的gff3文件中该列的标签有ID和Parent,因此需要其它的方法来将zff文件转换成gff3文件。可以使用EVM包含的一个perl程序来解决。
使用该程序需要先将EVM自带的一些perl模块export到其路径;同时需要安装cdbfasta
$EVMHome/OtherGeneFinderTrainingGuid/SNAP/SNAP_output_to_gff3.pl species.zff species.geome > species.gff3
SNAP基因ab initio的基因预测速度很快。