【问题标题】:Branch length modification of a phylogenetic tree in RR中系统发育树的分支长度修改
【发布时间】:2013-09-12 16:14:15
【问题描述】:

我有一个 NEWICK 格式的 phylo 文件,距离很短(大约 1.042e-06),我需要“消除”这些小距离。

我曾考虑将所有距离乘以 10,因为对于我进一步需要的树,这种乘法不会产生任何效果。 为此,我在 R 中找到了 ape 包和函数 compute.brlen,与此函数一样,您可以通过函数更改分支的长度。

知道如何用这个函数将分支的长度乘以 10 吗?

我尝试过compute.brlen(tree, main=expression(rho==10)),但我认为这不符合我的要求。

【问题讨论】:

    标签: r phylogeny


    【解决方案1】:

    尝试这样做:

    require(ape)       # get the ape package
    mytree = rtree(10) # make a random tree, you should have instead read.tree(path_to_tree_file)
    mytree$edge.length = mytree$edge.length * 10 #or any other scalar that you want
    

    请记住,这将扩展系统发育中的所有分支长度。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-13
      • 1970-01-01
      • 2022-11-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多