Skip to main content

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.

FreeFlux now supports 15N labeling data, which can be enabled by specifying nitrogen as the labeled atom when defining the labeling strategy.

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.

If FreeFlux is installed on a Linux platform with Python>=3.8, using JAX can significantly speed up the preparation step before flux estimation. JAX can be installed using the following command:

pip install "jax[cpu]>=0.4,<=0.4.18"

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 OpenOpt is known to work well in Python 3.7, but may have compatibility issues in Python 3.8 and above. FreeFlux now automatically applies the necessary patches to ensure compatibility. If you prefer to apply the patch manually, 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'

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],
        label_atom = 'C'
    )
    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.

Citation

Wu et al.. FreeFlux: A Python Package for Time-Efficient Isotopically Nonstationary Metabolic Flux Analysis. ACS Synthetic Biology. 2023.

Feel free to provide feedback at chao.wu@nrel.gov or chaowu09@gmail.com.

Metadata

Release files for freeflux 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for freeflux 0.3.8
File Size Uploaded Provenance Actions
freeflux-0.3.8.tar.gz 60.8 kB Without provenance Details for freeflux-0.3.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for freeflux 0.3.8
File Interpreter ABI Platform Actions
freeflux-0.3.8-py3-none-any.whl Python 3 none any Details for freeflux-0.3.8-py3-none-any.whl

Total release size: 129.0 kB

Release files / freeflux-0.3.8.tar.gz

Download URL freeflux-0.3.8.tar.gz
Size 60.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fe0bfd16430cb4aa98fd689a34db17f6c3cdbd4534a40d557746837e9e3c8bce
BLAKE2b-256 checksum
How to use checksums
fec1c1cbdd3a56364c48dd7838f2c3869c5a0252f1cf80bdbda01f999222e556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / freeflux-0.3.8-py3-none-any.whl

Download URL freeflux-0.3.8-py3-none-any.whl
Size 68.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c907487b38178599aa953ea1fbb293eeaaa4196077dd2701a2a46ac8050c6a8
BLAKE2b-256 checksum
How to use checksums
c5b577a99c35d54d29be818425292521c26d51e87900c5ecf8d96324838765f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Security for freeflux 0.3.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page