UW-GAC / GENESIS

GENetic EStimation and Inference in Structured samples (GENESIS): Statistical methods for analyzing genetic data from samples with population structure and/or relatedness
https://bioconductor.org/packages/GENESIS
34 stars 13 forks source link

Cholesky factorization failed #109

Open wangfan860 opened 8 months ago

wangfan860 commented 8 months ago

Hello GENESIS Team,

I've encountered an issue with the fitNullModel function. I successfully ran fitNullModel when fitting a model with only an outcome and a covariate. However, when I attempt to include even a single Principal Component as a covariate, the function fails.

Here is the error:

Error in .local(x, ...) : 
  internal_chm_factor: Cholesky factorization failed
Calls: fitNullModel ... .computeSigmaQuantities -> chol -> chol -> .local -> .Call
In addition: Warning message:
In .local(x, ...) :
  Cholmod warning 'not positive definite' at file ../Cholesky/t_cholmod_rowfac.c, line 430
Execution halted

I'm wondering why the PCs are a problem? Are there any known compatibility issues with certain types of data or preprocessing steps that might affect the inclusion of PCs in the model?

Any insights or suggestions you could offer would be greatly appreciated. Thank you so much!!

amstilp commented 8 months ago

Thanks for asking. We've seen errors like that before when covariates are collinear, but I would be surprised if a PC were collinear with your other covariate. Can you give us some more information about how you're trying to run fitNullModel?