Mercurial > repos > bimib > cobraxy
changeset 530:352c51a39e23 draft
Uploaded
author | francesco_lapi |
---|---|
date | Wed, 22 Oct 2025 12:18:07 +0000 |
parents | 6acd64232dad |
children | 1fc5c1edb0ef |
files | COBRAxy/ras_generator.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/COBRAxy/ras_generator.py Wed Oct 22 12:05:30 2025 +0000 +++ b/COBRAxy/ras_generator.py Wed Oct 22 12:18:07 2025 +0000 @@ -350,16 +350,16 @@ # create the dataframe of ras (rules x samples) ras_df = pd.DataFrame(data=ras_df, index=range(len(self.dict_rule_reactions)), columns=self.cell_ids) - ras_df['REACTIONS'] = [reaction_ids for rule, reaction_ids in self.dict_rule_reactions.items()] + ras_df['Reactions'] = [reaction_ids for rule, reaction_ids in self.dict_rule_reactions.items()] reactions_common = pd.DataFrame() - reactions_common["REACTIONS"] = ras_df['REACTIONS'] - reactions_common["proof2"] = ras_df['REACTIONS'] - reactions_common = reactions_common.explode('REACTIONS') - reactions_common = reactions_common.set_index("REACTIONS") + reactions_common["Reactions"] = ras_df['Reactions'] + reactions_common["proof2"] = ras_df['Reactions'] + reactions_common = reactions_common.explode('Reactions') + reactions_common = reactions_common.set_index("Reactions") - ras_df = ras_df.explode("REACTIONS") - ras_df = ras_df.set_index("REACTIONS") + ras_df = ras_df.explode("Reactions") + ras_df = ras_df.set_index("Reactions") if drop_na_rows: ras_df = ras_df.dropna(how="all")