Skip to content

Commit

Permalink
chore(rpcompletion): clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
breakthewall committed Apr 14, 2022
1 parent 39cbeae commit dd29411
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions rptools/rpcompletion/rpCompletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,35 +150,13 @@ def rp_completion(
rr_reactions=cache.get('rr_reactions'),
compounds_cache=cache.get('cid_strc'),
max_subpaths_filter=max_subpaths_filter,
# compartment_id=compartment_id,
lower_flux_bound=lower_flux_bound,
upper_flux_bound=upper_flux_bound,
logger=logger
)

# # Return flat list of overall topX pathways
# return sum(
# [
# pathways
# for pathways in all_pathways.values()
# ], [])[:max_subpaths_filter]

return all_pathways

# for sub_pathways in all_pathways.values():
# for sub_pathway in sub_pathways:
# print(sub_pathway)

# from chemlite import Pathway
# print(all_pathways)
# for sub_pathways in all_pathways.values():
# for i in range(len(sub_pathways)):
# for j in range(i+1, len(sub_pathways)):
# if sub_pathways[i] == sub_pathways[j]:
# print(f'Equality between {sub_pathways[i].get_id()} and {sub_pathways[j].get_id()}')
# print()
# print(Pathway._to_dict(all_pathways[1][0]))


def __complete_transformations(
transfos: Dict,
Expand Down Expand Up @@ -207,6 +185,9 @@ def __complete_transformations(
Completed stoichiometric chemical transformations
"""

logger.debug(f'transfos: {transfos}')
logger.debug(f'ec_numbers: {ec_numbers}')

full_transfos = {}

# For each transformation
Expand Down Expand Up @@ -770,7 +751,7 @@ def __build_all_pathways(
target_id = target_id[0]
else:
target_id = None
logger.debug(rxn._to_dict())
logger.debug(f'rxn: {rxn._to_dict()}')
pathway.add_reaction(
rxn=rxn,
target_id=target_id
Expand Down

0 comments on commit dd29411

Please sign in to comment.