Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes on gamma calculation #4

Open
cboettig opened this issue Apr 17, 2013 · 1 comment
Open

crashes on gamma calculation #4

cboettig opened this issue Apr 17, 2013 · 1 comment

Comments

@cboettig
Copy link
Member

(submitted to me via email)

"I have been trying to duplicate the code from your Methods in EE paper in which you calculate gamma for every tree with branchlengths and that is ultrametric.

When I get to tt <- drop_nontrees(sapply(branchlengths, timetree)), the R session crashes. ("R encountered a fatal error. The session was terminated." is the message in RStudio, but same thing happens in a plain R terminal)

This was happening to me using R 2.15.2, so I just now upgraded to 3.0.0 but the same thing happens.

I'm using a Windows XP x64 machine."

@cboettig
Copy link
Member Author

Crash confirmed address not mapped, appears to be a memory overflow.

  • Seems to be a change in ape functions, causing the reorder.phylo in the chronoMPL function to attempt ridiculous memory allocations. Frustrating how fragile much of the ape C code is.
  • NOTE The approach shown is not really a robust way to obtain ultrametric trees.
  • Potential work-around(?)
library(treebase)
data(treebase)
have <- have_branchlength(treebase)
branchlengths <- treebase[have]
timetree <- function(tree)
  try( chronopl(multi2di(tree), lambda=1))
tt <- drop_nontrees(sapply(branchlengths[1:00], timetree)) # crashes on full set still

gammas <- sapply(tt,  gammaStat)

library(ggplot2)
qplot(gammas)+xlab("gamma statistic")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant