Skip to main content

A Python implementation of flux balance analysis

Project description

A python implementation of flux balance analysis to model microbial metabolism

About PyFBA

PyFBA is a Python flux-balance-analysis package that allows you to build models from genomes, gapfill models, and run flux-balance-analysis on that model. The aim of PyFBA is to provide an extensible, python-based platform for FBA work.

PyFBA is being developed by Daniel Cuevas, Taylor O’Connell, and Rob Edwards in Rob’s bioinformatics group at San Diego State University together with help from Janaka Edirisinghe, Chris Henry, Ross Overbeek and others at Argonne National Labs.

Installing PyFBA

To use PyFBA you need Python 2.7 or greater, and you need to install the GNU GLPK and a Python wrapper for that program, pyGLPK available from github.

We also leverage the Model SEED GitHub repository with all the latest biochemistry tables.

Our installation page has detailed instructions on installing PyFBA and getting everything running.

Getting Started with PyFBA

Once you have installed GLPK, PyGLPK, and PyFBA, you will most likely want to build a model from a genome, gap fill that model, and test it for growth on different media. We have detailed instructions that walk you through the step-by-step procedures that you need to use to run flux balance analysis on your own genome.

Copyright and License

PyFBA is copyright Daniel Cuevas, Taylor O’Connell, and Rob Edwards, and is released under the MIT license.

VERSION 1.2

Crucial edit to setup.py file

Adding PyFBA.model package to list.

VERSION 1.1

Updated all the code to work with Python 3.

However, this breaks compatibility with Python 2 because of the “errors” keyword in open.

The main changes include relative imports, a new class in the tests/ package to allow deep assertions, and using this type of construct with the open command to ignore unicode errors in ModelData:

with open(ssfile, ‘r’, errors=’replace’) as sin:

Added function to obtain Model SEED complexes from a set of roles

  • PyFBA/filters/roles_and_complexes.py

Added gap-fill step to add reactions based on existent EC numbers

  • PyFBA/gapfill/ecnumbers.py

Optimized and fixed bugs during gap-fill reaction minimization process

  • PyFBA/gapfill/reaction_minimization.py

New Model class objects

Model object contains functionality to make common processes easier to facilitate.

  • Generate model from RAST annotations

  • Save model to hard disk location

  • Load model from hard disk location

  • Run FBA

  • Run FBA and obtain flux values

  • Run FBA and obtain flux values according to SEED subsystems

  • Run gap-fill

  • Remember which reactions were gap-filled reactions and which media

New iPython Notebooks

  • Find a metabolite.ipynb

  • PATRIC to FBA.ipynb

  • Gap-fill_a_model.ipynb

  • Saving_and_loading_a_model.ipynb

VERSION 1.0

Added a CITATION.md

Please cite us if you use PyFBA

Added the iPython Notebook directory

Example code showing:

importing an SBML file and running FBA

  • iPythonNotebooks/Using_an_SBML_model.ipynb

how to build your model from functional roles and how to gap-fill that model on a media

  • iPythonNotebook/From_functional_roles_to_gap-filling.ipynb

Added minimization by accuracy

Removed PyFBA/gapfill/minimize_additional_reactions.py and created reaction_minimization.py

Example gap-fill pipeline

  • example_code/gapfill_from_reactions_multiple_conditions.py

VERSION 0.951

Removed the author tag

It is superflous, that is what versioning is for.

VERSION 0.95

Several changes to files:

Updated the subsystem functions and changed the name to a generic name. The date is handled by versioning!

  • PyFBA/Biochemistry/SEED/Subsystems/SS_functions.txt

  • PyFBA/Biochemistry/SEED/Subsystems/SS_functions_Oct_2015.txt

Changing the version number

  • PyFBA/INIT.py

Adding reaction flux information that can be pulled after the sm has been solved

  • PyFBA/fba/INIT.py

  • PyFBA/fba/fluxes.py

External reactions

Fixed an issue where we were over-incorporating reactions based on things in the media

  • PyFBA/fba/bounds.py

  • PyFBA/parse/model_seed.py

Adding verboseness

  • PyFBA/fba/run_fba.py

  • PyFBA/gapfill/roles.py

  • PyFBA/parse/read_media.py

Reduced complexity

We only test the right half of the reactions if the left half do not grow, and once we have <10 reactions to search through we just iterate and knock out each reaction sequentially. It is faster than the shuffle approach.

  • PyFBA/gapfill/minimize_additional_reactions.py

Changed the way we read roles

SEED has a notion of multifunctional roles, and we added splitting those functions into roles

  • PyFBA/gapfill/subsystem.py

Gap generation code

Testing each of the individual reactions in a model

  • PyFBA/gapgeneration/test_reactions.py

  • example_code/test_individual_reactions.py

Shifted the order of gapfilling

This order makes more logical sense!

  • example_code/gapfill_from_reactions.py

Updated the tests

With all these changes, the tests were not right

  • PyFBA/tests/reaction_list.txt

  • PyFBA/tests/test_fba.py

  • PyFBA/tests/test_suggestions.py

VERSION 0.9

Refactored separating roles to functions. SEED has a concept of multifunctional roles and this separates out our roles before we search for them.

VERSION 0.8

VERSION 0.7

VERSION 0.6

  • Removed installation dependencies from setup.py because they break installation! You need to install the dependencies manually

  • Refactored the code to remove the os.environ dependencies

VERSION 0.5

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyFBA-2.57.tar.gz (13.4 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page