Skip to content
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

Genetic correlation > 1 #458

Open
HelenYSLin opened this issue Oct 15, 2024 · 0 comments
Open

Genetic correlation > 1 #458

HelenYSLin opened this issue Oct 15, 2024 · 0 comments

Comments

@HelenYSLin
Copy link

HelenYSLin commented Oct 15, 2024

Hi, thank you developers for this amazing tool. After processing necessary inputs and fixing all the technical issues, I was able to run the LD score regression. However, I got a genetic correlation of 1.0187 between the two traits I analyzed, which doesn't make sense. I suspect there might be sample overlap in my cohorts, as both summary statistics were downloaded from Pan UKB, but this still shouldn't result in a correlation > 1. I’m wondering if something might be wrong in my code. Any insights would be appreciated.

Here's the code I used:

./ldsc.py \
--rg ../ukbb_ptsd.sumstats.gz,../ukbb_adjd.sumstats.gz \
--ref-ld-chr ../eur_w_ld_chr/ \
--w-ld-chr ../eur_w_ld_chr/ \
--out ../ptsd_adjd

Some logs for this:

Beginning analysis at Tue Oct 15 14:38:59 2024
Reading summary statistics from ../ukbb_ptsd.sumstats.gz ...
Read summary statistics for 1130078 SNPs.
Reading reference panel LD Score from ../eur_w_ld_chr/[1-22] ... (ldscore_fromlist)
Read reference panel LD Scores for 1290028 SNPs.
Removing partitioned LD Scores with zero variance.
Reading regression weight LD Score from ../eur_w_ld_chr/[1-22] ... (ldscore_fromlist)
Read regression weight LD Scores for 1290028 SNPs.
After merging with reference panel LD, 1100373 SNPs remain.
After merging with regression SNP LD, 1100373 SNPs remain.
Computing rg for phenotype 2/2
Reading summary statistics from ../ukbb_adjd.sumstats.gz ...
Read summary statistics for 1217311 SNPs.
After merging with summary statistics, 1100373 SNPs remain.
1100373 SNPs with valid alleles.
/Users/ys/Downloads/LDSC/ldsc/ldscore/sumstats.py:532: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
  ref_ld = sumstats.as_matrix(columns=ref_ld_cnames)
/Users/ys/Downloads/LDSC/ldsc/ldscore/irwls.py:161: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  coef = np.linalg.lstsq(x, y)

Heritability of phenotype 1
---------------------------
Total Observed scale h2: 0.0012 (0.0012)
Lambda GC: 1.0075
Mean Chi^2: 1.0029
Intercept: 0.9941 (0.0061)
Ratio < 0 (usually indicates GC correction).

Heritability of phenotype 2/2
-----------------------------
Total Observed scale h2: 0.001 (0.001)
Lambda GC: 1.0075
Mean Chi^2: 1.0072
Intercept: 0.9989 (0.0057)
Ratio < 0 (usually indicates GC correction).

Genetic Covariance
------------------
Total Observed scale gencov: 0.0011 (0.0009)
Mean z1*z2: 0.5466
Intercept: 0.5379 (0.0047)

Genetic Correlation
-------------------
Genetic Correlation: 1.0187 (0.4699)
Z-score: 2.1677
P: 0.0302


Summary of Genetic Correlation Results
                       p1                        p2      rg      se       z       p  h2_obs  h2_obs_se  h2_int  h2_int_se  gcov_int  gcov_int_se
 ../ukbb_ptsd.sumstats.gz  ../ukbb_adjd.sumstats.gz  1.0187  0.4699  2.1677  0.0302   0.001      0.001  0.9989     0.0057    0.5379       0.0047

And here's for conversion to liability scale

./ldsc.py \
--rg ../ukbb_ptsd.sumstats.gz,../ukbb_adjd.sumstats.gz \
--ref-ld-chr ../eur_w_ld_chr/ \
--w-ld-chr ../eur_w_ld_chr/ \
--out ../ptsd_adjd \
--samp-prev 0.0005,0.0015 \
--pop-prev 0.05,0.12

and some logs:

Beginning analysis at Tue Oct 15 15:02:21 2024
Reading summary statistics from ../ukbb_ptsd.sumstats.gz ...
Read summary statistics for 1130078 SNPs.
Reading reference panel LD Score from ../eur_w_ld_chr/[1-22] ... (ldscore_fromlist)
Read reference panel LD Scores for 1290028 SNPs.
Removing partitioned LD Scores with zero variance.
Reading regression weight LD Score from ../eur_w_ld_chr/[1-22] ... (ldscore_fromlist)
Read regression weight LD Scores for 1290028 SNPs.
After merging with reference panel LD, 1100373 SNPs remain.
After merging with regression SNP LD, 1100373 SNPs remain.
Computing rg for phenotype 2/2
Reading summary statistics from ../ukbb_adjd.sumstats.gz ...
Read summary statistics for 1217311 SNPs.
After merging with summary statistics, 1100373 SNPs remain.
1100373 SNPs with valid alleles.
/Users/ys/Downloads/LDSC/ldsc/ldscore/sumstats.py:532: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
  ref_ld = sumstats.as_matrix(columns=ref_ld_cnames)
/Users/ys/Downloads/LDSC/ldsc/ldscore/irwls.py:161: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  coef = np.linalg.lstsq(x, y)

Heritability of phenotype 1
---------------------------
Total Liability scale h2: 0.5133 (0.4971)
Lambda GC: 1.0075
Mean Chi^2: 1.0029
Intercept: 0.9941 (0.0061)
Ratio < 0 (usually indicates GC correction).

Heritability of phenotype 2/2
-----------------------------
Total Liability scale h2: 0.1863 (0.1808)
Lambda GC: 1.0075
Mean Chi^2: 1.0072
Intercept: 0.9989 (0.0057)
Ratio < 0 (usually indicates GC correction).

Genetic Covariance
------------------
Total Liability scale gencov: 0.315 (0.2576)
Mean z1*z2: 0.5466
Intercept: 0.5379 (0.0047)

Genetic Correlation
-------------------
Genetic Correlation: 1.0187 (0.4699)
Z-score: 2.1677
P: 0.0302


Summary of Genetic Correlation Results
                       p1                        p2      rg      se       z       p  h2_liab  h2_liab_se  h2_int  h2_int_se  gcov_int  gcov_int_se
 ../ukbb_ptsd.sumstats.gz  ../ukbb_adjd.sumstats.gz  1.0187  0.4699  2.1677  0.0302   0.1863      0.1808  0.9989     0.0057    0.5379       0.0047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant