-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcandidate_panel.py
More file actions
40 lines (29 loc) · 1.12 KB
/
Copy pathcandidate_panel.py
File metadata and controls
40 lines (29 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""Screen the candidate panel and print the ranked go/no-go table.
python examples/candidate_panel.py
Also regenerates figures/candidate_panel.png.
"""
import os
import pandas as pd
from bsdose import screen_panel
from bsdose.figures import fig_candidate_panel
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
CSV = os.path.join(ROOT, "data", "candidates.csv")
def main():
df = screen_panel(CSV)
show = df[[
"name", "peak_dose", "peak_trimer", "shoulder_lo",
"mabel_floor", "occupancy_ceiling", "dosable",
"margin_log10", "optimum_reachable", "verdict",
]].copy()
for c in ["peak_dose", "peak_trimer", "shoulder_lo", "mabel_floor",
"occupancy_ceiling", "margin_log10"]:
show[c] = show[c].round(3)
pd.set_option("display.width", 240)
pd.set_option("display.max_columns", 30)
print("\nFIH dosability screen — ranked best-margin first\n")
print(show.to_string(index=False))
out = os.path.join(ROOT, "figures", "candidate_panel.png")
fig_candidate_panel(out, csv=CSV)
print(f"\nwrote {out}")
if __name__ == "__main__":
main()