Skip to content

Commit

Permalink
Merge pull request #21 from xin-huang/recomb
Browse files Browse the repository at this point in the history
Fix bugs in recombination maps
  • Loading branch information
xin-huang authored Jul 16, 2023
2 parents 9c26d58 + 938cac4 commit b564075
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions sstar/cal_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit b564075

Please sign in to comment.