InSilicoPerturberStats can't handle 2 classes

#296
by MinieRosie - opened

Hello,

I have a model with just 2 classes and I tried to run the following function but get errors related to the third class either not being entered, or the function trying to calculate for a "None" value in the dictionary.

I figured a way around this by adding in the alt_state as a repeat of the goal state and commenting out lines 822:826 in in_silico_perturber_stats.py so it doesn't consider it as an error.

ispstats = InSilicoPerturberStats(mode="goal_state_shift",
                                  genes_perturbed="all",
                                  combos=0,
                                  anchor_gene=None,
                                  cell_states_to_model={'state_key':'disease',
                                              'start_state':'A',
                                              'goal_state':'B',
                                             'alt_states':['B']})

Thank you for your question! You can just leave the 'alt_states' value as an empty list [ ] . However, we pushed a change that will allow the key to be omitted entirely. Please pull the most recent version. Thank you!

ctheodoris changed discussion status to closed

Sign up or log in to comment