Closed jdblischak closed 3 years ago
Update: I was able run this step using the code from commit 5ce89e09e242fc436fb4215ab02975c40a282110
Thanks John, great catch! (and crazy coincidence...). I fixed the bug, can you please confirm that it's fixed (and reopen if not)?
Confirmed. Thanks for the quick fix!
For future reference, bug fixed in d85bd8b26e2fd5b9172b71cfe46f87cd8b1c0ae3
I am attempting to run step 3. Compute LD-scores for each SNP bin of PolyFun approach 3: Computing prior causal probabilities non-parametrically. My code is essentially the same as the example. The only difference is I have added the flag
--allow-missing
When I run this code with the current HEAD commit df5c0723cb4efb892cb3d0d4df72efa113fbc5a6, I get the following error message:
The issue appears to be that
polyfun.py
passes a pandas DataFrame:https://github.com/omerwe/polyfun/blob/df5c0723cb4efb892cb3d0d4df72efa113fbc5a6/polyfun.py#L637
when
compute_ldscores_chr()
expectsargs
to be the first argument:https://github.com/omerwe/polyfun/blob/df5c0723cb4efb892cb3d0d4df72efa113fbc5a6/compute_ldscores_from_ld.py#L190
I was going to attempt to fix this by passing
args
tocompute_ldscores_chr()
and replacingargs.ukb
withargs.ld_ukb
. However, I noticed thatargs.ukb
is valid when invokingcompute_ldscores_from_ld.py
directly, as documented in Computing LD-scores with pre-computed UK Biobank LD matrices.https://github.com/omerwe/polyfun/blob/df5c0723cb4efb892cb3d0d4df72efa113fbc5a6/compute_ldscores_from_ld.py#L302
Thus it's unclear to me how best to update
compute_ldscores_chr()
to support both of these use cases. In case it could be helpful, I traced the function signature change fromcompute_ldscores_chr(df_annot_chr, ld_dir, no_cache=False)
tocompute_ldscores_chr(args, df_annot_chr)
in commit b6674ce4e800fd9188d9dfe3ce9727a7926547c4, which is the same commit wherecompute_ldscores_ukb.py
was renamed tocompute_ldscores_from_ld.py
.