Skip to content

Commit

Permalink
Merge pull request #130 from filrot/master
Browse files Browse the repository at this point in the history
Return ensemble to save, and return from carving after saving. Closes…
  • Loading branch information
cdanielmachado authored May 26, 2021
2 parents 0f2f48d + 52a24f6 commit 29f4b90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion carveme/cli/carve.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ def maincall(inputfile, input_type='protein', outputfile=None, diamond_args=None

ensemble = build_ensemble(universe_model, scores, ensemble_size, init_env=init_env)

annotate_genes(ensemble, gene2gene, gene_annotations)
annotate_genes(ensemble.model, gene2gene, gene_annotations)
save_ensemble(ensemble, outputfile, flavor=flavor)
return

if model is None:
print("Failed to build model.")
Expand Down
2 changes: 2 additions & 0 deletions carveme/reconstruction/carving.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,5 @@ def build_ensemble(model, reaction_scores, size, init_env=None):

if init_env:
init_env.apply(ensemble.model, inplace=True, warning=False)

return ensemble

0 comments on commit 29f4b90

Please sign in to comment.