Open 1511878618 opened 5 months ago
@1511878618 thanks for the bug report! Would you mind submitting a pull request with the fix you suggested? I'll be happy to merge it into the main branch. Thanks!
@1511878618 thanks for the bug report! Would you mind submitting a pull request with the fix you suggested? I'll be happy to merge it into the main branch. Thanks!
Sure, I've made a lot of changes in the finemapper.py
, some of which may not be particularly good, but I'm submitting them now for you to review. After that, you can decide which ones to merge into the main branch (I will show you the contents in the PR)
A bug for
--geno
is a bgen file with code like below:and the error is :![image](https://github.com/omerwe/polyfun/assets/49584439/4d8a0225-b13f-46af-b045-25551e821af4)
bug source
the bug is caused by
compute_ld_bgen
atdf_snp = df_z.query('SNP == "%s"'%(rsid))
the reason is
rsid
is kind ofBgenVar("", "1:15333718:C:T", "1", 15333718, ['C', 'T'])
;while the truth variable should used here isrsid.rsid
(which is correct used at above code, but not used at below).SOLUTION
Let
rsid = rsid.rsid
or change the variable Name can solve the problem. code like below