简体   繁体   English

如何分析系统发育树的每个末端都有多个人的数据的特征?

[英]How can analyse a trait where I have data for multiple individuals at each tip of my phylogenetic tree?

I'm new to phylogenetic analyses, and I'm using the ape library to analyse neuroanatomical traits of 34 primates from 28 different species. 我是系统发育分析的新手,并且正在使用ape库分析28种不同物种的34种灵长类动物的神经解剖特征。 I used 10ktrees to obtain a consensus phylogenetic tree (with 28 tips). 我使用了10ktrees来获得共识的系统发育树(有28个技巧)。 However, I can't combine the phenotypes and the tree because the number of observations do not match the number of tips. 但是,我无法将表型和树结合起来,因为观察数与提示数不匹配。 Should I use a polytomy for spliting a tip into multiple subjects? 我应该使用多义术将笔尖分成多个主题吗?

This is my code thus far: 到目前为止,这是我的代码:

tree <- read.nexus("10ktree.nex")
pheno <- read.csv("pheno.csv")
BrainVolume <- pheno$BrainVolume
names(BrainVolume) <- pheno$GenBank.Name
pic.BrainVolume <- pic(BrainVolume, tree)

And I get the following error: 我得到以下错误:

Error in pic(BrainVolume, tree) : 
  length of phenotypic and of phylogenetic data do not match

Thank you for your help! 谢谢您的帮助!

As I said in the comment, Chapter 6.1.10 "Intraspecific variation" in the 2nd edition (2012) of Emmanuel Paradis's book "Analysis of phylogenetics and evolution with R" has information exactly on that issue. 正如我在评论中说的那样,伊曼纽尔·帕拉迪斯(Emmanuel Paradis)的第二版(2012年)第6.1.10章“种内变异”具有“用R进行系统发育和进化分析”的确切信息。 The chapter discusses several methods. 本章讨论了几种方法。 This is one, based on Felsenstein (2008), which extends the single individual per species phylogenetic contrast method to multiple individuals. 这是基于Felsenstein(2008)的一种方法,该方法将每个物种的单个个体的系统发育对比方法扩展到多个个体。

The single-individual per species call to pic is pic.BrainVolume <- pic(BrainVolume, tree) , where BrainVolume is a vector. 对pic的每个物种的单个个体调用为pic.BrainVolume <- pic(BrainVolume, tree) ,其中BrainVolume是向量。 For the multiple-individual approach, BrainVolume has to be a list, where some entries can have a vector representing the values of the multiple individuals of the same species. 对于多个体方法,BrainVolume必须是一个列表,其中某些条目可以具有一个表示同一物种的多个个体的值的向量。 I created a 'grouped' version of my original pheno file using 我使用以下命令创建了原始pheno文件的“分组”版本

grouped<-split(pheno,pheno$GenBank.Name)

Next, lapply to make a list for the BrainVolume phenotype: 接下来, lapply以列出BrainVolume表型:

BrainVolume<-lapply(grouped,"[[","BrainVolume")

And finally, use the pic.ortho function which implements Felsenstein's method: 最后,使用实现Felsenstein方法的pic.ortho函数:

pic.SA<-pic.ortho(SA,tree,intra=TRUE)

The resulting contrasts can be used as with the original pic command. 所得的对比度可以与原始pic命令一起使用。

Reference 参考

Felsenstein J (2008) "Comparative methods with sampling error and within-species variation: Contrasts revisited and revised" American Naturalist 171: 713--725 Felsenstein J(2008)“具有抽样误差和物种内变异的比较方法:对比和修订过的对比”,美国自然主义者171:713--725

暂无
暂无

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

相关问题 如何将饼图添加到 ggplot 系统发育树的顶端? - How can I add pie charts to the tip of a ggplot phylogenetic tree? 如何相对于系统发育树上的树尖调整尖端标签的 position? - How can I adjust the position of tip labels relative to tree tips on a phylogenetic tree? 系统发育树梢颜色 - Phylogenetic tree tip color 在 R 中,当使用 tip.color() 为 phylog.netic 树着色时,如何选择 colors 并添加图例? - In R when coloring a phylogenetic tree by a trait using tip.color(), how do you choose colors and add the legend? 在 R 中,如何为系统发育树中的标签着色? (使用来自猿的 BioNj) - in R how can I color the labels from my phylogenetic tree? (using BioNj from ape) 为性状数据框的每一列计算 phylog.netic 信号的循环 - Loop that calculates phylogenetic signal for each column of a trait data frame 如何制作同时包含连续变量和分类变量的 phylog.netic 树 - How can I make a phylogenetic tree with both continuous and categorical variables 如何根据外部CSV文件中的因素为系统树上的尖端标签着色? - How to color the tip labels on a phylogenetic tree based on factors in external CSV file? 如何使用 R 中的 ggtree 链接倒圆形系统发育树中的几个尖端节点 - How to link a couple of tip nodes in an inverted circular phylogenetic tree using ggtree in R 如何结合系统进化树和热图? - How to combine phylogenetic tree and heatmap?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM