daijiang / phyr

Functions for phylogenetic analyses
https://daijiang.github.io/phyr/
GNU General Public License v3.0
30 stars 10 forks source link

communityPGLMM error #64

Open ebechtold opened 3 years ago

ebechtold commented 3 years ago

Hello!

I'm trying to use pglmm to understand if bacterial community phylogeny is related to the plant host species phylogeny that the bacterial communities were sampled from. However, I'm encountering an error that I can't seem to fix.

The error is: Error in chol.default(re.i[[3]]) : the leading minor of order 2 is not positive definite

The code that I ran is: mod.r <- communityPGLMM(count ~ 1 + (1|OTU) + (1|Grass) + (1|OTU@Grass) + (1|OTU@Grass), data = data1, cov_ranef = list(OTU = bact.phy, Grass = grass.phy))

bact.phy and grass.phy are just the phylogenetic trees I uploaded as newick files. It seems like the issues is coming from the file bact.phy which relates to the bacterial species phylogeny.

Thank you!

daijiang commented 3 years ago

Can you send an exemplary dataset and code to reproduce your problem? Thanks!

ebechtold commented 3 years ago

Hi,

Yes, I have attached the dataset, trees, and code I have run. Thank you for your help and please let me know if there is anything else you need from me.

Best, Emily

On Mar 10, 2021, at 11:12 AM, Daijiang Li @.***> wrote:

Can you send an exemplary dataset and code to reproduce your problem? Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/daijiang/phyr/issues/64#issuecomment-795669407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHHSGAQFFYVSZOK3GRERXCLTC6D7FANCNFSM4Y4BIMVA.

Emily Bechtold PhD Candidate, Nüsslein Lab Department of Microbiology University of Massachusetts Amherst @.*** pronouns: she/her/hers

daijiang commented 3 years ago

I did not see the attachments. You can email them to me at daijianglee@gmail.com

lealorrainsoligon commented 1 year ago

Hello,

Did you found a solution to this problem? I am currently having the exact same problem so I would be very interested if you have an answer

Best

Léa

daijiang commented 1 year ago

Can you provide a reproducible example?

lealorrainsoligon commented 1 year ago

Hi,

Thank you for your quick answer! I resolved the problem today. In fact, one of the branches in my tree had a length of 0.00, which led to this error. I thus manually changed the value to 0.01 and it worked perfectly!

Thank you again

Léa