Giter Site home page Giter Site logo

Comments (3)

mconomos avatar mconomos commented on July 17, 2024

Could you please provide some additional detail on what you are doing? pcair generates ancestry PCs, not a GRM or kinship matrix (KM), so it's not clear to me what matrix you are using in fitNullModel.

It's possible (though uncommon) that a GRM/KM can have issues that lead to a non-positive definite matrix that needs to be inverted in the REML procedure. The presence of negative values in the GRM/KM is not necessarily problematic though -- in fact, a standard GRM will certainly have negative values.

from genesis.

Reavyr avatar Reavyr commented on July 17, 2024

To build the GRM I am using the results from pcrelate transformed to matrix using pcrelateToMatrix(), which I guess in part uses the PCs generated by pc-air to build. I am not sure exactly which function might be generating the negative values. So I could just invert the GRM results from pcrelateToMatrix and use that for fitNullModel?

from genesis.

mconomos avatar mconomos commented on July 17, 2024

Yes, pcrelate uses the PCs from pcair to adjust for (or "remove") the correlation due to ancestry (as captured by the PCs). Using the pcrelateToMatrix function to format the results from pcrelate as a matrix is the correct thing to do.

The fact that you have negative values in the pcrelate kinship matrix (or a GRM) is not a problem; that is perfectly fine and expected. A positive definite matrix can have negative values.

One of the more common issues I've seen that can lead to a non-positive definite matrix is when your sample set includes duplicates or MZ twins. You could check for those -- if you have any, try removing one sample from the pair and running again.

from genesis.

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.