Comments (11)
@xiekunwhy I was able to reproduce this error using the simpler command:
gemma -bfile mydata -k mydata_kinship.sXX.txt -lmm
Further, I did not get an error using the linear regression instead of the LMM:
gemma -bfile mydata -k mydata_kinship.sXX.txt -lm
The eigenvalue decomposition seemed to work okay (using the -eigen
flag).
So my hunch is that GEMMA is behaving strangely with your phenotype data. To test this, I created a "dummy" phenotype (see the attached file), and re-fit the LMM to the dummy data:
$ gemma -bfile mydata -k mydata_kinship.sXX.txt -lmm -n 4
Reading Files ...
## number of total individuals = 120
## number of analyzed individuals = 120
## number of covariates = 1
## number of phenotypes = 1
## number of total SNPs = 361505
## number of analyzed SNPs = 131480
Start Eigen-Decomposition...
pve estimate =0.0863376
se(pve) =0.148312
This time, it worked, and produced reasonable estimates.
I noticed that all your phenotype values are either 1 or 2.
@xiangzhou, do you have any thoughts as to why the LMM might not work with a binary-valued phenotype that is either 1 or 2, and only 120 samples?
from gemma.
@xiekunwhy One possible explanation is that the rows of the phenotype and genotype files do not match up. I have seen people make this error before.
from gemma.
We should check whether this is a duplicate of #58
from gemma.
With gsl1 in both cases we get results in the assoc file . With gsl2 we get nan in the assoc file. In all cases we get se(pve) =-nan for the first fam file. So I think it is mostly a GSL issue.
from gemma.
@xiekunwhy In case this is still useful for you, the new GEMMA v0.96 binaries should solve your problem. See also Issue #58.
from gemma.
@pjotrp Is it okay if I close this issue? Based on your test it looks like we solved the issue.
from gemma.
OK,thanks you two.
from gemma.
Please reopen if you still see a problem.
from gemma.
Running the test with my latest checks
$gemma -bfile data/issue26/mydata -k data/issue26/mydata_kinship.sXX.txt \
-miss 1 -maf 0.01 -r2 1 -lmm \
-debug -issue 26 \
-o $outn
we now get
testIssue26
Reading Files ...
## number of total individuals = 120
## number of analyzed individuals = 120
## number of covariates = 1
## number of phenotypes = 1
## number of total SNPs = 361505
## number of analyzed SNPs = 361505
**** DEBUG: Validating K in src/debug.cpp at line 23 in void do_validate_K(const gsl_matrix*, bool, const char*, int)
**** WARNING: K has small or negative eigenvalues! in src/gemma.cpp at line 2720
**** DEBUG: Eigenvalues Min 1.72861e-15 Max 11.9122 Ratio 6.89122e+15
**** WARNING: K is ill conditioned! in src/gemma.cpp at line 2720
**** FAIL: K is not positive definite! in src/gemma.cpp at line 2720
So, it looks like the Kinship matrix is a problem.
from gemma.
Based on followup discussion, this may not necessarily be an issue because the centered relatedness matrix is expected to have one zero eigenvalue. More to come...
from gemma.
Yes, the centered relatedness has one zero eigen value. Reporting is fixed now. Please reopen if you encounter issues again.
from gemma.
Related Issues (20)
- Errors when running GEMMA in an SoS step but ok in command line HOT 1
- FAILED error HOT 1
- Issue with GEMMA-Wrapper HOT 1
- Parsing input file '' failed in function AnalyzeBimbamGXE
- Enforce failed for number of analyzed individuals equals 0. in src/param.cpp at line 2073 in ProcessCvtPhen HOT 2
- long haplotype as population structure
- basic usage doesn't work
- Gemma run-time for Estimate Relatedness Matrix calculation
- very low number of analyzed SNPs/var
- The input files includes 26 linkage groups but the output files only includes 22 linkage group
- Categorical covariates
- Pve is .999 HOT 1
- gemma-wrapper:279:in `<main>': Expected GEMMA -a genotype file switch (RuntimeError)
- Got a nan in the p-value results HOT 1
- gsl: newton.c:88: ERROR: function value is not finite 3.08%
- GSL ERROR: function value is not finite in brent.c at line 58 errno 9
- WARNING: Brent did not converge
- Why the diagonal of relatedness matrix is not equal to 1 or a constant value? HOT 1
- The problem of filtering snp parameters
- ERROR: Enforce failed for Problem reading FAM file (phenotypes do not match geno file) in src/gemma_io.cpp at line 600 in ReadFile_fam GEMMA 0.98.3 (2020-11-28) by Xiang Zhou and team (C) 2012-2020
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gemma.