bvilhjal / ldpred

MIT License
96 stars 57 forks source link

Raw beta in LDpred weight file does not match beta in input sumstats #82

Closed huilisabrina closed 4 years ago

huilisabrina commented 5 years ago

Hi @bvilhjal ,

I'm using the latest version of LDpred (1.0.8), and after coordinating the data (step 1) using LDpred.py coord, I used LDpred.py gibbs to generate the weights. However, I noticed that the raw_beta column in the output LDpred weights file do not match with the beta column I specified in the input. I'm not sure why this happened. Do you have any insights?

Here is a sample of the formatted input file:

chr     pos     ref     alt     reffrq  rs      pval    effalt
chr1    760912  C       T       0.1134  rs1048488       0.500960089956  -0.005162569999990897
chr1    779322  G       A       0.1041  rs4040617       0.379982872625  -0.00699258999998925
chr1    846808  C       T       0.9162  rs4475691       0.0801272087687 -0.015361799999996787

After passing the coordinated data generated from this input file, the output from LDpred gibbs looks like the following:

chrom    pos    sid    nt1    nt2    raw_beta    ldpred_inf_beta
chrom_1    760912    rs1048488    C    T    2.2810e-03    1.7514e-05
chrom_1    779322    rs4040617    G    A    2.9757e-03    2.3203e-05
chrom_1    846808    rs4475691    T    C    -5.9314e-03    -4.5912e-05

I can send you the log file or explain more details if any of them would help with diagnosing the problem. Look forward to hearing from you!

Thanks, Hui

N-damo commented 5 years ago

same question

wavefancy commented 5 years ago

LDpred re-estimated beta from P value, not the actually beta in the summary file. code as: beta = sp.sign(raw_beta) * stats.norm.ppf(pval_read / 2.0)

Best regards Wallace