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