Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions chemlite/Pathway.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@ def set_target_id(self, target_id: str) -> None:
"""
self.__target_id = target_id

def get_target_rxn_id(self) -> str:
"""Get the ID of the reaction that produces
the target compound of the pathway."""
for rxn in self.get_list_of_reactions():
if self.get_target_id() in rxn.get_products_ids():
return rxn.get_id()

def rename_compound(self, id: str, new_id: str) -> None:
"""Rename a compound within the pathway. Actually, the
compound is renamed over all reactions
Expand Down
Loading