MAKER避免重复运算
MAKER深入篇-如何避免重复运算
通常而言,我们会运行不只一轮的MAKER。如果参考组序列没有变化,那么有一些计算只需要做一次就行了,例如将EST, Repeat和Protein序列比对到参考基因组,得到它们对应的位置。
我们有三种方法可以避免不必要的运算,第一种方法是直接修改配置文件,让MAKER重复利用之前的运行结果;第二种方式是利用之前输出的GFF文件,通过配置"Re-annotation Using MAKER Derived GFF3"里的选项来跳过对应的计算;第三种方法于是利用之前输出的GFF文件,从中提取EST/Repeat/Protein的位置信息保存为GFF文件,通过配置"est_gff", "protein_gff", "rm_gff"来避免重新计算位置信息。
后续分析建立MAKER高级篇-SNAP模型训练基础上,也就是通过protein和est序列直接输出基因模型,然后训练出初步的HMM模型
方法1
方法1最为简单,我们只需要修改之前的maker_opts.ctl
里的参数,然后重新运行即可。运行时会输出如下的警告信息。
注意: MAKER是通过对比maker_opt.ctl
里的配置信息和自己运行时记录的maker_opts.log
来判断哪些参数发生了改变。因此,如果SNAP第二次训练生成的文件,要是和上一次命名相同,那么它会认为你这次输入的模型文件和上次相同,就会跳过SNAP预测这一步。
实际运行时,MAKER会跳过BLAST步骤,但是依旧会调用"exonerate"来处理BLAST结果。
方法2
如果你不小心把maker的输出文件删掉了,但是你保留着之前gff3_merge
默认参数输出的文件,那么你可以使用该文件来跳过BLAST和Exonerate运算。
Step1: 配置"Re-annotation Using MAKER Derived GFF3"里的参数
#-----Re-annotation Using MAKER Derived GFF3
maker_gff=round1.gff #MAKER derived GFF3 file
est_pass=1 #use ESTs in maker_gff: 1 = yes, 0 = no
altest_pass=1 #use alternate organism ESTs in maker_gff: 1 = yes, 0 = no
protein_pass=1 #use protein alignments in maker_gff: 1 = yes, 0 = no
rm_pass=1 #use repeats in maker_gff: 1 = yes, 0 = no
model_pass=1 #use gene models in maker_gff: 1 = yes, 0 = no
pred_pass=1 #use ab-initio predictions in maker_gff: 1 = yes, 0 = no
other_pass=1 #passthrough anyything else in maker_gff: 1 = yes, 0 = no
此处的round1.gff
通过gff3_merge
从上一论的maker输出中提取,代码如下
gff3_merge -d genome.maker.output/genome_master_datastore_index.log -o round1.gff
Step2: 将"EST Evidence"和"Protein Homology Evidence"里的配置清空,如下
#-----EST Evidence (for best results provide a file for at least one)
est= #set of ESTs or assembled mRNA-seq in fasta format
altest= #EST/cDNA sequence file in fasta format from an alternate organismest_gff= #aligned ESTs or mRNA-seq from an external GFF3 file
altest_gff= #aligned ESTs from a closly relate species in GFF3 format#-----Protein Homology Evidence (for best results provide a file for at least one)
protein= #protein sequence file in fasta format (i.e. from mutiple organisms)
protein_gff= #aligned protein homology evidence from an external GFF3 file#-----Repeat Masking (leave values blank to skip repeat masking)
model_org= #select a model organism for RepBase masking in RepeatMasker
rmlib= #provide an organism specific repeat library in fasta format for RepeatMasker
repeat_protein= #provide a fasta file of transposable element proteins for RepeatRunner
rm_gff= #pre-identified repeat elements from an external GFF3 file
prok_rm=0 #forces MAKER to repeatmask prokaryotes (no reason to change this), 1 = yes, 0 = no
softmask=1 #use soft-masking rather than hard-masking in BLAST (i.e. seg and dust filtering)
Step3: 配置"Gene Prediction",例如SNAP, 同时将"est2genome"和"protein2genome"设置为0
#-----Gene Prediction
snaphmm=snap.hmm #SNAP HMM file
gmhmm= #GeneMark HMM file
augustus_species= #Augustus gene prediction species model
# 略过其他参数
est2genome=0 #infer gene predictions directly from ESTs, 1 = yes, 0 = no
protein2genome=0 #infer predictions from protein homology, 1 = yes, 0 = no
# 略过其他参数
会跳过exonerate步骤,直接从snap预测开始。
方法3
我们还可以通过设置est2gff
, protein_gff
和rm_gff
,来避免重复序列屏蔽和BLAST+Exonerate运算
Step1: 从之前的MAKER输出的GFF文件种提取EST/Protein/Repeat的位置信息
# transcript alignment
awk '{ if ($2 ~ "est") print $0 }' round1.gff > est.gff
# protein alignments
awk '{ if ($2 == "protein2genome") print $0 }' round1.gff > protein2genome.gff
# repeat alignments
awk '{ if ($2 ~ "repeat") print $0 }' round1.gff > repeats.gff
Step2: 修改EST Evidence / rotein Homology Evidence /Repeat Masking里的配置参数
#-----EST Evidence (for best results provide a file for at least one)
est= #set of ESTs or assembled mRNA-seq in fasta format
altest= #EST/cDNA sequence file in fasta format from an alternate organismest_gff=est.gff #aligned ESTs or mRNA-seq from an external GFF3 file
est_gff=./est.gff
altest_gff= #aligned ESTs from a closly relate species in GFF3 format#-----Protein Homology Evidence (for best results provide a file for at least one)
protein= #protein sequence file in fasta format (i.e. from mutiple organisms)
protein_gff=protein2genome.gff #aligned protein homology evidence from an external GFF3 file#-----Repeat Masking (leave values blank to skip repeat masking)
model_org= #select a model organism for RepBase masking in RepeatMasker
rmlib= #provide an organism specific repeat library in fasta format for RepeatMasker
repeat_protein= #provide a fasta file of transposable element proteins for RepeatRunner
rm_gff=repeats.gff #pre-identified repeat elements from an external GFF3 file
prok_rm=0 #forces MAKER to repeatmask prokaryotes (no reason to change this), 1 = yes, 0 = no
softmask=1 #use soft-masking rather than hard-masking in BLAST (i.e. seg and dust filtering)
Step3: 配置"Gene Prediction",例如SNAP, 同时将"est2genome"和"protein2genome"设置为0
#-----Gene Prediction
snaphmm=snap.hmm #SNAP HMM file
gmhmm= #GeneMark HMM file
augustus_species= #Augustus gene prediction species model
# 略过其他参数
est2genome=0 #infer gene predictions directly from ESTs, 1 = yes, 0 = no
protein2genome=0 #infer predictions from protein homology, 1 = yes, 0 = no
# 略过其他参数
同样也会跳过exonerate步骤,直接从snap开始。
结果比较
对于这三种方法,从运行日志中看,三者都会跳过重复序列屏蔽,将EST和蛋白序列回帖到参考基因组的步骤,然而最终预测的基因数却不一致。
分析方法2和方法1的输出GFF文件时,发现方法2输出包括exonerate_protein2genome-gene
和exonerate_est2genome-gene
。推测其原因在第二种方法的model_pass
, pred_passs
参数在设置为1时会使用之前est2genome和protein2genome输出的基因模型,而由于模型本身就来自于EST和Protein,就变成自我验证,于是输出结果就变多了。当设置model_pass
, pred_passs
参数为0时,最终保证方法2和方法1输出结果一致。
之后设置model_pass
, pred_passs
参数为0,然后比较方法1,方法2和方法3输出的GFF。我发现方法1和方法2的第二列信息完全相同,是blastn, blastx, est2genome, maker, protein2genome, repeatmasker, snap_masked, 而方法3的第二列为est_gff:est2genome, maker, protein_gff:protein2genome, repeat_gff:repeatmasker, snap_masked. 目前只能推测是MAKER对这些证据使用方式不同引起了最终输出结果的差异,但具体的原理我没有分析清楚,不过不妨碍使用。
最后,三种方法使用优先级分别是方法1 > 方法2 > 方法3,其中方法2要注意设置model_pass
, pred_passs
的设置。
MAKER避免重复运算相关推荐
- 使用MAKER进行注释: 如何避免多轮MAKER时的重复运算
通常而言,我们会运行不只一轮的MAKER.如果参考组序列没有变化,那么有一些计算只需要做一次就行了,例如将EST, Repeat和Protein序列比对到参考基因组,得到它们对应的位置. 我们有三种方 ...
- python重复元素判定编程_从零开始学Python编程四:条件判断与循环
前面已经介绍了不少Python基础知识,大家不要觉得不耐烦,想要学好Python,做好Python开发,一定要打牢基础.大家也发现了,Python中很多基础知识和数学算法是一样的,比如今天要教给大家的 ...
- python程序多次运行_如何让编程语言 Python 自己重复运行进程?
有些时候,我们需要进行一些事件的重复,但正如常识一样,重复的过程是枯燥的,无聊的.现实世界中的事物有自己具象的颜色,形状,不过一旦重复这些事物,一样不可避免的会感到无聊. 现实世界尚且如此,编程语言中 ...
- 小问题,对递归重复调用的改进,一起来分享
Problem 设有一头小母牛,从出生第四年起每年生一头小母牛,按此规律,第N年时有几头母牛? Input 本题有多组数据.每组数据只有一个整数N,独占一行.(1≤N≤50) Output 对每组数据 ...
- LeetCode-50:关于浮点型数字求高次幂的高效运算
题目描述比较简单,就是求-100.0到100.0的n次幂,n为32位有符号整数. 比如求2.00000的10次幂,则需要返回的值为1024.00000:诶,1024刚过:( 首先比较无脑的就是一次次的 ...
- 位运算判断奇偶数_位运算判断奇偶数
第一条:利用位运算判断一个整数是奇数还是偶数. 经常用到一个for循环,当索引i是奇数时执行语句A,偶数时执行语句B.判断i是奇数还是偶数,可用如下方法: if(i &1){ //i是奇数情况 ...
- 抑或运算符(位运算和逻辑运算符详解)----Java
首先,Java中 &,|,^,&&,||都有俩个身份,那就是逻辑运算符和位运算符 现在我们来了解一下他们的特性 1,逻辑运算符(boolean类型): ①& :同为tr ...
- 素因子分解表+重复元素全排列问题
素因子分解表+重复元素全排列问题 如果要求解重复运算的全排列问题,最朴素的方法是先求n!,再求重复元素m1,m2,m3的m1!,m2!,m3!,然后再做除法,但这样写很容易爆时间和爆空间. 所以这里聊 ...
- 计算机减法函数word,谁说Excel才能运算?Word计算功能同样强大,公式函数都不在话下-excel减法函数...
通常对于数据运算,大家第一时间都会想到Excel. 其实很多小伙伴不知道Word计算功能同样强大,加减乘除不在话下,而且还能使用函数哦. 今天就跟大家分享在Word表格中是如何使用公式运算的. 四则运 ...
最新文章
- VGG16迁移学习实现
- redis学习之redis基本数据类型以及Jedis
- ICMP诊断报文类型
- python正则表达式花括号_python正则表达式(+ {})(二)
- Can't connect to MySQL server on 'ip' (13)
- SQL Server向表中插入数据
- ESP32 TIMER
- 无法解析的外部符号 __imp__glewinit
- Codeforces Round #347 (Div.2)_A. Complicated GCD
- Android StorageManager 存储设备管理
- 移动魔百和系统升级服务器地址,【当贝市场】移动魔百盒升级后无法观看视频怎么办...
- css 之水平居中对齐
- 高斯过程分类和高斯过程回归_高斯过程回归建模入门
- commit rollback操作产生undo和redo?
- 关于JSP在Myeclipse里插入图片后浏览器显示不出来
- 【翻译】介绍一下Opta。Rails上的Terraform
- app推广假量怎么识别?
- Postgresql数组操作符及数组函数
- 惊呆了!我用 Python 可视化分析和预测了 2022 年 FIFA世界杯
- jupyter notebook打不开,Unable to create process using ‘“e:\python\python.exe“ “G:\python\Scripts\jupyt