covaruber / sommer

38 stars 25 forks source link

multivariate (multi-trait) for modeling GCA #53

Closed 0404ftr closed 1 year ago

0404ftr commented 1 year ago

I have an issue with analyzing multi-trait BLUP (trait: OER and BN) for modeling GCA from parent A and parent B.

Herewith I attach some additional information:

  1. Excel file: phenotypic data, parent 1 (A) relationship matrix, parent 2 (B) relationship matrix: OP_pheno.xlsx

  2. Script: fm6 <- mmer(cbind(OER, BN) ~ 1, random= ~ vsr(A, Gu=A_P1) + vsr(B, Gu=A_P2), rcov= ~ vsr(units,Gtc=unsm(2)), data=Pheno)

when running the script, I get the following error:

fm6 <- mmer(cbind(OER, BN) ~ 1, random= ~ vsr(A, Gu=A_P1) + vsr(B, Gu=A_P2), rcov= ~ vsr(units,Gtc=unsm(2)), data=Pheno) Version out of date. Please update sommer to the newest version using: install.packages('sommer') in a new session Use the 'dateWarning' argument to disable the warning message.Adding additional levels of Gu in the model matrix of 'A' Adding additional levels of Gu in the model matrix of 'B' iteration LogLik wall cpu(sec) restrained 1 -29.5416 21:56:0 0 0 2 -22.6125 21:56:0 0 2 3 -16.8525 21:56:0 0 1 Error: System is singular (V). Aborting the job. Try a bigger number of tolparinv.

Please enlighten me and give me a solution for this problem.

Thank you very much.

covaruber commented 1 year ago

Well, normally the error of singular system in a multi-trait job means that you're overfitting. Why don't you try specifying one unstructured trait covariance per one random effect at a time instead of immediately assuming that both GCAs plus error are unstructured. Why don't you start with a diagonal trait covariance for all and go one by one? especially the residual :) let me know how it goes.

Cheers, Eduardo

0404ftr commented 1 year ago

Hi, thank you for your suggestion. I've tried your suggestion:

1) Assuming diagonal structure covariance for residual effect, while the GCA effect for "A" and "B" parents are unstructured: fm6 <- mmer(cbind(OER, BN) ~ REP, random= ~ vsr(A, Gu=A_P1, Gtc=unsm(2)) + vsr(B, Gu=A_P2, Gtc=unsm(2)), rcov= ~ vsr(units,Gtc=diag(2)), data=Pheno) This script has a singular error.

2) Assuming diagonal structure for GCA effect of "A" parents, while the rest (GCA of "B" parents and residual) are unstructured: fm10 <- mmer(cbind(OER, BN) ~ REP, random= ~ vsr(A, Gu=A_P1, Gtc=diag(2)) + vsr(B, Gu=A_P2), rcov= ~ vsr(units,Gtc=unsm(2)), data=Pheno) This script is running well

3) Assuming diagonal structure for GCA effect of "B" parents, while the rest (GCA for "A" parents and residual) are unstructured: fm10 <- mmer(cbind(OER, BN) ~ REP, random= ~ vsr(A, Gu=A_P1) + vsr(B, Gu=A_P2, Gtc=diag(2)), rcov= ~ vsr(units,Gtc=unsm(2)), data=Pheno) This script has a singular error.

4) Assuming all random factor (including residual) has diagonal structure: fm10 <- mmer(cbind(OER, BN) ~ REP, random= ~ vsr(A, Gu=A_P1, Gtc=diag(2)) + vsr(B, Gu=A_P2, Gtc=diag(2)), rcov= ~ vsr(units,Gtc=diag(2)), data=Pheno) This script is running well

So, only the second and forth scenario worked. Did I do the right thing? From this case, which scenario can I use to get the GCA effect information of parents A and B through the multi-trait BLUP approach? Thank you...

covaruber commented 1 year ago

I would advise you the following model:

fm6 <- mmer(cbind(OER, BN) ~ REP, random= ~ vsr(overlay(A,B), Gu=A_both, Gtc=unsm(2)) , rcov= ~ vsr(units,Gtc=diag(2)), data=Pheno)

This would be the right model. Then you can extract the variance-covariance components and the multivariate BLUPSs. Give it a try and let me know how it goes.

Cheers,

0404ftr commented 1 year ago

Thank you for your advise..

From the suggested script information, I tried to combine the pedigree information of parents A and B (which were originally separate), so that matrix A can be included in "A_both". The following pedigree information is attached: Pedigree of Oil Palm_sample.xlsx

I have tried the model, but still get the following error:

fm6 <- mmer(cbind(OER, BN) ~ REP,

  • random= ~ vsr(overlay(A,B), Gu=A_both, Gtc=unsm(2)) ,
  • rcov= ~ vsr(units,Gtc=diag(2)),
  • data=Pheno) **Adding additional levels of Gu in the model matrix of 'A:B'

warning: inv_sympd(): given matrix is not symmetric

warning: inv_sympd(): given matrix is not symmetric

warning: inv_sympd(): given matrix is not symmetric

warning: inv_sympd(): given matrix is not symmetric Error: System is singular (V). Aborting the job. Try a bigger number of tolparinv.**

Am I doing this right? Please enlighten me.. Thank you very much..

covaruber commented 1 year ago

I am sorry but the message is clear, your A matrix is not symmetric, please fix.

Eduardo