[R-sig-phylo] Painting clades in a fan tree with bars
Hi everyone I am trying to paint different clades in a tree with a set of values on the tips. I used the function plotTree.wBars to plot and color the bars, and used node labels to define important clades in my study. However, for publication, the reviewers want me to remove the labels and use colors instead to separate clades. However, I still could not figure out how to do this from the plotTree.wBars function (tried the method="plotSimmap", but I get an error Error in plotSimmap(tree, type = "fan", ftype = if (tip.labels) "i" else "off") Attached an example of the tree I submitted so far. Any advice will be greatly appreciated. Oscar Valverde Post Doctorate Associate International Center on Tropical Botany Florida International University ‘Anything else you’re interested in is not going to happen if you can’t breathe the air and drink the water. Don’t sit this one out. Do something. You are by accident of fate alive at an absolutely critical moment in the history of our planet.’ ~Carl Sagan On Fri, Jan 13, 2017 at 11:32 PM, Liam J. Revell wrote: > Hi Katharine. > > You can try to search my blog for examples of the function > add.simmap.legend. That might do what you want. > > All the best, Liam > > Liam J. Revell, Associate Professor of Biology > University of Massachusetts Boston > web: http://faculty.umb.edu/liam.revell/ > email: liam.rev...@umb.edu > blog: http://blog.phytools.org > > On 1/13/2017 10:57 AM, Katharine Walter wrote: > >> Hi, >> >> I am trying to visualize a few different character traits on a tree using >> phytools. My tiplabels are colored by sampling location and I'd like to >> add >> alongside the tree a color bar that represents values of a discrete >> character trait (bacterial serotypes) for each tip sample. There is a nice >> explanation for how to do this for a continuous trait ( >> http://blog.phytools.org/2014/03/putting-barplot-next-to-plo >> tted-tree.html) >> and I'm wondering a way to visualize a discrete trait instead. >> >> Thank you for your help! >> >> [[alternative HTML version deleted]] >> >> ___ >> R-sig-phylo mailing list - R-sig-phylo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> Searchable archive at http://www.mail-archive.com/r- >> sig-ph...@r-project.org/ >> >> > ___ > R-sig-phylo mailing list - R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive at http://www.mail-archive.com/r- > sig-ph...@r-project.org/ > SRLGlobal.pdf Description: Adobe PDF document ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Use of a Phylocom tree for PGLS
Thanks for the advice. My tree includes all seed plants (Gymnosperms + Angiosperms) which goes back long enough to have a solid resolved topology. We identified 50 genera (~160 species out of 600) with more than two congeneric species where the resolution of the clade could be a problem. I like Jacob's idea of resolving randomly the nodes in each unresolved clade and run the analysis to check the robustness of the results. I agree with you that it is unlikely this would provide major changes, particularly because we already detected large phylogenetic signal for most trait and deep divergences among clades. Thanks again for the advice and the references. Cheers OscarV Oscar Valverde Post Doctorate Associate International Center on Tropical Botany Florida International University ‘Anything else you’re interested in is not going to happen if you can’t breathe the air and drink the water. Don’t sit this one out. Do something. You are by accident of fate alive at an absolutely critical moment in the history of our planet.’ ~Carl Sagan On Sun, Sep 18, 2016 at 10:34 AM, Brian O'Meara wrote: > There also are several empirical plant chronograms available for reuse: > check TreeBase, OpenTree, and Dryad. Or you could use something like phlawd > or supersmart (just out in SystBio) to make a phylogeny for your taxa. > Phylomatic is convenient and will have all your taxa placed in some way, > but it'd make your conclusions more robust to just download a tree, make > sure the taxa match yours (look at the taxize package), prune out the taxa > that don't match (treedata() in Geiger), and rerun. If the conclusions are > qualitatively the same, you satisfy the reviewer; if not, you may have > saved yourself from an error. Either way the paper is improved. I haven't > reviewed your paper, but if the central point is using a phylogeny to look > at signal (rather than have this be just one small part of a paper focused > on something else), then doing even more to get a better tree might be > worth it -- the tree is THE thing used in every analysis, may as well get > it right (or at least, less wrong). If the paper is mostly on something > else, though, this might be a good enough solution. > > Two notes for disclosure: I've been on papers that make empirical trees, > so I suppose there's a minor COI there (I might get one more citation). I'm > also part of a project, phylotastic, that is working to make getting trees > easier. We're doing a soft release soon, but there's nothing I'd suggest > you try using yet (we know people are going to form a first impression and > then decide to come back based on that first impression -- we're not quite > ready for our debut yet, though it is all open). My part is to make it > easier to get dates on trees: there's an R package for this (datelife, on > github) and a website, but I'm still debugging -- don't use yet for > something that matters, but it should make all this easier in the future. > But it does give me an incentive to say, "get a better tree", so take that > into consideration. > > Best, > Brian > > > ___ > Brian O'Meara, http://www.brianomeara.info, especially Calendar > <http://brianomeara.info/calendars/omeara/>, CV > <http://brianomeara.info/cv/>, and Feedback > <http://brianomeara.info/teaching/feedback/> > > Associate Professor, Dept. of Ecology & Evolutionary Biology, UT Knoxville > Associate Head, Dept. of Ecology & Evolutionary Biology, UT Knoxville > Associate Director for Postdoctoral Activities, National Institute for > Mathematical & Biological Synthesis <http://www.nimbios.org> (NIMBioS) > Communication Director, Society of Systematic Biologists > > On Sat, Sep 17, 2016 at 11:38 PM, Jacob Berv com> wrote: > >> Personally, I don’t think I’d have a problem with this approach >> (especially given the paper Liam cited) given that you are using a >> phylogeny (a model) to test a hypothesis, which is, after all, all we can >> ever do. You can always do more, so any threshold of phylogenetic tree >> “quality” is going to be somewhat arbitrary anyway. I don’t mean to sound >> defeatist — obviously you should do the best job that you can, and it >> sounds like you have done that given that the goal of your research is not >> to reconstruct a new phylogeny of the clade you’re studying. Perhaps you >> can try to explain this in your rebuttal. >> >> Or alternatively, use Liam’s awesome code (below) to generate all >> possible phylogenetic trees give your polytomies, and run your PGLS on all >> of them to see if its sensitive to topology. You could p
[R-sig-phylo] Use of a Phylocom tree for PGLS
Dear colleages I am working on an phylogenetic signal and PGLS analysis using a database with values for ~600 plant species. To construct my phylogeny I used the backbone Phylomatic supertree (http://phylodiversity.net/phylomatic/) and added branch lengths with the based on a fossil calibration for angiosperms using the bladj function in phylocom, and resolved polytomies with the multi2di function in phylotools. Now that I am trying to publish the paper, some reviewers indicated that such tree is not suitable for statistical analysis because the level of resolution of the tree is too low (to the family level maybe?) and the uncertainty is too high to get any reliable result with respect to PGLS or phylogenetic signal of the traits. Instead, they suggest I should build my own tree based on sequences. Of course this is a major project to undertake and in my opinion far from the scope of my study. In fact, this position defies the whole reason to have websites like phylomatic where researchers can use a reliable resolved phylogenetic tree instead of creating a new one every time. I would just like to know if the position of my reviewers is a valid one, and it the answer is yes, what resource should I use to get a reliable phylogenetic tree without making my own version. Thanks in advance for any help. Oscar Valverde Post Doctorate Associate International Center on Tropical Botany Florida International University ‘Anything else you’re interested in is not going to happen if you can’t breathe the air and drink the water. Don’t sit this one out. Do something. You are by accident of fate alive at an absolutely critical moment in the history of our planet.’ ~Carl Sagan [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Removing phylogenetic signal for gls model
Thanks Dr Revell Maybe I didn't explain myself properly. I know my data is strongly structured by phylogeny. What I am trying to accomplish is to integrate different tissue in the same model. However, I am limited in a pgls model because my number of rows is three times higher than the number of tips in my tree. Then the correlation matrix in the error structure is smaller that the main structure. I though I could correct by phylogeny each tissue independently and create a new matrix with phylogenetic-free signal. My goal is to test if the tissue*clade interaction I found initially is still significant after phylogenetic correction. On Fri, Sep 6, 2013 at 2:57 PM, Liam J. Revell wrote: > Hi Oscar. > > I'm not sure what you're trying to accomplish. By fitting > gls(y~Tree,correlation=Tree) you have the phylogeny in both the mean > structure & the error structure of your fitted model. This does not seem > like a good idea. > > If you just want to measure the degree to which your data are > phylogenetically structured (i.e., the "effect" of phylogeny on your trait > - although this is probably not a good way of describing it because your > phylogeny cannot affect the trait, although history may influence how > variation is structured among your tip species), you should probably just > measure phylogenetic signal using one or multiple methods. For instance, > you could use my function phylosig in the phytools package. > > All the best, Liam > > Liam J. Revell, Assistant Professor of Biology > University of Massachusetts Boston > web: > http://faculty.umb.edu/liam.**revell/<http://faculty.umb.edu/liam.revell/> > email: liam.rev...@umb.edu > blog: http://blog.phytools.org > > > On 9/6/2013 1:22 PM, Oscar Valverde wrote: > >> Hi everyone, >> >> I have been trying to analyze the effect of phylogeny on trait integration >> among plant tissues. Initially I tried a non-phylogenetic approach using >> species nested within clades as error term >> >> model1<-lmer(log(Trait)~**Tissue*Clade*Site+(1|Clade/** >> Species),data=data) >> >> then, I tried to remove the phylogenetic value using the residuals after >> running a model with the samples fixed by clade in a pgls model and making >> a new dataset >> >> Tissueresid1<-residuals(gls(**log(Tissue)~Clade,correlation=** >> corPagel(1,tree),data=**datatissue1)) >> Tissueresid2<-residuals(gls(**log(Tissue)~Clade,correlation=** >> corPagel(1,tree),data=**datatissue2)) >> Tissueresid3<-residuals(gls(**log(Tissue)~Clade,correlation=** >> corPagel(1,tree),data=**datatissue3)) >> >> dataphylo<-cbind(Tissueresid1,**Tissueresid2,Tissueresid3) >> >> then I run a new model and tried to compare the AIC for the same model >> with the corrected matrix >> >> modelphylo1<-lmer(log(Trait)~**Tissue*Clade*Site+(1|Clade/** >> Species),data=dataphylo) >> >> The AIC of both models however are identical and but none of the factors >> are significant anymore!. What I'm doing is wrong? Any suggestions of an >> alternative approach to test the integration of tissues including the >> phylogenetic relatedness among species? >> >> I'll appreciate any comments, best regards >> >> >> >> >> >> __**_ >> R-sig-phylo mailing list - R-sig-phylo@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/r-sig-phylo<https://stat.ethz.ch/mailman/listinfo/r-sig-phylo> >> Searchable archive at http://www.mail-archive.com/r-** >> sig-ph...@r-project.org/<http://www.mail-archive.com/r-sig-phylo@r-project.org/> >> >> -- Oscar Valverde PhD candidate Department of Biological Sciences Kent State University El odio nunca se extingue por el odio; solamente se apaga a través del amor. Tal es una antigua ley eterna Siddaharta Gautama [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
[R-sig-phylo] Removing phylogenetic signal for gls model
Hi everyone, I have been trying to analyze the effect of phylogeny on trait integration among plant tissues. Initially I tried a non-phylogenetic approach using species nested within clades as error term model1<-lmer(log(Trait)~Tissue*Clade*Site+(1|Clade/Species),data=data) then, I tried to remove the phylogenetic value using the residuals after running a model with the samples fixed by clade in a pgls model and making a new dataset Tissueresid1<-residuals(gls(log(Tissue)~Clade,correlation=corPagel(1,tree),data=datatissue1)) Tissueresid2<-residuals(gls(log(Tissue)~Clade,correlation=corPagel(1,tree),data=datatissue2)) Tissueresid3<-residuals(gls(log(Tissue)~Clade,correlation=corPagel(1,tree),data=datatissue3)) dataphylo<-cbind(Tissueresid1,Tissueresid2,Tissueresid3) then I run a new model and tried to compare the AIC for the same model with the corrected matrix modelphylo1<-lmer(log(Trait)~Tissue*Clade*Site+(1|Clade/Species),data=dataphylo) The AIC of both models however are identical and but none of the factors are significant anymore!. What I'm doing is wrong? Any suggestions of an alternative approach to test the integration of tissues including the phylogenetic relatedness among species? I'll appreciate any comments, best regards -- Oscar Valverde PhD candidate Department of Biological Sciences Kent State University El odio nunca se extingue por el odio; solamente se apaga a través del amor. Tal es una antigua ley eterna Siddaharta Gautama [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
[R-sig-phylo] Phylogenetic ANOVA with multiple levels
Hi all I am trying to analyze the integration between organs in root systems of angisoperms. My idea is testing if three different angiosperm groups integrate vascular tissue across root orders in the same way. So far I have been working with linear mixed effect models to test the idea, like in this example, nesting the species within the clades I am studying in a nested model: model<-lmer(log(Stele)~log(RootDiameter)+Root.Order*Clade+Site+(1|Clade/Species),data=dataRoot) I am wondering if it is possible to integrate the phylogeny in a more straight-forward way. I check options in phytools and gieger, but in both cases the phylogenetic anova seem to test only one categorical variable at the time and require same number of tips in the tree and the dataset. In my case, even if I use species means I will have three times the number of tips, since I have three orders of roots to integrate. I'll appreciate any hints about how to solve this. Thanks in advance. -- Oscar Valverde PhD candidate Department of Biological Sciences Kent State University [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
[R-sig-phylo] Error estimating RMA in phytools
;> >> ### Simulated data ### >> >> ##NOTE: this data runs seamlessly >> a=rnorm(100,5,3) >> b=rnorm(100,10,3) >> c=rnorm(100,20,3) >> env=c(a,b,c) >> char=rep(c(1,2,3),c(100,100,100)) >> df=as.data.frame(cbind(char,env)) >> taxa.labels =paste(rep("sp",30),c(1:30),sep="") >> >> trait.data=rbind(cbind(taxa.labels[1:10],1),cbind(taxa.labels[11:20],2),cbind(taxa.labels[21:30],3)) >> df$taxa<- trait.data[,1][match(df$char, df[,2])] >> df$char=as.factor(df$char) >> phy <- rcoal(30, tip.label=taxa.labels) >> >> -- >> National Evolutionary Synthesis Center >> *NESCent <http://www.nescent.org/>* >> 2024 W. Main Street, Suite A200 >> Durham, NC27705 >> r...@nescent.org <mailto:r...@duke.edu> >> 919.668.9107 >> >> [[alternative HTML version deleted]] >> >> ___ >> R-sig-phylo mailing list >> R-sig-phylo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> >> > > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > ___ > R-sig-phylo mailing list > R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- Oscar Valverde PhD candidate Department of Biological Sciences Kent State University “El odio nunca se extingue por el odio; solamente se apaga a través del amor. Tal es una antigua ley eterna” Siddaharta Gautama ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo