繁体   English   中英

是否可以通过将分类群与姐妹分类群而不是节点绑定来将它们添加到系统发育中?

[英]Is it possible to add taxa to a phylogeny by binding them to sister taxa, rather than nodes?

我正在尝试创建一棵树来计算系统发育信号并进行系统发育广义最小二乘分析。 但是,我用于此分析的文献树中缺少我的一些分类群,主要是因为这些分类群在父研究时被认为是所包含分类群的亚种,后来被提升到物种等级。 结果,我确切地知道这些分类单元需要 go(它们以前包含在其中的分类单元的姐妹)的位置,但是我无法将它们添加到树中。

我一直在使用以下代码将分类群添加到我的树中。

library(ape)
library(phytools)
orig_tree<-rtree(n=20)
tip<-list(edge=matrix(c(2,1),1,2),
          tip.label="t6a",
          edge.length=1.0,
          Nnode=1)
class(tip)<-"phylo"
btree<-bind.tree(orig_tree,tip,where=22)
plotTree(btree)

然而,这有几个问题。 一方面,这通过创建一个多分法来添加新的分类群,然后我必须使用像bifurcatr这样的 package 随机解析。 然而,这对于已知的系统发育是不准确的。 这不是真正的多分法,这种情况下的拓扑是已知的:t6a 和 t6 是姊妹类群。 如果我尝试将任何化石分类群添加到数据中,这也是一个问题,因为如果化石靠近两个主要进化枝的基部,随机解析多分法可能会将其作为错误进化枝的基础成员。

此外,我使用具有可变数量节点的树,因为在某些情况下某些分类单元的数据丢失,我必须运行省略分类单元的数据子集。 因此,树之间的 then 节点的数量并不总是相同的。 所以我想找出一种方法来添加不依赖于特定树中特定节点数量的分类群。

我想知道是否有任何方法可以通过将分类单元作为姐妹分类单元绑定到已知尖端来将分类单元添加到树中,而不是在内部节点创建多分支? 这将使我能够更轻松地将分类单元绑定到树,因为无论树的长度如何,都有一个一致的点可以绑定它们(作为具有特定标签的任何尖端的姐妹)。

您可以通过将提示 id 提供给ape::bind.tree(..., where = my_tip_id)直接将您的树绑定到提示(而不是节点)上。 这将删除提示并将其替换为您要添加的新树。 我写了一个小 function 自动将樱桃(或多头)添加到树中:

## Function for adding a cherry to a tree where a single tip was before
add.cherry <- function(tree, tip, new.tips) {

    ## Find the edge leading to the tip
    tip_id <- match(tip, tree$tip.label)

    ## Create the new cherry
    tree_to_add <- ape::stree(length(c(tip, new.tips)))

    ## Naming the tips
    tree_to_add$tip.label <- c(tip, new.tips)

    ## Add 0 branch length
    tree_to_add$edge.length <- rep(0, Nedge(tree_to_add))

    ## Binding both trees
    return(bind.tree(tree, tree_to_add, where = tip_id))
}

## Adding a new sister taxon to t6 (with a 0 branch length)
new_tree <- add.cherry(orig_tree, tip = "t6", new.tips = "t6a")
plot(new_tree)

## Adding a bunch of sister taxa to t8
new_tree <- add.cherry(orig_tree, tip = "t8", new.tips = c("t8a", "t8b", "t8c"))
plot(new_tree)

如果需要,您可以将其应用于提示列表以使用for循环进行修改:

## List of four tips to modify
tips_to_modify <- list("t1", "t3", "t6", "t8")

## List of tips to add to these four tips
tips_to_add <- list("t1a", c("t3.1", "t3.2"), "t6a", c("t8a", "t8b", "t8c"))

## Adding the tips all together
new_tree <- orig_tree
for(one_tip in seq_along(tips_to_modify)) {
    new_tree <- add.cherry(new_tree, tip = tips_to_modify[[one_tip]], new.tips = tips_to_add[[one_tip]])
}
plot(new_tree)

使用 'TreeTools' function AddTip()很容易实现。

orig_tree <- ape::rtree(n = 20)
leaf_labelled_6 <- which(orig_tree$tip.label == 't6')
new_tree <- TreeTools::AddTip(orig_tree, leaf_labelled_6,  't6a')

我对bind.tree()的经验是,它有时会弄乱树的内部节点编号,从而导致某些下游函数出现问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM