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

GCTA-GREML: the X^t * V^-1 * X matrix is not invertible. #7

Open
Truongphikt opened this issue Oct 19, 2024 · 2 comments
Open

GCTA-GREML: the X^t * V^-1 * X matrix is not invertible. #7

Truongphikt opened this issue Oct 19, 2024 · 2 comments

Comments

@Truongphikt
Copy link
Contributor

Truongphikt commented Oct 19, 2024

Hi Cloufield team, it was a struggle for a GWAS newbie like me that finally went to the SNP-Heritability estimation by GCTA-GREML section. Now I have been stuck here for a few days in an error with the Estimation step. I guess that I have some wrong with my inputs (see below).

My command is as follows:

awk '{print $1,$2,$5,$6,$7,$8,$9}' projected.sscore > 5PCs.txt

gcta            --grm 1kg_eas         \
                --pheno 1kgeas_binary.phen         \
                --prevalence 0.5         \
                --qcovar  projected.sscore        \
                --reml         \
                --out 1kg_eas         \
                --thread-num 1

Needed inputs: inputs.zip

And I got an error:

Error

******************************************************************** 
Genome-wide Complex Trait Analysis (GCTA)
* version v1.94.1 Linux* Built at Nov 15 2022 21:14:25, by GCC 8.5
* (C) 2010-present, Yang Lab, Westlake University* Please report bugs to Jian Yang <[email protected]>
********************************************************************
Analysis started at 03:39:30 UTC on Sat Oct 19 2024.
Hostname: f9ed864a67df

Accepted options:
--grm 1kg_eas
--pheno 1kgeas_binary.phen
--prevalence 0.5
--qcovar projected.sscore
--reml
--out 1kg_eas
--thread-num 1

Note: This is a multi-thread program. If your machine has multiple processors, you can specify the number of threads with the—-thread-num option to speed up the computation.

Reading IDs of the GRM from [1kg_eas.grm.id].
504 IDs are read from [1kg_eas.grm.id].Reading the GRM from [1kg_eas.grm.bin].
GRM for 504 individuals are included from [1kg_eas.grm.bin].
Reading phenotypes from [1kgeas_binary.phen].
Non-missing phenotypes of 502 individuals are included from [1kgeas_binary.phen].
Reading quantitative covariate(s) from [projected.sscore].
12 quantitative covariate(s) of 501 individuals are included from [projected.sscore].
Assuming a disease phenotype for a case-control study: 248 cases and 250 controls 
12 quantitative variable(s) included as covariate(s).
498 individuals are in common in these files.

Performing  REML analysis ... (Note: may take hours depending on sample size).
498 observations, 13 fixed effect(s), and 2 variance component(s)(including residual variance).
Calculating prior values of variance components by EM-REML ...
Updated prior values: 5.24546e+19 3.07774e+21
logL: 1.6403e+14Running AI-REML algorithm ...
Iter.     logL    V(G)    V(e)    Error:   the X^t * V^-1 * X matrix is not invertible. Please check the covariate(s) and/or the environmental factor(s).
An error occurs, please check the options or data

Could someone tell me where was I wrong? Thanks.

@Cloufield
Copy link
Owner

Hi,
Sorry for the late reply. I updated this section and replaced the outdated paths. It should work now.
For the error, please see #15 in GCTA FAQ. It usually indicates that the inverse of variance-covariance matrix does not exist or there is something wrong with the GRM.

@Truongphi20
Copy link
Contributor

Truongphi20 commented Nov 2, 2024

@Cloufield Thank you so much. Based on your new updates, I have successfully run this step. My update command:

awk '{print $1,$2,$5,$6,$7,$8,$9}' projected.sscore > 5PCs.txt
gcta         --grm 1kg_eas         \
                --pheno 1kgeas_binary.phen         \
                --prevalence 0.5         \
                --qcovar  5PCs.txt        \
                --reml         \
                --out 1kg_eas

My input files:
inputs.zip

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

3 participants