hmorlon / PANDA

Phylogenetic ANalyses of DiversificAtion
24 stars 15 forks source link

Error in edges with fit_bd #51

Closed zuccs-eucs-LEM closed 4 months ago

zuccs-eucs-LEM commented 4 months ago

Hi Ms Morlon, Currently doing an honours project attempting to link geomorphological change of the Great Dividing Range to diversification of Eucalypts over about 60 Ma.

I have my lineage through time plots and associated phylogeny, and I'm trying to use the RPANDAS packages and follow the steps provided in your 2016 paper on RPANDAS. I'm not well versed in R, and my background is in geology, so this is somewhat difficult for me.

I plotted the spectral density, and corresponding eigenvalues (similar to Fig. 1 in your 2016 paper) with relative ease, and I skipped the JSD tree function (which are the heat maps I think) as they aren't applicable to what I'm needing.

I then followed the R steps in the 'Time-Dependent Diversification Models' subsection of your paper. I kept f.lamb, f.mu, lamb_par_init, and mu_par_init values the same as the ones used for Phyllostomidae, but for my data set.

The tot_time step worked well.

I then ran into problems with " res<-fit_bd(pruned_tree,tot_time,f.lamb, f.mu,lamb_par_init, mu_par_init,f=343/731,expo.lamb=TRUE,cst.mu=TRUE) ". It returns the error " Error in Error in edges[1, 1] : subscript out of bounds ".

I'm not entirely sure how to go about addressing this issue? I tried changing expo.lamb, and cst.mu to FALSE, but didn't make a difference.

Any ideas on what I should do to alleviate this issue? I'll attach a text file of my steps (excluding my name in the directory) incase its easier to view it that way. I ultimately want to end up with graphs like you present in Fig 4 and 5 of your 2016 paper.

Any help is much appreciated!

Cheers rpanda_test.txt

hmorlon commented 4 months ago

Hello, it seems to me that there is an issue with the pruned_tree phylogeny. It has 343 tips and 267 internal nodes. A phylogeny with n tips has n-1 internal nodes. Good luck. Hélène

zuccs-eucs-LEM commented 4 months ago

Thank you for getting back to me, much appreciated!