Closed teresa-sansan closed 3 years ago
@teresa-sansan Looks like our day is going very similarly π
Check out the Issue #53 , which I just opened about 20 minutes ago. For a quick, temporary fix, you can checkout an older version of PolyFun:
cd polyfun
git checkout 5ce89e09e242fc436fb4215ab02975c40a282110
Haha it surely is.ππ Thanks for your suggestion! I'll check this out!
Best, Teresa :)
Thanks @jdblischak. It works smoothly now.βΊοΈβΊοΈβΊοΈ I'll just close this issue because we are basically asking the same question. π
Hi,
As mentioned in the twin issue, I fixed the bug (but please reopen the issue if it's not fixed for you).
Thanks,
Omer
Thanks Omer for your quick fix! It is working now.πππ
Best, Teresa
Hi Omer,
I encounter errors when trying to compute LD score for each SNP bin using the precomputed UKBB data when following the wiki page.
This is the code I ran.
(polyfun) [tlin@pe2cc3-042 polyfun]$ python polyfun.py --compute-ldscores --output-prefix test_output/testrun --ld-ukb --ld-dir test_LD_cache --chr 1
This is the error message I got
I assume the issue is due to the definition of compute_ldscores_chr in compute_ldscores_from_ld.py was applied wrongfully by polyfun.py.
In polyfun.py line 637, the args that compute_ldsocres_chr take are
df_ldscores_chr = compute_ldscores_chr(df_bins_chr, ld_dir)
While in compute_ldscores_from_ld line 190, this function is defined asdef compute_ldscores_chr(args, df_annot_chr):
When I ran the code, the "args" that compute_ldscores_chr took was a pandas DataFrame with 34 columns (CHR, SNP, BP, A1, A2, snpvar_bin(1 to 29)). The non-existing "ukb" column causes the error shown above.
Also, in line 201 (compute_ldscores_from_ld.py):
assert len(df_annot_chr['CHR'].unique()) == 1
With the second argument of compute_ldscores_chr in polyfun.py being a directory, there's no way that it can be treated as a DataFrame in compute_ldscores_from_ld.py.Any feedback will be super helpful!
Thanks, Teresa