We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 511f0b1 commit 9365d4dCopy full SHA for 9365d4d
1 file changed
malariagen_data/anoph/fst.py
@@ -539,8 +539,11 @@ def plot_pairwise_average_fst(
539
if annotation == "standard error":
540
fig_df.loc[cohort1, cohort2] = se
541
elif annotation == "Z score":
542
- zs = fst / se
543
- fig_df.loc[cohort1, cohort2] = zs
+ try:
+ zs = fst / se
544
+ fig_df.loc[cohort1, cohort2] = zs
545
+ except ZeroDivisionError:
546
+ fig_df.loc[cohort1, cohort2] = np.NaN
547
else:
548
fig_df.loc[cohort1, cohort2] = fst
549
0 commit comments