-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cross-trait LDSC #352
base: master
Are you sure you want to change the base?
Add cross-trait LDSC #352
Conversation
…ative values. add weight functions for h2 and rg
Thanks for this! |
Yes. I used the supplementary material of https://pubmed.ncbi.nlm.nih.gov/26414676/ I also referenced the ldsc python code. Most relevant is lines 538-711 of regressions.py. I realized that I didn't add a check for negative heritability which means that it will produce a messing "NaNs produced" warning in that case. I also didn't add options to specify the heritability intercepts. The procedure is
I also didn't add the standard error of the genetic correlation but it does provide the SE of the directly estimated parameters. |
Thanks for the refs. |
Hi Florian, |
I agree it would be great to have this in the package. However, there is still quite some work to be done to finish implementing this. |
@privefl If you let me know what needs to be done I can see if we will have time to do it in the course of our work. |
I had made a list, but I can't find it.. It would be great to have something similar to what is in {GenomicSEM}, i.e. allow any number of traits. |
All makes sense. It currently produces SEs for the intercept and the genetic covariance but not genetic correlation which requires implementation of the ratio jacknife. I'll add some tests when I get bits of time. I think providing similar functionality to GenomicSEM can be done pretty easily with a wrapper where you can say if you want out the environmental correlation matrix, the genetic correlation matrix, or both. |
Also, it would be great if the If you have any question, feel free to ask me here. Thanks for working on this. |
Hi Florian,
Thanks for making this nice package. I added a function to compute genetic correlation using cross-trait LDSC. Here are the changes I made:
snp_ldsc_rg
for cross-trait LD-score regressionsnp_ldsc
so that it can be called fromsnp_ldsc_rg
. It should be back-compatible -- it can still be called in the same syntax for regular heritability calculation.WEIGHTS_rg
andWEIGHTS_h2
.WEIGHTS_h2
is the same as the originalWEIGHTS
but includes a factor of 2 that is erroneously missing form the paper (the variance ofOf course merge or not as you see fit.
Jean