macroevolution / bammtools

BAMMtools is an R package for analysis of BAMM results
10 stars 6 forks source link

Trouble in getEventData #47

Closed BeardLi closed 4 years ago

BeardLi commented 4 years ago

Hi, I ran into a trouble when I use getEventData to input my BAMM outputs: Here is my codes: 图片 And then, the output is:

图片

I don't know what is the "getmrca".

Thank you for your patience.

ptitle commented 4 years ago

Hi, Did you run a trait or a diversification analysis with BAMM? If this was a trait analysis, then you need to specify that in getEventData(), with type = 'trait'. The fact that you are only getting 5 samples from 90% of the posterior also makes me wonder if the BAMM run was not set up properly. You should be getting hundreds or thousands of posterior samples.

BeardLi commented 4 years ago

Hi, It's a diversification analysis. I was running a test, so there were only. 5 samples. I have add it to 500 samples, but same error happen again. I wonder how this "Error in getmrca" hanppens?

ptitle commented 4 years ago

I think I would need to see the files myself to figure out what is going on. Can you send me the tree and event data file to pascal.title@stonybrook.edu? Then I'll see if I get the same error as you.

blueraleigh commented 4 years ago

Please ensure the following returns FALSE:

setwd("/data3/bamm")
tree <- read.tree("p55.tre")
x <- read.csv("event_data", header=TRUE, stringsAsFactors=FALSE)
anyNA(match(x$leftchild, tree$tip.label))

If not, this indicates a mismatch in tip labels present in the tree file and eventdata file passed to getEventData, in which case a different tree may have been used to generate the eventdata file.

BeardLi commented 4 years ago

I have sent the mail thanks a lot.

BeardLi commented 4 years ago

It returns TRUE, I'll try to fix my treefile. Thanks a lot.

ptitle commented 4 years ago

I took a look at your files, and you have an issue with quotes. The tree you provided to BAMM must have had tip names wrapped in single quotes, whereas the tree file you sent me does not.

BeardLi commented 4 years ago

Hi, I deleted all quotes in my treefile, and it worked! Thanks for your help!!!