Skip to content

Commit 7ec5442

Browse files
authored
Merge branch 'master' into GH965-g123-cache-key-fix
2 parents f49ed49 + af991c9 commit 7ec5442

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

malariagen_data/anoph/fst.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,10 @@ def plot_pairwise_average_fst(
539539
if annotation == "standard error":
540540
fig_df.loc[cohort1, cohort2] = se
541541
elif annotation == "Z score":
542-
try:
543-
zs = fst / se
544-
fig_df.loc[cohort1, cohort2] = zs
545-
except ZeroDivisionError:
542+
if se == 0:
546543
fig_df.loc[cohort1, cohort2] = np.nan
544+
else:
545+
fig_df.loc[cohort1, cohort2] = fst / se
547546
else:
548547
fig_df.loc[cohort1, cohort2] = fst
549548

0 commit comments

Comments
 (0)