Christina Theodoris
commited on
Commit
•
78517d8
1
Parent(s):
9e8dbe5
Re-update stats to handle case of empty alt_states
Browse files
geneformer/in_silico_perturber_stats.py
CHANGED
@@ -129,8 +129,8 @@ def isp_aggregate_grouped_perturb(cos_sims_df, dict_list):
|
|
129 |
# stats comparing cos sim shifts towards goal state of test perturbations vs random perturbations
|
130 |
def isp_stats_to_goal_state(cos_sims_df, dict_list, cell_states_to_model, genes_perturbed):
|
131 |
cell_state_key = cell_states_to_model["start_state"]
|
132 |
-
if ("alt_states" not in cell_states_to_model.keys())
|
133 |
-
or (len(cell_states_to_model["alt_states"]) == 0)
|
134 |
or (cell_states_to_model["alt_states"] == [None]):
|
135 |
alt_end_state_exists = False
|
136 |
elif (len(cell_states_to_model["alt_states"]) > 0) and (cell_states_to_model["alt_states"] != [None]):
|
|
|
129 |
# stats comparing cos sim shifts towards goal state of test perturbations vs random perturbations
|
130 |
def isp_stats_to_goal_state(cos_sims_df, dict_list, cell_states_to_model, genes_perturbed):
|
131 |
cell_state_key = cell_states_to_model["start_state"]
|
132 |
+
if ("alt_states" not in cell_states_to_model.keys()) \
|
133 |
+
or (len(cell_states_to_model["alt_states"]) == 0) \
|
134 |
or (cell_states_to_model["alt_states"] == [None]):
|
135 |
alt_end_state_exists = False
|
136 |
elif (len(cell_states_to_model["alt_states"]) > 0) and (cell_states_to_model["alt_states"] != [None]):
|