Skip to content

Commit

Permalink
refactor: remove rxn.x call in summary (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
pstjohn authored and hredestig committed Jun 12, 2017
1 parent 20519a5 commit 92fd667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cobra/flux_analysis/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ def model_summary(model, threshold=1E-8, fva=None, floatfmt='.3g',
lambda x: format_long_string(x.name.id, 15), 1)

# Build a dictionary of metabolite production from the boundary reactions
# collect rxn.x before fva which invalidates previous solver state
# collect rxn.flux before fva which invalidates previous solver state
boundary_reactions = model.exchanges
metabolite_fluxes = {}
for rxn in boundary_reactions:
for met, stoich in iteritems(rxn.metabolites):
metabolite_fluxes[met] = {
'id': format_long_string(met.id, 15),
'flux': stoich * rxn.x}
'flux': stoich * rxn.flux}

# Calculate FVA results if requested
if fva:
Expand Down

0 comments on commit 92fd667

Please sign in to comment.