jianyangqt / gcta

GCTA software
GNU General Public License v3.0
87 stars 26 forks source link

Error: XtWX is not invertible. #94

Closed zzzzzzzy7 closed 1 month ago

zzzzzzzy7 commented 2 months ago

Options:

--bfile all.snp --grm-sparse sp_grm --joint-covar --fastGWA-mlm-binary --pheno bodycolor_phno.txt --qcovar pca.txt --covar bodycolor_cov.txt --thread-num 10 --autosome-num 50 --autosome --out bodycolor_assoc

The program will be running with up to 10 threads. Reading PLINK FAM file from [all.snp.fam]... 80 individuals to be included from FAM file. Reading phenotype data from [bodycolor_phno.txt]... 80 overlapping individuals with non-missing data to be included from the phenotype file. 80 individuals to be included. 0 males, 0 females, 80 unknown. Reading PLINK BIM file from [all.snp.bim]... 28308858 SNPs to be included from BIM file(s). Reading quantitative covariates from [pca.txt]. 3 covariates of 80 samples to be included. Reading discrete covariates from [bodycolor_cov.txt]. 1 covariates of 80 samples to be included. 3 qcovar, 1 covar and 0 rcovar to be included. 80 common individuals among the covariate files to be included. 80 overlapping individuals with non-missing data to be included from the covariate file(s). Reading the sparse GRM file from [sp_grm]... After matching all the files, 80 individuals to be included in the analysis. Fitting covariates jointly in the association analysis. Performing GLM to get the starting values of beta for the covariates... Error: XtWX is not invertible. An error occurs, please check the options or data

Hi, I recently ran into this problem when using GCTA for glmm model analysis of GWAS, I checked my phenotype file and I can confirm that it is set to 0 and 1, is it my covariates file that is faulty? -- In the qcovar command, pca is displayed. The first two columns are ids, and 3-5 columns are pca values. The first two columns of the file under covar are listed as id, and the third column is listed as gender.Thank you for your help.

longmanz commented 2 months ago

Hi, This XtWX error usually happens when the pheno, covar or qcovar files contain linearly dependent columns (e.g., gender and the phenotypes are perfectly correlated). You can load the pheno, covar, and qcovar in to R and perform a quick linear regression/logistic regression to check if this is the case. However, I notice that you only have 80 observations in your GWAS analysis. In such case fastGWA is not suitable for your task since the sample size is just too small (we usually recommend data with >= 5,000 individuals and moderate degree of relatedness).

zzzzzzzy7 commented 2 months ago

Hi, Thank you for your answers, I will check in R to see if they are linearly correlated. If I want to do the GWAS of binary traits, what is the minimum number of samples appropriate?Thank again for your help.

longmanz commented 2 months ago

Hi, For binary traits it is also recommended to have >= 5000 individuals with moderate degree of relatedness.

zzzzzzzy7 commented 1 month ago

Hi, For binary traits it is also recommended to have >= 5000 individuals with moderate degree of relatedness.

Thank you so much!