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

inti H2cal function errors for metabolite data with heterogeneous concentration values #14

Open
TizianaS92 opened this issue Feb 7, 2024 · 1 comment

Comments

@TizianaS92
Copy link

TizianaS92 commented Feb 7, 2024

Hello, I'm running the H2cal function in the context of phenotype treatment for a GWAS analysis as follows:

  cat_h2cal <- H2cal(data = InputDataFrame
                     , trait = "C_001"
                     , gen.name = "ID"
                     , rep.n = 2
                     , fixed.model = "(1|Habitus) + ID"
                     , random.model = "(1|Habitus) + (1|ID)"
                     , emmeans = FALSE
                     , plot_diag = TRUE
                     , outliers.rm = TRUE )

The traits of interest are metabolites, varying greatly in concentration. The function works correctly, generates plots and individuates outliers with some traits, but not with others. In particular, I get this kind of errors for the traits the function can't process:

Errore in lme4::lFormula(formula = C_001 ~ (1 | Habitus) + (1 | ID), :
0 (non-NA) cases
In aggiunta: Messaggi di avvertimento:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 26.0806 (tol = 0.002, component 1)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model is nearly unidentifiable: very large eigenvalue

  • Rescale variables?

I've noticed that if I change the random.model formula term 1|ID with ID, plots are generated. But I'd like to always apply the same model to all my metabolites. If I look at the concentrations of the traits H2Cal is unable to process, I've noticed that troublesome ones have very low concentrations and often many values (with one single exception, >80%), are 0. However, some metabolites with a pretty high 0 frequency (50-60%) are processed correctly.

Also, some of my samples have one replicate, others two.

Can you help me here? How can I handle my dataset in this case? Maybe with a different formula for the random model?
I've found some tips online, about re-scaling variables (for a similar function, called lme4), but I was wondering what the exact cause of my problems could be.

I'm attaching a part of my dataset

SampleToAttach_H2Cal.txt

Here, the troublesome metabolites are C_001, C_002, C_003, C_004, C_009 and C_013.

Thank you in advance

@Flavjack
Copy link
Owner

Flavjack commented Sep 5, 2024

Dear @TizianaS92, sorry for the late answer. Now I noticed your open issue.
I hope you were able to solve the problem.
If you could share the solution maybe would be useful for other users.
Thanks,

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

2 participants