Skip to content

Commit

Permalink
Updated the notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbrenas committed Jun 20, 2024
1 parent b0822d1 commit 1efc4bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions malariagen_data/anoph/fst.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,13 +501,12 @@ def plot_pairwise_average_fst(
col = fst_df.iloc[index_key]["cohort2"]
fst = fst_df.iloc[index_key]["fst"]
fig_df[index][col] = fst
if annotation:
if annotation == "standard error":
se = fst_df.iloc[index_key]["se"]
fig_df[col][index] = se
elif annotation == "Z score":
zs = fst_df.iloc[index_key]["fst"] / fst_df.iloc[index_key]["se"]
fig_df[col][index] = zs
if annotation == "standard error":
se = fst_df.iloc[index_key]["se"]
fig_df[col][index] = se
elif annotation == "Z score":
zs = fst_df.iloc[index_key]["fst"] / fst_df.iloc[index_key]["se"]
fig_df[col][index] = zs
else:
fig_df.loc[index, col] = fst

Expand Down
4 changes: 2 additions & 2 deletions notebooks/plot_pairwise_average_fst.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"metadata": {},
"outputs": [],
"source": [
"ag3.plot_pairwise_average_fst(pairwise_fst_df, annotate_se=True)"
"ag3.plot_pairwise_average_fst(pairwise_fst_df, annotation=\"standard error\")"
]
},
{
Expand All @@ -104,7 +104,7 @@
"metadata": {},
"outputs": [],
"source": [
"ag3.plot_pairwise_average_fst(pairwise_fst_df, annotate_se=False)"
"ag3.plot_pairwise_average_fst(pairwise_fst_df, annotation=\"Z score\")"
]
},
{
Expand Down

0 comments on commit 1efc4bc

Please sign in to comment.