# HG changeset patch # User francesco_lapi # Date 1761135487 0 # Node ID 352c51a39e233ae5d7cf48bf79708b859ab34903 # Parent 6acd64232dadaed4ff84b6f097708149bd0d17b5 Uploaded diff -r 6acd64232dad -r 352c51a39e23 COBRAxy/ras_generator.py --- 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")