From 938cac4addb01de3e8dabc5cf18ec49478a529f6 Mon Sep 17 00:00:00 2001 From: xin-huang Date: Sun, 16 Jul 2023 23:01:46 +0200 Subject: [PATCH] Fix bugs in recombination maps --- setup.py | 2 +- sstar/cal_threshold.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 19bb334..285da36 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ # This call to setup() does all the work setup( name="sstar", - version="1.1.2", + version="1.1.3", description="A Python package for detecting archaic introgression from population genetic data with S*", long_description=README, long_description_content_type="text/markdown", diff --git a/sstar/cal_threshold.py b/sstar/cal_threshold.py index 7be0d4e..49f695b 100644 --- a/sstar/cal_threshold.py +++ b/sstar/cal_threshold.py @@ -125,7 +125,7 @@ def _predict_res(gam, score_file, recomb_rate, recomb_map, quantile, fit_lr): line = "\t".join(meta_data[s][i]) line += "\t" + str(null_score) - line += "\t" + str(10**data[s]['lr'][i]) + line += "\t" + str(data[s]['lr'][i]) line += "\t" + str(data[s]['q'][i]) line += "\t" + sig @@ -168,10 +168,10 @@ def _read_score_file(score_file, recomb_rate, recomb_map, quantile, fit_lr): if fit_lr: if recomb_map != None: key = chr_name+":"+win_start+"-"+win_end - if key in recomb_map.keys(): local_recomb_rate = np.log10(recomb_map[key]) + if key in recomb_map.keys(): local_recomb_rate = recomb_map[key] else: continue else: - local_recomb_rate = np.log10(recomb_rate) + local_recomb_rate = recomb_rate else: local_recomb_rate = np.nan if sample not in data.keys():