GithubHelp home page GithubHelp logo

Comments (11)

pcarbo avatar pcarbo commented on August 10, 2024

@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?

mydata.fam.gz

from gemma.

pcarbo avatar pcarbo commented on August 10, 2024

@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.

pjotrp avatar pjotrp commented on August 10, 2024

We should check whether this is a duplicate of #58

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

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.

pcarbo avatar pcarbo commented on August 10, 2024

@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.

pcarbo avatar pcarbo commented on August 10, 2024

@pjotrp Is it okay if I close this issue? Based on your test it looks like we solved the issue.

from gemma.

xiekunwhy avatar xiekunwhy commented on August 10, 2024

OK,thanks you two.

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

Please reopen if you still see a problem.

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

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.

pcarbo avatar pcarbo commented on August 10, 2024

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.

pjotrp avatar pjotrp commented on August 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.