首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用ape显示野兽祖先状态重建

用ape显示野兽祖先状态重建
EN

Stack Overflow用户
提问于 2017-02-20 17:29:19
回答 1查看 39关注 0票数 1

我已经用野兽运行了祖先状态的重建,这给了我一个这样的Nexus文件

代码语言:javascript
复制
#NEXUS

Begin taxa;
    Dimensions ntax=93;
        Taxlabels
            adan1251 
            blag1240-nule 
            wers1238-marit
            ;
End;
Begin trees;
    Translate
           1 adan1251,
           2 blag1240-nule,
           3 wers1238-marit
;
tree STATE_0 = ((1[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.02243609504948792,2[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.02243609504948792)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.01067010801410265,3[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.03310620306359057)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.022661511629175332;
tree STATE_1 = ((1[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:1.02243609504948792,2[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.02243609504948792)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.01067010801410265,3[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.03310620306359057)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.022661511629175332;
tree STATE_2 = ((1[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:2.02243609504948792,2[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.02243609504948792)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.01067010801410265,3[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.03310620306359057)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.022661511629175332;
tree STATE_3 = ((1[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:3.02243609504948792,2[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.02243609504948792)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.01067010801410265,3[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.03310620306359057)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.022661511629175332;
tree STATE_4 = ((1[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:4.02243609504948792,2[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.02243609504948792)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.01067010801410265,3[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.03310620306359057)[&recon_lexicon:cooked rice="00000000000001",recon_lexicon:mountain="000000000001",recon_lexicon:to die="00001",recon_lexicon:wall="00000001"]:0.022661511629175332;
End;

(除了20倍的分类群,2000倍的树木和实际上不同的树木。)

我想将意图节点和提示节点中的词法项的重建可视化,看来ape可能是一个很好的工具,因为它可以编写脚本,它可以读取Nexus文件(我尝试使用read.nexus("filename.nex"),并且看起来str是合理的),从screenshots.html判断它可以以一种很好的格式显示重构:

在从原始数据构建某种共识树之后,如何使ape从10000个不同的Newick树的注释([&...])中给出的数据构建类似于此的[&...]树?

EN

回答 1

Stack Overflow用户

发布于 2017-08-11 20:05:29

在查看了ape包的一些文档之后,如果您对nodelabels()函数感兴趣的话。

在绘制了树图之后,您只需传递一个向量,其长度等于您拥有的分类法的数量,而每个值代表了占据其中一个字符状态的概率。然后,只需用thermo选项绘制节点上的概率。

在帮助文件中:

代码语言:javascript
复制
data(bird.orders)
plot(bird.orders, "c", use.edge.length = FALSE, font = 1) 
nodelabels(thermo = runif(22), cex = .8)

如果有两个以上的状态,则必须创建一个矩阵,其列数等于您的状态数,行数等于分类法的数目。对于每一行,包括每个分类群的相对概率。每一行加起来应该是1。

扩展示例,有三个状态:

代码语言:javascript
复制
thermo <- matrix(c(.6,.3,.1), nrow=22, ncol=3)
plot(bird.orders, "c", use.edge.length = FALSE, font = 1)
nodelabels(thermo = thermo, cex = .8)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42350870

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档