Comments (3)
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.
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.
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)
- ERROR:unused arguments (two.stage = TRUE, norm.option = "all", rescale = "residSD") HOT 2
- Error when running the pcrelate function HOT 2
- High Memory Consumption with Large Dataset in PC-Relate HOT 1
- Conditional analysis HOT 1
- HOW to FIX - PCAir excludes all my SNPs because there is no chromosome information HOT 1
- Error using assocTestAggregate HOT 1
- Issue with PCAir - Segmentation fault (core dumped) HOT 1
- Issue: Running PCAir on 140K individuals HOT 1
- pcrelate: error with rbindlist() HOT 1
- Cholesky factorization failed HOT 1
- Filter extreme p-values using `.Machine$double.xmin` HOT 1
- Error in assocTestSingle() results when covariate is confounded with SNP genotype. HOT 6
- pcrelateToMatrix slow on 50k samples HOT 10
- fitNullModel doesn't converge when provided a list of matrices with more than 1 matrix HOT 3
- Error in seqVCF2GDS(vcf.files, gds.file, verbose = FALSE) HOT 1
- correctK2() drops samples under specific conditions HOT 1
- Estimate PVE HOT 1
- add check in varCompCI that family is gaussian
- pcrelate REDUCE error while calculating individual AF betas HOT 8
- analysis pipeline for chromosome X HOT 1
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 genesis.