freeflux


Namefreeflux JSON
Version 0.3.6 PyPI version JSON
download
home_pagehttps://github.com/Chaowu88/freeflux
SummaryFreeFlux is a package for 13C metabolic flux analysis
upload_time2024-02-29 06:59:34
maintainer
docs_urlNone
authorChao Wu
requires_python>=3.7
licenseGNU General Public License v3.0
keywords 13c labeling pattern metabolic flux analysis metabolism biology non-linear programming optimization simulation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            FreeFlux
========

FreeFlux is a Python package designed for :sup:`13`\ C 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 :sup:`13`\ C fluxomics techniques to researchers in the metabolic phenotyping and engineering community.

To get started, check out our `documentation <https://freeflux.readthedocs.io/en/latest/index.html>`__, which provides an overview of FreeFlux's fundamental functions using a `toy model <https://github.com/Chaowu88/freeflux/tree/main/models/toy>`__. We've also included `tutorials <https://github.com/Chaowu88/freeflux/tree/main/tutorials>`__ for practical models of `E. coli <https://github.com/Chaowu88/freeflux/tree/main/models/ecoli>`__ and `Synechocystis <https://github.com/Chaowu88/freeflux/tree/main/models/synechocystis>`__.

Installation
============

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

.. code-block:: python

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

or from source (assuming you have `git <https://git-scm.com/>`__ installed):

.. code-block:: python

  git clone https://github.com/Chaowu88/freeflux.git /path/to/freeflux
  pip install /path/to/freeflux
  
Installation within an `virtual environment <https://docs.python.org/3.8/tutorial/venv.html>`__ is recommendated.

Solver installation
===================

FreeFlux requires the numerical optimization framework `OpenOpt <https://openopt.org/>`__ for nonlinear regression. It can be installed by the following commands:

.. code-block:: python

  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 <https://freeflux.readthedocs.io/en/latest/installation.html#dependencies-and-compatibility>`__ 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:

.. code-block:: python
  
  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 <https://github.com/Chaowu88/freeflux/tree/main/models/toy>`__:

.. code-block:: python
   
   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 <https://freeflux.readthedocs.io/en/latest/index.html>`__.

License
=======

FreeFlux is released under the GPL version 3 license, please see `here <https://github.com/Chaowu88/freeflux/blob/main/LICENSE>`__ for more details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Chaowu88/freeflux",
    "name": "freeflux",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "13c,labeling pattern,metabolic flux analysis,metabolism,biology,non-linear programming,optimization,simulation",
    "author": "Chao Wu",
    "author_email": "chaowu09@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b6/75/50967bbd259e1634135d1b117ad9bf9551c68eaeb4a9e354e712bc11abd8/freeflux-0.3.6.tar.gz",
    "platform": null,
    "description": "FreeFlux\r\n========\r\n\r\nFreeFlux is a Python package designed for :sup:`13`\\ C 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:\r\n\r\n- Estimate metabolic fluxes \r\n- Simulate labeling patterns of metabolite (fragments)\r\n- Conduct constraint-based optimizations such as flux balance analysis and flux variability analysis\r\n\r\nOur goal is to increase the accessibility of :sup:`13`\\ C fluxomics techniques to researchers in the metabolic phenotyping and engineering community.\r\n\r\nTo get started, check out our `documentation <https://freeflux.readthedocs.io/en/latest/index.html>`__, which provides an overview of FreeFlux's fundamental functions using a `toy model <https://github.com/Chaowu88/freeflux/tree/main/models/toy>`__. We've also included `tutorials <https://github.com/Chaowu88/freeflux/tree/main/tutorials>`__ for practical models of `E. coli <https://github.com/Chaowu88/freeflux/tree/main/models/ecoli>`__ and `Synechocystis <https://github.com/Chaowu88/freeflux/tree/main/models/synechocystis>`__.\r\n\r\nInstallation\r\n============\r\n\r\nFreeFlux was tested in Python 3.7, 3.8, 3.9 and 3.10. It can be installed using *pip* from PyPI:\r\n\r\n.. code-block:: python\r\n\r\n  python -m pip install --upgrade pip\r\n  pip install freeflux\r\n\r\nor from source (assuming you have `git <https://git-scm.com/>`__ installed):\r\n\r\n.. code-block:: python\r\n\r\n  git clone https://github.com/Chaowu88/freeflux.git /path/to/freeflux\r\n  pip install /path/to/freeflux\r\n  \r\nInstallation within an `virtual environment <https://docs.python.org/3.8/tutorial/venv.html>`__ is recommendated.\r\n\r\nSolver installation\r\n===================\r\n\r\nFreeFlux requires the numerical optimization framework `OpenOpt <https://openopt.org/>`__ for nonlinear regression. It can be installed by the following commands:\r\n\r\n.. code-block:: python\r\n\r\n  pip install openopt\r\n  pip install FuncDesigner\r\n\r\nNote 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 <https://freeflux.readthedocs.io/en/latest/installation.html#dependencies-and-compatibility>`__ for solutions.\r\n\r\nFreeFlux 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:\r\n\r\n.. code-block:: python\r\n  \r\n  conda install -c conda-forge glpk\r\n\r\nExample Usage\r\n=============\r\n\r\nA 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.\r\n\r\nBelow is an example script that performs flux estimation at steady state using the `toy model <https://github.com/Chaowu88/freeflux/tree/main/models/toy>`__:\r\n\r\n.. code-block:: python\r\n   \r\n   MODEL_FILE = 'path/to/reactions.tsv'\r\n   MEASURED_MDVS = 'path/to/measured_MDVs.tsv'\r\n   MEASURED_FLUXES = 'path/to/measured_fluxes.tsv'\r\n   \r\n   from freeflux import Model\r\n   \r\n   model = Model('demo')\r\n   model.read_from_file(MODEL_FILE)\r\n   \r\n   with model.fitter('ss') as fit:\r\n       fit.set_labeling_strategy(\r\n           'AcCoA', \r\n           labeling_pattern = ['01', '11'], \r\n           percentage = [0.25, 0.25], \r\n           purity = [1, 1]\r\n       )\r\n       fit.set_flux_bounds('all', bounds = [-100, 100])\r\n       fit.set_measured_MDV(\r\n           'Glu_12345', \r\n           mean = [0.328,0.276,0.274,0.088,0.03,0.004], \r\n           sd = [0.01,0.01,0.01,0.01,0.01,0.01]\r\n       )\r\n       fit.set_measured_flux('v1', mean = 10, sd = 1)\r\n       fit.prepare()\r\n       res = fit.solve()\r\n\r\nFor more information, please refer to the `documentation <https://freeflux.readthedocs.io/en/latest/index.html>`__.\r\n\r\nLicense\r\n=======\r\n\r\nFreeFlux is released under the GPL version 3 license, please see `here <https://github.com/Chaowu88/freeflux/blob/main/LICENSE>`__ for more details.\r\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3.0",
    "summary": "FreeFlux is a package for 13C metabolic flux analysis",
    "version": "0.3.6",
    "project_urls": {
        "Homepage": "https://github.com/Chaowu88/freeflux"
    },
    "split_keywords": [
        "13c",
        "labeling pattern",
        "metabolic flux analysis",
        "metabolism",
        "biology",
        "non-linear programming",
        "optimization",
        "simulation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c3ee638613380766eaea8dc263ed2571e5a8d499442e609aa239792bc96277e",
                "md5": "b962bef6e7721798347472893544d6dd",
                "sha256": "06c2956f6115ea91b995dd867ec29b428b5efc4d09885c2dde29bcf7e4eedccf"
            },
            "downloads": -1,
            "filename": "freeflux-0.3.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b962bef6e7721798347472893544d6dd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 67302,
            "upload_time": "2024-02-29T06:59:33",
            "upload_time_iso_8601": "2024-02-29T06:59:33.653091Z",
            "url": "https://files.pythonhosted.org/packages/4c/3e/e638613380766eaea8dc263ed2571e5a8d499442e609aa239792bc96277e/freeflux-0.3.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b67550967bbd259e1634135d1b117ad9bf9551c68eaeb4a9e354e712bc11abd8",
                "md5": "b566e8461e0400378ef40b22431e6702",
                "sha256": "b918aef8b231eef9671cc78efbb04a026eb1da625e43a1891ee5801f0951e0db"
            },
            "downloads": -1,
            "filename": "freeflux-0.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "b566e8461e0400378ef40b22431e6702",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 59314,
            "upload_time": "2024-02-29T06:59:34",
            "upload_time_iso_8601": "2024-02-29T06:59:34.882283Z",
            "url": "https://files.pythonhosted.org/packages/b6/75/50967bbd259e1634135d1b117ad9bf9551c68eaeb4a9e354e712bc11abd8/freeflux-0.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 06:59:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Chaowu88",
    "github_project": "freeflux",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "freeflux"
}
        
Elapsed time: 2.74926s