【问题标题】:Why does it say my tree has no branch lengths when it does?为什么它说我的树没有分支长度?
【发布时间】:2019-12-31 12:33:35
【问题描述】:

我正在尝试使用 phytools 中的 phylosig 函数计算系统发育信号,但出现此错误:

Error in vcv.phylo(tree) : the tree has no branch lengths

但是,当我检查我的树时,它说它确实有分支长度!

> MCC_genus_tree

Phylogenetic tree with 1160 tips and 1159 internal nodes.

Tip labels:
    Anolis, Ornithorhynchus, Zaglossus, Tachyglossus, Rhynchocyon, Elephantulus, ...

Rooted; includes branch lengths.

发生了什么事?任何帮助,将不胜感激。


编辑:

我的树是从 vertlife 下载的 MCC 树。

【问题讨论】:

  • 帮助我们帮助您。你能举个例子吗?可能有相同问题的树的较小版本?你用来生成树的代码怎么样?在不知道您是如何收到该消息的情况下,很难仅响应一条错误消息。
  • 嗨,G5W,谢谢 - 我意识到这是一个写得很糟糕的问题!我已经更新了问题(但也找到了答案)。不过,感谢您的观看!

标签: r phylogeny ape-phylo


【解决方案1】:

答案是我搞砸了。我的数据没有名字,所以 phylosig 放弃了我所有的提示!

这就是我修复它的方法:

data_with_names <- data_without_names$trait
names(data_with_names) <- data_with_names$species_names

【讨论】:

    猜你喜欢
    • 2022-10-17
    • 2014-06-21
    • 1970-01-01
    • 2018-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-05
    • 1970-01-01
    相关资源
    最近更新 更多