Skip to main content

FreeFlux is a package for 13C metabolic flux analysis

Project description

FreeFlux

FreeFlux is a Python package designed for 13C metabolic flux analysis of biological systems at isotopic steady state or transient state, making it suitable for both heterotrophic and autotrophic organisms. With FreeFlux, you can:

  • Estimate metabolic fluxes

  • Simulate labeling patterns of metabolite (fragments)

  • Conduct constraint-based optimizations such as flux balance analysis and flux variability analysis

Our goal is to increase the accessibility of 13C fluxomics techniques to researchers in the metabolic phenotyping and engineering community.

To get started, check out our documentation, which provides an overview of FreeFlux’s fundamental functions using a toy model. We’ve also included tutorials for practical models of E. coli and Synechocystis.

Installation

FreeFlux was tested in Python 3.7, 3.8, 3.9 and 3.10. It can be installed using pip from PyPI:

python -m pip install --upgrade pip
pip install freeflux

or from source (assuming you have git installed):

git clone https://github.com/Chaowu88/freeflux.git /path/to/freeflux
pip install /path/to/freeflux

Installation within an virtual environment is recommendated.

Solver installation

FreeFlux requires the numerical optimization framework OpenOpt for nonlinear regression. It can be installed by the following commands:

pip install openopt
pip install FuncDesigner

Note that the framework is known to work well in Python 3.7, but may have compatibility issues in Python 3.8 and above. In such cases, please refer to this link for solutions.

FreeFlux uses the modeling language Pyomo to formulate linear optimization problem. By default, solvers are not installed together with Pyomo and should be installed independently. For example, to install the glpk solver, run the following command:

conda install -c conda-forge glpk

Example Usage

A typical workflow with FreeFlux starts by building a model through reading metabolic reactions with atom transitions. Users can then call a handler, such as the fitter, simulator, or optimizer, to perform flux estimation, labeling pattern simulation, or constraint-based flux analysis, respectively. Various methods are provided for these handlers for data input and computation.

Below is an example script that performs flux estimation at steady state using the toy model:

MODEL_FILE = 'path/to/reactions.tsv'
MEASURED_MDVS = 'path/to/measured_MDVs.tsv'
MEASURED_FLUXES = 'path/to/measured_fluxes.tsv'

from freeflux import Model

model = Model('demo')
model.read_from_file(MODEL_FILE)

with model.fitter('ss') as fit:
    fit.set_labeling_strategy(
        'AcCoA',
        labeling_pattern = ['01', '11'],
        percentage = [0.25, 0.25],
        purity = [1, 1]
    )
    fit.set_flux_bounds('all', bounds = [-100, 100])
    fit.set_measured_MDV(
        'Glu_12345',
        mean = [0.328,0.276,0.274,0.088,0.03,0.004],
        sd = [0.01,0.01,0.01,0.01,0.01,0.01]
    )
    fit.set_measured_flux('v1', mean = 10, sd = 1)
    fit.prepare()
    res = fit.solve()

For more information, please refer to the documentation.

License

FreeFlux is released under the GPL version 3 license, please see here for more details.

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

freeflux-0.3.4.tar.gz (59.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freeflux-0.3.4-py3-none-any.whl (67.3 kB view details)

Uploaded Python 3

File details

Details for the file freeflux-0.3.4.tar.gz.

File metadata

  • Download URL: freeflux-0.3.4.tar.gz
  • Upload date:
  • Size: 59.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for freeflux-0.3.4.tar.gz
Algorithm Hash digest
SHA256 5c57e184c0fd7485b936efd3f3605e721ac6b2d823fe494dd759267f2b1d1b87
MD5 d311769306b9b9926df2a44859fa48f3
BLAKE2b-256 9fe8024204b48fadfa91f63b9ffe547ea1fa1fff62aa99db7f8cc28039c51edd

See more details on using hashes here.

File details

Details for the file freeflux-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: freeflux-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for freeflux-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 59e224b473425584c3ddf1022a37e97810c599629f457414a412d288f8f41a52
MD5 c42bd4eee89ff5193f46d75ed4c4ba39
BLAKE2b-256 2e3fc22c972b9bed24f464bbf5cf585a8e6a729b26d6539b60b37ff89760be34

See more details on using hashes here.

Supported by

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