Skip to content

Commit

Permalink
feat: Refactor find_maps function in sc_mapping.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dummyindex committed Jul 22, 2024
1 parent 471df47 commit 923127c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion livecellx/core/sc_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,21 @@ def find_maps(
scs_from: List[SingleCellStatic],
scs_to: List[SingleCellStatic],
metric_threshold=0.3,
metric_key="iomin",
metric_key=None,
min_map_num=None,
metric="iomin",
):
if metric == "iou":
if metric_key is None:
metric_key = "iou"
compute_scs_iou(scs_from, scs_to, metric_key)
elif metric == "iomin":
if metric_key is None:
metric_key = "iomin"
compute_scs_iomin(scs_from, scs_to, metric_key)
else:
raise ValueError(f"Unknown metric: {metric}")

scs_map = {}
for sc1 in scs_from:
scs_map[sc1] = []
Expand Down

0 comments on commit 923127c

Please sign in to comment.