omerwe / polyfun

PolyFun (POLYgenic FUNctionally-informed fine-mapping)
MIT License
94 stars 22 forks source link

suspected problem in create_finemapper_jobs.py - regions with a single snp are dropped #207

Closed nettam closed 2 weeks ago

nettam commented 2 weeks ago

In line 51 we have: df_regions_keep = df_regions.apply(lambda r: np.sum((df_sumstats['CHR']==r['CHR']) & (df_sumstats['BP'].between(r['START'], r['END']))) > 1, axis=1)

Shouldn't this be: df_regions_keep = df_regions.apply(lambda r: np.sum((df_sumstats['CHR']==r['CHR']) & (df_sumstats['BP'].between(r['START'], r['END']))) >= 1, axis=1) ?

nettam commented 2 weeks ago

couldn't this single-snps be causal? I see that they will be dropped in finemap.py as well

nettam commented 2 weeks ago

Found the reason