Re: [R-sig-phylo] ACE - ML

2011-05-17 Thread David Bapst
Alanna- It's because when multi2di() resolves the polytomies, it puts in zero-length edges. This causes the phylogenetic variance-covariance matrix calculated from your tree to be singular. One solution would be to add a small arbitrary constant to your zero-length edges, although I would caution

Re: [R-sig-phylo] fitContinuous in geiger

2011-05-24 Thread David Bapst
a") at URL: >>http://anolis.oeb.harvard.edu/~liam/R-phylogenetics/ >><http://anolis.oeb.harvard.edu/%7Eliam/R-phylogenetics/> which >> >>does not have this issue. >> >>Good luck. >> >>- Liam >> >

Re: [R-sig-phylo] cut a tree in a given time interval

2011-07-12 Thread David Bapst
a given time interval bin? > > Thanks in advance for any suggestion > best > paolo > > ___ > R-sig-phylo mailing list > R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > -- David Bapst Dept of Geophysical Sciences University

[R-sig-phylo] Session on Phylogenetic Paleobiology at GSA 2011 (Abstracts Due in a Week!)

2011-07-18 Thread David Bapst
ngs/2011/) Please let me or Emily know if you have any questions. -Dave Bapst, UChicago -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ [[alternative HTML version deleted]]

[R-sig-phylo] Converting a List of Trees into a multiPhylo Object

2011-07-18 Thread David Bapst
ength(y)){z[[i]]<-y[[i]]} ...but that's kind of inelegant. I feel like there must be a simpler solution.Is there any simple way to convert a list of trees into a multiPhylo object? -Dave -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 ht

Re: [R-sig-phylo] Generating all possible phylogenies...

2011-07-21 Thread David Bapst
can generate all of them. > > Thanks, > > Liutauras > ___ > R-sig-phylo mailing list > R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > -- David Bapst Dept of Geophysical Sciences University of

[R-sig-phylo] Session on Phylogenetic Paleobiology at GSA 2011 (Abstracts Due TODAY!)

2011-07-26 Thread David Bapst
Hello all, Just wanted to send a final reminder that abstracts for our session at GSA 2011 is due today, June 26th. See my previous email below for more details. Thanks, -Dave Bapst and Emily King, UChicago On Mon, Jul 18, 2011 at 11:39 AM, David Bapst wrote: > Hello all, > I just wan

Re: [R-sig-phylo] Dating trees using date.phylo - ape problem?

2011-07-29 Thread David Bapst
t; in > >>> >> > tree and ages list are the same. I still keep getting: > >>> >> > > >>> >> > ttree<-date.phylo(archotreeresolved, ages, rlen=1, > method="equal") > >>> >> > Error in ages[tre

Re: [R-sig-phylo] R: Re: R: ancestral state reconstruction for tips

2011-08-05 Thread David Bapst
an Motion process to change more in their vicinity, > which may help some. > > Joe > > Joe Felsenstein      j...@gs.washington.edu >  Dept of Genome Sciences and Dept of Biology, Univ. of Washington, > Box 5065, Seattle Wa 98195-5065 > > >        [[alternative

Re: [R-sig-phylo] Getting ACE information out of R

2011-08-10 Thread David Bapst
on the tree? > > > Any help is greatly appreciated! > > > Morgan Langille > http://morganlangille.com > > ___ > R-sig-phylo mailing list > R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > --

Re: [R-sig-phylo] Simulating binomial trait shifts on a phylogeny

2011-10-13 Thread David Bapst
Geneticos >> Campus Agrario de Vairao, 4485-661 Vairao >> PORTUGAL >> Department of Ecology, Evolution, and Organismal Biology >> Iowa State University, Ames, >> Iowa 50011, USA >> >> tel: +351 91 3086188 >> mail to: antig...@mail.icav.up.pt >&g

[R-sig-phylo] Comparative Methods and Pseudo-Traits

2011-11-10 Thread David Bapst
how to apply that explanation to the habitat degradation example. So, what do people think? How should we test for correlation when non-evolving quasi-traits are involved? I'm very interested to hear people's thoughts on this matter. -Dave Bapst, UChicago -- David Bapst Dept of Geophysical S

Re: [R-sig-phylo] Comparative Methods and Pseudo-Traits

2011-11-14 Thread David Bapst
ld equally apply to extinction selectivity cases. -Dave On 11/10/2011 3:36 PM, David Bapst wrote: > >> Hello all, >> A recent discussion set my mind thinking on a particular issue and, once >> again, I decided to ask for the general opinion of R-Sig-Phylo denizens. >>

Re: [R-sig-phylo] Add names to a list in R, and count matching numbers

2011-12-09 Thread David Bapst
ese species belong to? It may be easier to start by making a new list with 200 elements; a list of lists that records all the families found in each plot. Than you will be able to easily count the number of plots that contain each family. I hope that helps, -Dave, UChicago -- David Bapst Dept o

[R-sig-phylo] Alternative to rapply() for nested lists of phylo objects?

2012-03-14 Thread David Bapst
h arguments in rapply doesn't stop this behavior; indeed, it seems nothing will stop rapply from ignoring the type 'list' of the phylo objects themselves. Does anyone know of an alternative to rapply that considers the class of the nested objects instead? Thanks, -Dave B. -- Da

Re: [R-sig-phylo] Alternative to rapply() for nested lists of phylo objects?

2012-03-14 Thread David Bapst
ove function won't be a good idea in all cases, and isn't much > tested, etc, etc. This also doesn't preserve class attributes, of the > component lists, but that could be done in the same way as names() is. > > Cheers, > Rich > > On 2012-03-14, at 2:39 PM, David Bap

Re: [R-sig-phylo] diversitree with multicore

2012-03-21 Thread David Bapst
scent.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 > -- David Bapst Dept of Geophysic

[R-sig-phylo] Problems with prop.clades and compar.ou

2012-03-24 Thread David Bapst
l seems to generate this or a similar error with compar.ou, so it doesn't seem to be an issue with me using a non-ultrametric tree. Any ideas? Thanks, all! -Dave -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu

Re: [R-sig-phylo] Continuous character simulation

2012-04-25 Thread David Bapst
_ > R-sig-phylo mailing list > R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ http://cran.r-project.org/web/packag

Re: [R-sig-phylo] mccr test for non ultrametric trees

2012-05-30 Thread David Bapst
cript > where needed, and then simulate trees of the same size as the orginal (e.g. > with TreeSim functions) to get the null distribution of gamma values. Is that > feasible? > thanks, > > Pas > > ___ > R-sig-phylo mailing l

[R-sig-phylo] as.phylo.hclust

2012-06-20 Thread David Bapst
there used to be an error (around version 2.5) where the edges of as.phylo.hclust output were multiplied by 2. Maybe the reverse bug has crept in? -Dave -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ http

Re: [R-sig-phylo] as.phylo.hclust

2012-06-22 Thread David Bapst
369 > > Of course the cophenetic distances must be the same: > >> cophenetic(t) >         1        2 > 1 0.00 2.562737 > 2 2.562737 0.00 >> cophenetic(h) >         1 > 2 2.562737 > > > Cheers, > > Emmanuel > --Original Message

Re: [R-sig-phylo] Add species branches to genus level tree

2012-10-02 Thread David Bapst
t; > Any help is much appreciated > > cheers > > Tom > ___ > R-sig-phylo mailing list > R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- David Bapst Dept of Geophysical Sciences University of

Re: [R-sig-phylo] fitContinuous-Early Burst Model

2012-11-04 Thread David Bapst
f Toronto > 25 Wilcocks St. > Toronto, ON > Canada M5S 3B2 > > Royal Ontario Museum > 100 Queen's Park > Toronto, ON > Canada M5S 2C6 > Office: 416-586-5591 > Email: nicolas.campi...@mail.utoronto.ca > > [[alternative HTML version deleted]] > >

Re: [R-sig-phylo] fitContinuous-Early Burst Model

2012-11-04 Thread David Bapst
", bounds=list(alpha=c(0,1))) > Fitting EB model: > $Trait1 > $Trait1$lnl > [1] -264.4297 > > $Trait1$beta > [1] 0.8355526 > > $Trait1$a > [1] 0.001813503 > > $Trait1$aic > [1] 534.8593 > > $Trait1$aicc > [1] 535.1042 > > $Trait1$k >

Re: [R-sig-phylo] fitContinuous-Early Burst Model

2012-11-04 Thread David Bapst
> ___ > > R-sig-phylo mailing list > > R-sig-phylo@r-project.org > > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > > > > -- > NEW EMAIL ADDRESS: > frank.burbr...@csi.cuny.edu > **

Re: [R-sig-phylo] prop.clades() errors

2012-11-09 Thread David Bapst
ore trying prop.clades? -Dave On Thu, Nov 8, 2012 at 2:04 PM, Jeremy Yoder wrote: > All, > > I'm working on some analyses that require comparison of tree structures, > and I've bumped into the problem David Bapst posted about back in March: > http://www.mail-archive.com/r-si

[R-sig-phylo] Fwd: Symposium announcement: Unifying paleobiological and comparative perspectives on character evolution, Lisbon 2013 (ESEB)

2012-12-18 Thread David Bapst
ssigned time slots of 15 minutes and selected based on relevance for the symposium. Sincerely, Lee Hsiang Liow & Thomas F. Hansen -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ http://cran.r-project.org/

[R-sig-phylo] Fwd: Deadline extended: Unifying paleobiological and comparative perspectives on character evolution, Lisbon 2013 (ESEB)

2013-02-28 Thread David Bapst
studies, using character evolution as a focal point. Sincerely, Lee Hsiang Liow & Thomas F. Hansen -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ http://cran.r-project.org/web/packages/pa

Re: [R-sig-phylo] Lineages Through Time Plot with Confidence / HPD Interval

2013-04-16 Thread David Bapst
chable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ -- David Bapst Dept of Geophysical Sciences University of Chicago 5734 S. Ellis Chicago, IL 60637 http://home.uchicago.edu/~dwbapst/ http://cran.r-project.org/web/packages/paleotree/index.html ___

Re: [R-sig-phylo] collapse descendants of a node to a polytomy

2013-06-22 Thread David Bapst
Hi John, I'm not familiar with any such function either. However, a handy trick for doing this sort of thing is changing the branch lengths of descendant nodes to zero and using the ape function di2multi to collapse those edges, creating a polytomy. Now, it isn't clear to me from your email wheth

Re: [R-sig-phylo] Getting started making R packages

2013-07-12 Thread David Bapst
Tristan- I found this to be the most important how-to reference, but I am a windows user. http://robjhyndman.com/hyndsight/building-r-packages-for-windows/ For distributing on CRAN, making help files and examples is the most critical step. package.skeleton() is helpful in setting up the necessa

Re: [R-sig-phylo] Function to collapse n nodes in a tree?

2013-09-12 Thread David Bapst
degradeTree() in paleotree sort of does this: it collapses some proportion of internal edges, but then returns the tree with the zero-length branches collapsed into polytomies, with the original branch length completely removed. However, it doesn't take too much to modify it to do a specific numbe

Re: [R-sig-phylo] Simulation of extinct taxa onto a phylogeny of extant taxa?

2013-10-01 Thread David Bapst
Hi Jurriaan- I've been thinking about this after your email and my sense is that such a simulation would be very difficult. Just dropping onto the tree branching events on the extant tree that only produced one living daughter might not be too difficult under a homogenous birth-death model. Howev

[R-sig-phylo] The Curious Behavior of is.binary.tree

2014-01-15 Thread David Bapst
Hi Emmanuel and the rest of the list, In some code, I use the ape function is.binary.tree to test if a phylogeny is fully dichotomous. However, some recent analyses have made me wonder if this wasn't the right choice. I'm not sure if the following is a bug report me or me not understand the reason

Re: [R-sig-phylo] The Curious Behavior of is.binary.tree

2014-01-16 Thread David Bapst
cendants, as the tree is unrooted) is just an artifact of the way the > object is stored in memory & thus is.binary.tree is behaving correctly. > > All the best, Liam > > Liam J. Revell, Assistant Professor of Biology > University of Massachusetts Boston > web: http://faculty

Re: [R-sig-phylo] The Curious Behavior of is.binary.tree

2014-01-22 Thread David Bapst
descendant have no meaning until the tree is >>> rooted. The fact that an unrooted tree stored as an object of class >>> "phylo" >>> has one node with three 'descendants' (these aren't actually all >>> descendants, as the tree is unro

Re: [R-sig-phylo] utilise more data by making polytomies

2014-02-25 Thread David Bapst
At the risk of inundating you with options, Henry, there is also expandTaxonTree in the package paleotree (on CRAN) which is similar to the above, but also lets you collapse higher taxa you list as paraphyletic, which can be useful if the taxonomic work of your group has never been concerned with m

[R-sig-phylo] Fatal Crash in ancestral.pars in phangorn

2014-04-08 Thread David Bapst
Hi all, I seem to have found a combination of topology and characters that causes ancestral.pars in phangorn to hard crash, at least in Windows7 with R v3.03 and phangorn v1.99-7. This issue seems to have been introduced recently; the code works fine in phangorn v1.99-5 with R v3.02. I have a re

Re: [R-sig-phylo] drop trees from multiphylo list

2014-04-28 Thread David Bapst
Hi John, A fully reproducible example of the error you have encountered would be this: trees.pool<-rmtree(N=10,n=100) trees.pool[[1]]<-NULL Which returns the same error; the reason for this is that 'multiphylo' is an S3 class so ape has a specific function that replaces the generic replacement

Re: [R-sig-phylo] Early burst branch rescale

2014-06-02 Thread David Bapst
Julien- Does mvSHIFT account for the OU rescaling issue on non-ultrametric trees that Graham mentions? If so, how? Cheers, -Dave On Mon, Jun 2, 2014 at 5:26 PM, Julien Clavel wrote: > Hi Jon, > > Take a look at the "mvSHIFT" function in mvMORPH. This is typically what you > are looking for and

[R-sig-phylo] MrBayes Trees are Misread by read.annotated.nexus() in OutbreakTools

2014-10-03 Thread David Bapst
Hello all, Recently, I wanted to display posterior probabilities on a 50% compatibility tree from a MrBayes run, created with the 'sumt' command. I looked around for ways to do this and found this email thread from last year: https://stat.ethz.ch/pipermail/r-sig-phylo/2013-June/002825.html ...wh

Re: [R-sig-phylo] MrBayes Trees are Misread by read.annotated.nexus() in OutbreakTools

2014-10-03 Thread David Bapst
> Graham Slater > Peter Buck Post-Doctoral Fellow > Department of Paleobiology > National Museum of Natural History > The Smithsonian Institution [NHB, MRC 121] > P.O. Box 37012 > > > (202) 633-1316 > slat...@si.edu > www.fourdimensionalbiology.com > >

Re: [R-sig-phylo] Plotting Posterior Probabilities from MrBayes Trees (An Update)

2014-10-08 Thread David Bapst
just plots it in a pdf, which isn't important at all but I included it for the heck of it. The important stuff is the innards of the first for loop, which reads in the 'simple' consensus tree nexus file, reroots it and then rearranges the posterior probabilities to match the same sp

Re: [R-sig-phylo] Plotting Posterior Probabilities from MrBayes Trees (An Update)

2014-10-09 Thread David Bapst
Klaus and Everyone Else- > here is a small function which it is very similar to David's 2nd script, but > it is a bit more compact: > library(phangorn) # requires the newest pangorn version >= 1.99-8 > addConfidences.phylo <- function(to, from){ > conf = attr(addConfidences(as.splits(to), from

Re: [R-sig-phylo] hierarchical model with phylogenetic dependence term

2014-12-22 Thread David Bapst
Cecile, Peter, Joe and all- As far as I understand, Peter's analysis involves paleontological data with non-ultrametric trees, and based on my understanding of Slater (2014), the Freckleton approach using PIC is invalid for that type of dataset, although Fitzjohn's pruning algorithm might still ap

[R-sig-phylo] The Value of Responding on R-sig-phylo, was: phytools - evaluating significance of pgls.Ives

2015-03-02 Thread David Bapst
Off-topic, but I wanted to comment on Anthony's wariness about commenting on R-sig lists... Yes, it can certainly be very difficult to give advice that is tailored specifically to the problem of a particular worker on R-sig lists, particularly as one can't just tell the other person to open their

Re: [R-sig-phylo] (P)GLS (nlme) vs. PGLS (caper)

2015-03-16 Thread David Bapst
William, Yes, the different PCM models make very different statements about what is happening biologically in your data. Additionally, the three Pagel parameters are not always easy to interpret biologically. Carl Boettiger has some particularly lucid thoughts on Pagel's lambda: http://www.carlboe

Re: [R-sig-phylo] ancestor vs. change plots

2015-04-25 Thread David Bapst
Milton, Brian, etc, Just wanted to add some background on Alroy's anc-desc change analyses, and the recognition of these relationships in the fossil record. This may be tangential; it isn't clear to me what sort of dataset that Milton has. So, Brian said... > In Paleo, you can (well, arguably) se

Re: [R-sig-phylo] Constraining node values in an OUCH analysis

2015-06-04 Thread David Bapst
Aaron, While contemplating Nate's question, I wondered, doesn't hansen currently support NA codings for missing variables for tip taxa? Unfortunately the donotrun{} example for hansen() using geiger data isn't currently functioning, so I couldn't test this. -Dave Bapst On Thu, Jun 4, 2015 at 10:

[R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-12 Thread David Bapst
Hello all, As those of you who directly manipulate the guts of phylo objects in your code (or construct new phylo objects whole cloth from un-phylo-like data structures) have probably experienced, it is sometimes easy to create $edge matrices that aren't accepted by ape functions (I often use plot

Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-12 Thread David Bapst
b-ntips] = tmp > } > tree > } > > library(phangorn) > attr(tree1, "order") = NULL > getRoot(tree1) > > tree2 = switch.nodes(tree1, 131, 151) > plot(tree2) # now works for me > > Cheers and have a nice weekend, > Klaus > > > > > > >

Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-15 Thread David Bapst
misc/FormatTreeR_24Oct2012.pdf >> >> Recently, I put a function on github to help code writters: >> >> https://github.com/emmanuelparadis/checkValidPhylo >> >> This could help you to detect problems that would be tough to find >> otherwise. >> >> C

Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-15 Thread David Bapst
Whoops, I meant a 'function in ape?' -Dave On Mon, Jun 15, 2015 at 10:26 AM, David Bapst wrote: > Hi Brian, > > I was already aware of the read.tree(write.tree()) fix, however I've > run into (corner?) cases where a particular sorting of edges or > whatever can le

[R-sig-phylo] collapse.singles() can be confused by node numbering (Was: Bug in reorder.phylo() (related to cleaning phylo objects))

2015-06-17 Thread David Bapst
i David, > > collapse.singles() seems to work correctly if the "phylo" object is > correctly conformed. Some features of this class may seem annoying (and > Klaus and I alredy discussed about this), but these help for other things. > As a reminder the class "phylo"

[R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-17 Thread David Bapst
Hello all, (I'm a troublemaker today.) Sometimes, in ordered discrete data, there are states we know might exist as intermediary between observed states but aren't observed themselves. I suppose this is probably common for meristic data. At least to me, it seems like it should be possible to reco

Re: [R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-17 Thread David Bapst
lly to do the > calculations - so if ace does not permit this presently, it could easily be > modified to allow it. phangorn too must allow this because for many > nucleotide sites we want to reconstruct ancestral states - but we will have > observed only a subset of the four nucleotides at

Re: [R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-17 Thread David Bapst
s. > > All the best, Liam > > Liam J. Revell, Assistant 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 6/17/2015 3:06 PM, David Bapst wrote: >>

[R-sig-phylo] Margin Artifact in plot.phylo with Very Long Tip Labels, despite show.tip.label=FALSE

2015-06-18 Thread David Bapst
Hi all, I was plotting some trees with obscenely long taxon names (long story) and found an odd plotting artifact that leaves white-space when show.tip.labels=FALSE, as if the plot was trying make room for the extraordinarily long tip labels, even though they wouldn't be plotted. I'm using R versi

Re: [R-sig-phylo] doubt

2015-07-05 Thread David Bapst
Just to clarify for future users who stumble on Liam's solution for Lilian, the second block of code attaches the new tips to non-ultrametric trees at the same distance as the current tips at maximum distance from the root. If this is a time-scaled phylogeny and the tree's root depth is equal to i

Re: [R-sig-phylo] PGLS with non-ultrametric tree

2015-07-16 Thread David Bapst
Hi Solomon, Comparatives methods are routinely applied to non-ultrametric trees, contrary to the text you quoted. See the last chapter of that book. The phylogeny-based analyses that do generally require ultrametric trees are those that fit some form of a lineage diversification model, because the

[R-sig-phylo] Bug in ape: dropping tips from a ladderized tree (still) randomly shuffles the node labels

2015-07-17 Thread David Bapst
Hello all, Recently I noticed a complex function of mine that does some tree transformations was randomly scrambling node.label elements. In the course of doing so, I found this old email (below) from Rebecca Best in 2012, which outlined an issue that occurred when a ladderized tree had tips drop

Re: [R-sig-phylo] Bug in ape: dropping tips from a ladderized tree (still) randomly shuffles the node labels

2015-07-25 Thread David Bapst
<- > < (n + 2):(n + phy$Nnode) > --- >> newNb[sort(phy$edge[sndcol, 2])] <- (n + 2):(n + phy$Nnode) >> phy$edge[sndcol, 2] <- newNb[phy$edge[sndcol, 2]] > > Since this function is widely used, this requires more tests to validate > this fix. >

Re: [R-sig-phylo] Bug in ape: dropping tips from a ladderized tree (still) randomly shuffles the node labels

2015-08-17 Thread David Bapst
thing strange, just >> tell me. >> >> I attach the new source file. >> >> Best, >> >> Emmanuel >> >> Le 25/07/2015 18:54, David Bapst a écrit : >>> >>> Hi Emmanuel, >>> >>> Thank you for the fix! And, yes, I r

Re: [R-sig-phylo] Dollo character using ace/make.simmap

2015-09-14 Thread David Bapst
Just thinking out loud here, but maybe one could use a rate matrix that doesn't allow gains of 1, and instead reroot the tree at various points with a fixed root state of 1? The only semi tricky bit would be searching for the optimal position of this 'root', which is where the single gain of 1 occu

Re: [R-sig-phylo] dist.nodes crashing with big trees

2015-10-16 Thread David Bapst
Hi Gustavo, I'm paleotree's author and maintainer. Just to be clear that I understand your problem, I believe you are saying that when you use timeSliceTree, you are getting an error that the internal call to dist.nodes is failing? Is that right? The first thought I have is that maybe the solutio

Re: [R-sig-phylo] dist.nodes crashing with big trees

2015-10-20 Thread David Bapst
gt;> Thanks again for the help so far! >> >> Best, >> >> >> *Gustavo Burin Ferreira, **Msc.* >> Instituto de Biociências >> Universidade de São Paulo >> Tel: (11) 98525-8948 >> >> On Fri, Oct 16, 2015 at 5:06 PM, Nick Matzke wrote: >> >&

Re: [R-sig-phylo] dist.nodes crashing with big trees

2015-10-20 Thread David Bapst
ed changing the highlighted part to something like >>>> double(as.numeric(nm) * as.numeric(nm)), and when I try running it, I >>>> get >>>> the error I wrote on the first e-mail: >>>> >>>> >>>> > *Error in dist.nod

Re: [R-sig-phylo] dist.nodes crashing with big trees

2015-10-20 Thread David Bapst
-Dave On Tue, Oct 20, 2015 at 1:39 PM, David Bapst wrote: > Thanks, Klaus. I was unaware of node.depth.edgelength; I believe I use > dist.nodes to calculate root-to-tip distances in a number of functions > in paleotree, so this could mean improvement potentially to a large > number

Re: [R-sig-phylo] branching time to branch length (eg. mcmctree)

2015-10-28 Thread David Bapst
Hello Tristan, Does the code below work for your purpose? I don't know of a function off the top of my head that does this in a current package on CRAN (and although I might have missed such, I try to keep myself aware of time-scaling functions in R, given my interests). However, its not too diffi

Re: [R-sig-phylo] branching time to branch length (eg. mcmctree)

2015-10-28 Thread David Bapst
Tristan, It's alright. To be honest, I am (and should be) quite embarrassed that I overlooked an ape function... I was a nice warm-up exercise, nonetheless, and I can see how to extend it to handle dates for non-ultrametric fossil trees, which is a case not covered by compute.brtimes, and would ma

Re: [R-sig-phylo] Plotting sampled-ancestor trees in R

2015-12-08 Thread David Bapst
Hi Roger, I'm not aware of any existing solution. Could you send around a small example of the data format of an output sampled ancestor tree from BEAST or MrBayes? Are they just typical Newick/NEXUS format with ancestors indicated tipis with zero-length branches or something more complicated? Re

Re: [R-sig-phylo] Plotting sampled-ancestor trees in R

2015-12-10 Thread David Bapst
se, Postdoctoral Research Associate > Department of Earth Sciences, Oxford University > South Parks Road > Oxford OX1 3AN > United Kingdom > > On 8 December 2015 at 18:56, David Bapst wrote: >> >> Hi Roger, >> >> I'm not aware of any existing soluti

Re: [R-sig-phylo] R-sig-phylo Digest, Vol 95, Issue 6

2015-12-10 Thread David Bapst
line so it is more specific >> than "Re: Contents of R-sig-phylo digest..." >> >> >> Today's Topics: >> >>1. Re: Plotting sampled-ancestor trees in R (Roger Close) >>2. Implementation of Mir et al.'s (2013) tree balance ind

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-12 Thread David Bapst
Dear Lev and all, First, to answer the actual question in your postscriptum, ape's branching.times() is not for non-ultrametric trees, but it does silently accept them as input, unfortunately. The branching.times it returns assume that some tip (the first tip?) is at time=0, which means that often

Re: [R-sig-phylo] getBtimes vs. branching.times

2016-01-14 Thread David Bapst
Lev, This is easy, if the newick strings are structured the same so that the resulting edge matrix and tip labels are identical. Here's a worked example: ``` library(ape) # with edge lengths newick1<-"(Homo:30,(Echinus:18,(Cephalodiscus:12,(Rhabdopleura:8,(Dictyonema:1,(Rhabdinopora:1,Dicellogra

Re: [R-sig-phylo] new testing version of ape

2016-02-22 Thread David Bapst
FYI, in case one wants to install the testing version of ape to R-devel (in my case, also a Windows machine), I found I needed: install.packages("ape",contriburl="http://ape-package.ird.fr/bin/windows/contrib/3.2";) Emmanuel, I've tested the testing version with paleotree and a few other projects

Re: [R-sig-phylo] summary stats for comparative methods p-values

2016-03-10 Thread David Bapst
Darrin, list- I'm sure there's people on this list with better answers, so I'll throw in first with what might be the wrong answer (but feels right to me), and say you more or less need to report all of them: like, show a full histogram of the p-values. At least, as a reviewer, that is what would

[R-sig-phylo] 'T151: New Approaches to Phylogenetic Paleobiology' at GSA Annual Meeting 2016. Sept 25-28 in Denver

2016-04-04 Thread David Bapst
Hello all, We are pleased to announce a topical session that we believe is of special interest to the R-Sig-Phylo list, scheduled for the 2016 annual Geological Society of America meeting held from September 25th-28th in Denver, Colorado, USA. Our oral topical session, “New Approaches to Phylogene

Re: [R-sig-phylo] BiSSE/MacroCAIC on Non-Ultrametric Tree with Polytomies?

2016-04-15 Thread David Bapst
Brian- Is your tree non-ultrametric because it contains extinct taxa from the fossil record, or is it simply an undated tree of extant taxa? To my knowledge, there isn't yet a satisfactory solution to the first (no BISSE for paleo-phylogenies) but if the second then, it seems the best route would

Re: [R-sig-phylo] 'T151: New Approaches to Phylogenetic Paleobiology' at GSA Annual Meeting 2016. Sept 25-28 in Denver

2016-07-07 Thread David Bapst
Hi all, Just a short reminder, that abstract submission for GSA (and thus for our session) closes on July 12th, which is less than a week away. Cheers! -Dave On Mon, Apr 4, 2016 at 10:25 AM, David Bapst wrote: > Hello all, > > We are pleased to announce a topical session that we beli

Re: [R-sig-phylo] extracting from mrbayes

2016-07-20 Thread David Bapst
John, I had to double-check this with someone who knew better first, but they confirmed for me that the answer is that MrBayes doesn't infer a Q matrix. By default, the Q matrix for Mk in MrBayes is always held fixed so the rates of transition are always equal and fully reversible, i.e. a simple J

Re: [R-sig-phylo] ape functions to become generic

2016-10-03 Thread David Bapst
Hi Emmanuel (and list!), These changes are appreciated, and will make dealing with multiPhylo objects much easier. I know I certainly have blocks of code where I need to 'carry' the multiPhylo class tag through every other line; it always been a bit of a chore. However, two questions from the pean

Re: [R-sig-phylo] ape functions to become generic

2016-10-04 Thread David Bapst
Thanks, Emmanuel. That answers my questions. Cheers, -Dave On Tue, Oct 4, 2016 at 4:03 AM, Emmanuel Paradis wrote: > Hi David, > > Le 03/10/2016 à 17:25, David Bapst a écrit : >> >> Hi Emmanuel (and list!), >> >> These changes are appreciated, and will make d

Re: [R-sig-phylo] Supertree with Stratigraphic Constraints

2016-10-05 Thread David Bapst
(cough) Well, I for one never saw your original email, Will. At least from my perspective, it looks like it never made it to the list. Um, well, what are you trying to obtain? A supertree analysis that thinks about the stratigraphic order of taxa? This sounds like your trying to create some strato

Re: [R-sig-phylo] Supertree with Stratigraphic Constraints

2016-10-06 Thread David Bapst
hing usable. > Presumably I should use the strict consensus tree for the MrBayes > constraint and then analyze a sample of the posterior? > Does your createMrBayesConstraints function play nicely with polytomies? > > Thanks, > Will > > On Wed, Oct 5, 2016 at 2:38 PM, David Bap

Re: [R-sig-phylo] fatal error plotting trees

2016-10-28 Thread David Bapst
Manabu- Can you give us a reproducible example? Is it as simple as plotting any tree does it or is it only particular trees? Cheers, -Dave On Fri, Oct 28, 2016 at 7:53 AM, Manabu Sakamoto wrote: > Dear List, > > I'm getting fatal errors when plotting phylo objects, which terminates the > RStudi

Re: [R-sig-phylo] A question about phylogenetic signal significance with 1000 trees

2016-12-08 Thread David Bapst
A deep thought on this topic, from a mind run aground amidst grading papers. While I am a big fan of using multiple trees, we should keep in mind that phylogenetic uncertainty makes signal into a rather snaky concept. By this, I mean that there could have only been one true history (which may or m

Re: [R-sig-phylo] Plotting uncertainty in continuous ASR

2017-02-27 Thread David Bapst
That's really cool, Liam. Would it also be possible for one to do multiple such error bars per node, for plotting ASRs for multiple traits? -Dave On Mon, Feb 27, 2017 at 12:13 PM, Liam J. Revell wrote: > Hi Kevin. > > This is not automatic - but it is indeed fairly easy to do using phytools. > To

Re: [R-sig-phylo] How to test stratification of sampling across tree?

2017-03-14 Thread David Bapst
Ross, An interesting question. I understand it as that you want to test if the trait is overdispersed relative to phylogeny, which still makes me think that measures of 'phylogenetic signal' might be still be useful, even though the typical interpretation is 'signal' as 'heritability'. I would try

Re: [R-sig-phylo] modeling discretely plastic traits

2017-05-24 Thread David Bapst
I think the way to go is to treat it as separate characters: using the zero-length branches assumes that the different seasonal morphs are separate populations that evolved different phenotypes instantaneously... the Markov model is going to consider that very strange, and think transition rates ar

Re: [R-sig-phylo] Transforming a data.frame into a phylogenetic tree

2010-01-26 Thread David Bapst
Hi, It appears you are keeping track of the ancestor by its character matrix. (So this is a speciational model of character evolution, I guess?) I've coded simulations that produce similar data for paleobiological comparison, but I just have a single column for the ancestor ID. (My own functions u

[R-sig-phylo] Best programs for phylogenetic reconstruction from morphological data?

2010-02-17 Thread David Bapst
Hello all, Not entirely an R question, but the reconstructed phylogenies will end up in R eventually and I would really appreciate hearing the opinions of those on this list. I know there are at least a few people on here with experience in morphology-based phylogenies. I deal with morphological d

[R-sig-phylo] Replacing Tips with Polytomies

2010-07-10 Thread David Bapst
Hello all, I have several genus-level trees that I want to convert to species-level trees, with the underlying assumption that species within a genus form a monophyletic polytomy. In other words, on my current tree there is a tip taxon labeled "Dicellograptus" which I want to replace with a polytom

[R-sig-phylo] Adding Lines at Tips

2010-08-03 Thread David Bapst
Hello, Thank you all for the help on my previous question. I'd like to draw some horizontal lines (of varying lengths, in the same units as the branch lengths) at the tips of a phylo plot. Not all the tips are coeval, though. In other words, I have a tree that looks like:

[R-sig-phylo] Errors with ace and Confidence Intervals for Ancestral Traits

2010-08-04 Thread David Bapst
Hello all, I have been using ace() to reconstruct ancestral states for a number of continuous morphological traits. I need confidence intervals for my analysis. However, for some sets of traits, I get the following error: Warning message: In sqrt(diag(solve(out$hessian))) : NaNs produced The only

[R-sig-phylo] Infinite Recursion Error with write, tree() on an stree()

2010-09-15 Thread David Bapst
Hello all, I am having trouble with write.tree() in ape, when used on a tree produced with stree() with type="left", at a certain number of tip taxa. You can reproduce the error with: x<-stree(1000,type="left") write.tree(x,file.choose()) produces the following: Error: evaluation nested too d

Re: [R-sig-phylo] Infinite Recursion Error with write, tree() on an stree()

2010-09-16 Thread David Bapst
for trees with 1700 taxa. > > Cheers, > Klaus > > > On 9/15/10, David Bapst wrote: >> Hello all, >> >> I am having trouble with write.tree() in ape, when used on a tree >> produced with stree() with type="left", at a certain number of tip >

Re: [R-sig-phylo] Name nodes according to distance from root

2010-10-03 Thread David Bapst
Ulrik- Hello! What do you want the names for? The following will give you a ranked vector that corresponds to the internal nodes, as ordered by the phylo object. Uses the dist.nodes function in ape to find the distance to root for internal nodes. This assumes your tree is a phylo object. tree<-

Re: [R-sig-phylo] Error in if (tp[3] != "") obj$node.label <- tp[3] :

2010-10-25 Thread David Bapst
You mention read.tree(), but have you tried read.nexus()? I just tried it now on your file and it was read into R by read.nexus() fine and plotted with plot.phylo() without error. -Dave On Mon, Oct 25, 2010 at 4:13 PM, Joey Pakes wrote: > Hello, > > I have made a tree with RAXML have viewed it i

  1   2   >