Skip to content

Commit e61c108

Browse files
authored
Merge pull request #59 from MetaSys-LISBP/dev
Update to 3.4.0
2 parents 5b6c178 + 118d48e commit e61c108

File tree

2,507 files changed

+713516
-2813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,507 files changed

+713516
-2813
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ${{ matrix.os}}
1010
strategy:
1111
matrix:
12-
os: [ubuntu-latest, windows-latest, macos-latest]
13-
python-version: [ '3.8', '3.9', '3.10', '3.11']
12+
os: [ubuntu-latest, windows-latest]
13+
python-version: [ '3.9', '3.10', '3.11']
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Set up Python ${{matrix.python-version}}
1818
uses: actions/setup-python@v4
1919
with:

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
/venv/
2-
physiofit/__pycache__/__init__.cpython-310.pyc
3-
physiofit/__pycache__/__main__.cpython-310.pyc
4-
physiofit/__pycache__/logger.cpython-310.pyc
5-
physiofit/base/__pycache__/__init__.cpython-310.pyc
6-
physiofit/base/__pycache__/fitter.cpython-310.pyc
7-
physiofit/base/__pycache__/io.cpython-310.pyc
2+
physiofit/__pycache__/
3+
physiofit/base/__pycahe__/
84
physiofit/last_version.txt
9-
physiofit/ui/__pycache__/__init__.cpython-310.pyc
10-
physiofit/ui/__pycache__/cli.cpython-310.pyc
5+
physiofit/ui/__pycache__/
116
physiofit.egg-info/dependency_links.txt
127
physiofit.egg-info/entry_points.txt
138
physiofit.egg-info/PKG-INFO
@@ -16,3 +11,4 @@ physiofit.egg-info/SOURCES.txt
1611
physiofit.egg-info/top_level.txt
1712
/versions publi/
1813
/physiofit/data/
14+
/docs/_build/

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ Detailed documentation can be found online at Read the Docs
2525
## Key features
2626

2727
* **calculation of growth rate and extracellular (uptake and production) fluxes**,
28-
* **a set of steady-state and dynamic models** are shipped with PhysioFit,
28+
* a set of **steady-state and dynamic models**,
2929
* **tailor-made models** can be constructed by users,
30-
* Monte-Carlo sensitivity analysis to **estimate the precision on the calculated fluxes**,
30+
* Monte-Carlo sensitivity analysis to **estimate the precision of the calculated fluxes**,
3131
* **evaluation of the goodness of fit and visual inspection of the fitted curves**,
32+
* calculation of the Akaike information criterion to **guide users to identify the most appropriate model**,
3233
* shipped as a **library** with both a **graphical** and a **command line** interface,
3334
* **open-source, free and easy to install** everywhere where Python 3 and pip run,
3435
* **biologist-friendly**.
3536

37+
3638
## Quick-start
3739
PhysioFit requires Python 3.9 or higher and run on all platforms.
3840
Please check [the documentation](https://physiofit.readthedocs.io/en/latest/quickstart.html) for complete

docs/_static/usage/example1.JPG

30.1 KB
Loading

docs/conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# The full version, including alpha/beta/rc tags
2525
release = __version__
2626

27-
2827
# -- General configuration ---------------------------------------------------
2928

3029
# Add any Sphinx extension module names here, as strings. They can be
@@ -52,7 +51,6 @@
5251
# This pattern also affects html_static_path and html_extra_path.
5352
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
5453

55-
5654
# -- Options for HTML output -------------------------------------------------
5755

5856
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -74,11 +72,11 @@
7472

7573
# remove blank pages (between the title page and the TOC, etc.)
7674
'classoptions': ',openany,oneside',
77-
'babel' : '\\usepackage[english]{babel}',
75+
'babel': '\\usepackage[english]{babel}',
7876

7977
# Additional stuff for the LaTeX preamble.
8078
'preamble': r'''
8179
\usepackage{hyperref}
8280
\usepackage{upquote}
8381
'''
84-
}
82+
}

docs/faq.rst

Lines changed: 79 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,45 @@ Frequently asked questions (FAQ)
44
How are fluxes calculated?
55
------------------------------------------------------------------
66

7-
We provide details on the flux calculation approach implemented in PhysioFit in the :doc:`method` section.
7+
We provide details on the flux calculation approach implemented in PhysioFit
8+
in the :doc:`method` section.
89

910
How many measurements should I use to calculate fluxes?
1011
------------------------------------------------------------------
1112

12-
As in any model-based fitting procedure, more data usually means more accurate and precise flux estimates. The minimal number of
13-
measurements depend on the model used for flux calculation. For instance, for steady-state built-in models provided with PhysioFit, we recommend using
14-
at least 6 to 8 time points, which should provide reliable and meaningful estimates in most situations.
13+
As in any model-based fitting procedure, more data usually means more
14+
accurate and precise flux estimates. The minimal number of measurements
15+
depend on the model used for flux calculation. For instance, for
16+
steady-state built-in models provided with PhysioFit, we recommend using at
17+
least 6 to 8 time points, which should provide reliable and meaningful
18+
estimates in most situations.
1519

16-
Still, the exact answer to this question strongly depends on the uptake/production/growth rates of your (micro)organism
17-
in the conditions you are investigating, on the sampling time interval, on the questions you are addressing, on the model used for flux calculation, and on
18-
many other parameters! You can make some tests by calculating fluxes from (published or theoretical) datasets similar
19-
to those you have in mind.
20+
Still, the exact answer to this question strongly depends on the
21+
uptake/production/growth rates of your (micro)organism in the conditions you
22+
are investigating, on the sampling time interval, on the questions you are
23+
addressing, on the model used for flux calculation, and on many other
24+
parameters! You can make some tests by calculating fluxes from (published or
25+
theoretical) datasets similar to those you have in mind.
2026

2127
Can I calculate fluxes in case of missing values?
2228
------------------------------------------------------------------
2329

24-
Yes, fluxes can still be calculated if some measurement(s) are missing. In this case, let empty the corresponding field
25-
of the input data file.
30+
Yes, fluxes can still be calculated if some measurement(s) are missing. In
31+
this case, leave empty the corresponding field of the input data file.
2632

2733
.. _`conc units`:
2834

2935
What units should be used for input data?
3036
-----------------------------------------
3137

32-
Input data (biomass concentration, metabolites concentrations, and time) can be provided to PhysioFit using any unit.
33-
Still, we recommand to use units for which values are as close to unity as possible to ensure numerical stability (e.g.
34-
3 mM instead of 3.10\ :sup:`-3` M). Importantly, units of the estimated fluxes depend on units of time and metabolites and biomass
35-
concentrations. The concentration of different metabolites can be provided using different units, but a single unit
36-
must be used for all measurements of a given metabolite.
38+
Input data (biomass concentration, metabolites concentrations, and time) can
39+
be provided to PhysioFit using any unit. Still, we recommend using units
40+
for which values are as close to unity as possible to ensure numerical
41+
stability (e.g. 3 mM instead of 3.10\ :sup:`-3` M). Importantly, units of
42+
the estimated fluxes depend on units of time and metabolites and biomass
43+
concentrations. The concentration of different metabolites can be provided
44+
using different units, but a single unit must be used for all measurements
45+
of a given metabolite.
3746

3847
.. seealso:: :ref:`flux units`
3948

@@ -61,49 +70,75 @@ What parameters values should I use?
6170

6271
Details on PhysioFit parameters can be found in the :doc:`usage` section.
6372

64-
How can I check if my data have been fitted correctly?
73+
Which model should I use?
6574
------------------------------------------------------------------
6675

67-
The quality of the fit can be evaluated based on:
76+
The choice of the model depends on the biological question you are addressing,
77+
the data you have, and the assumptions you are willing to make. We provide a
78+
set of models in PhysioFit, each with its own assumptions and requirements.
6879

69-
* the plots of experimental vs simulated data for the best fit, which should be as close as possible,
70-
* the χ² statistical test results given in the log file (see below for help on interpreting the results).
80+
As a starting point, we recommend using the most relevant model based on
81+
the type of experiment you have conducted. Begin with the simplest model that
82+
fits your data and evaluate the quality of the fit based on the χ² test
83+
results and the plots of experimental vs. simulated data. If the fit is
84+
not satisfactory, you may try more complex models. However, keep in mind
85+
that more complex models often require more data, include more assumptions,
86+
and may lead to overfitting.
7187

72-
.. seealso:: :ref:`chi2 test` and :ref:`bad fit`
88+
If different models fit your data, a good practice for comparing them
89+
is to use the AIC (Akaike Information Criterion). For more information, please
90+
refer to the section "Model comparison" from the :doc:`method` page.
7391

74-
.. _`chi2 test`:
7592

76-
What is a χ² test?
93+
How can I check if my data has been fitted correctly?
7794
------------------------------------------------------------------
7895

79-
A χ² test describes how well a model fits a set of observations. Measures of goodness of fit typically summarize the discrepancy between observed values and the values expected under the model used in PhysioFit (see the :doc:`method` section). It is calculated as the sum of differences between measured and simulated values, each squared and divided by the simulated value.
80-
A good fit corresponds to small differences between measured and simulated values, thereby the χ² value is low. In contrast, a bad fit corresponds to large differences between simulations and measurements, and the χ² value is high.
96+
The quality of the fit can be evaluated based on:
97+
98+
* the plots of experimental vs simulated data for the best fit, which should be as close as possible,
99+
* the χ² statistical test results given in the stat ouput file (see below
100+
for help on interpreting the results).
101+
102+
.. seealso:: :ref:`chi2 test` and :ref:`bad fit`
81103

82-
The resulting χ² value can then be compared with a χ² distribution to determine the goodness of fit. The p-value of one-tail χ² test is calculated by PhysioFit from the best fit and is given in the log file (have a look to the :doc:`usage` section). A p-value close to 0 means poor fitting, and a p-value close to 1 means good fitting (keeping in mind that a p-value very close to 1 can be an evidence that standard deviations might be overestimated). A
83-
p-value between 0.95 and 1 means the model fits the data good enough with respect to the standard deviations provided (at a 95% confidence level). PhysioFit provides an explicit meassage stating wether the flux data are satisfactorily fitted or not (at a 95% confidence interval).
84104

85105
.. _`bad fit`:
86106

87107
My data hasn't been correctly fitted. Why?
88108
------------------------------------------------------------------
89109

90-
A possible reason to explain a bad fit is that standard deviations on measurements (concentration biomass and metabolites) is under-estimated, thereby making the χ² test too stringent. In this case, plots of measured and fitted data should be in agreement. Reliable estimated of standard deviation on measurements must be provided to PhysioFit (have a look to the :doc:`usage` section to see how to check and adjust this parameter).
91-
92-
Another possible reason to explain a bad fit is that a key asumption of the flux calculation method is not respected. For instance,
93-
if you use a steady-state model shipped with PhysioFit, cells might not be strictly in metabolic steady-state, i.e. with
94-
constant fluxes during the whole experiment. If this key asumption does not occur (e.g. cells are continuously adapting
95-
to their environment and fluxes change over time), PhysioFit will not be able to fit the data satisfactorily. In this case,
96-
evaluate wether the deviation is significant or not (e.g. based on the detailed χ² statistics or on the plot of fitted vs
97-
measured data), and evaluate the potential biases that would be introduced by interpreting (or not) these flux values.
98-
99-
In rare situations, it may also be because some parameters have to be tweaked to
100-
help PhysioFit fitting the measurements, which results in obviously aberrant fits (e.g. with flat
101-
time-course profiles for all metabolites). This might happen for instance if some measurements are
102-
provided in units far from unity (e.g. 1.10\ :sup:`-5` M instead of 10 µM). If this situation happens, we suggest modifying the initial values of fluxes, or changing the units of input data, and re-run the flux calculation. For more info on the run parameters and how they may affect the fitting process,
110+
A possible reason to explain a bad fit is that standard deviations on
111+
measurements (concentration biomass and metabolites) is under-estimated,
112+
thereby making the χ² test too stringent. In this case, plots of measured and
113+
fitted data should be in agreement. Reliable estimated of standard deviation
114+
on measurements must be provided to PhysioFit (have a look to the :doc:`usage`
115+
section to see how to check and adjust this parameter).
116+
117+
Another possible reason to explain a bad fit is that a key asumption of the
118+
flux calculation method is not respected. For instance, if you use a
119+
steady-state model shipped with PhysioFit, cells might not be strictly in
120+
metabolic steady-state, i.e. with constant fluxes during the whole
121+
experiment. If this key asumption does not occur (e.g. cells are continuously
122+
adapting to their environment and fluxes change over time), PhysioFit will
123+
not be able to fit the data satisfactorily. In this case, evaluate wether
124+
the deviation is significant or not (e.g. based on the detailed χ²
125+
statistics or on the plot of fitted vs measured data), and evaluate the
126+
potential biases that would be introduced by interpreting (or not) these
127+
flux values.
128+
129+
In rare situations, it may also be because some parameters have to be
130+
tweaked to help PhysioFit fit the measurements, which results in
131+
obviously aberrant fits (e.g. with flat time-course profiles for all
132+
metabolites). This might happen for instance if some measurements are
133+
provided in units far from unity (e.g. 1.10\ :sup:`-5` M instead of 10 µM). If
134+
this situation happens, we suggest modifying the initial values of fluxes,
135+
or changing the units of input data, and re-run the flux calculation. For
136+
more info on the run parameters and how they may affect the fitting process,
103137
please refer to section :ref:`physiofit parameters`.
104138

105-
If you believe the problem is in PhysioFit, we would greatly appreciate
106-
if you could open a new issue on our `issue tracker <https://github.com/MetaSys-LISBP/PhysioFit/issues>`_.
139+
If you think the problem is in PhysioFit, we would greatly appreciate
140+
if you could open a new issue on our `issue tracker <https://github
141+
.com/MetaSys-LISBP/PhysioFit/issues>`_.
107142

108143
I cannot start PhysioFit graphical user interface, can you help me?
109144
-------------------------------------------------------------------
@@ -121,8 +156,9 @@ Please follow this simple procedure:
121156
* If it is related to your system or your Python installation, you will need to ask some
122157
help from your local system administrator or your IT department so they could
123158
guide you toward a clean installation. Tell them that you wanted "to use the graphical
124-
user interface of PhysioFit, a Python 3.6 software" and what you did so far (installation),
125-
give them the traceback and a link toward the documentation. They should know what to do.
159+
user interface of PhysioFit, a Python 3.9 software" and what you did so
160+
far (installation), give them the traceback and a link toward the
161+
documentation. They should know what to do.
126162
* If you believe the problem is in PhysioFit or that your local system administrator
127163
told you so, then you probably have found a bug! We would greatly appreciate
128164
if you could open a new issue on our `issue tracker <https://github.com/MetaSys-LISBP/PhysioFit/issues>`_.

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ additional tailor-made models can be implemented by users.
1919
**PhysioFit includes the following features:**
2020

2121
* **calculation of growth rate and extracellular (uptake and production) fluxes**,
22-
* **a set of steady-state and dynamic models** are shipped with PhysioFit,
22+
* a set of **steady-state and dynamic models**,
2323
* **tailor-made models** can be constructed by users,
2424
* Monte-Carlo sensitivity analysis to **estimate the precision of the calculated fluxes**,
2525
* **evaluation of the goodness of fit and visual inspection of the fitted curves**,
26+
* calculation of the Akaike information criterion to **guide users to identify the most appropriate model**,
2627
* shipped as a **library** with both a **graphical** and a **command line** interface,
2728
* **open-source, free and easy to install** everywhere where Python 3 and pip run,
2829
* **biologist-friendly**.

0 commit comments

Comments
 (0)