FluxPyt: a Python-based free and open-source software for 13C-metabolic flux analyses

13C-Metabolic flux analysis (MFA) is a powerful approach to estimate intracellular reaction rates which could be used in strain analysis and design. Processing and analysis of labeling data for calculation of fluxes and associated statistics is an essential part of MFA. However, various software currently available for data analysis employ proprietary platforms and thus limit accessibility. We developed FluxPyt, a Python-based truly open-source software package for conducting stationary 13C-MFA data analysis. The software is based on the efficient elementary metabolite unit framework. The standard deviations in the calculated fluxes are estimated using the Monte-Carlo analysis. FluxPyt also automatically creates flux maps based on a template for visualization of the MFA results. The flux distributions calculated by FluxPyt for two separate models: a small tricarboxylic acid cycle model and a larger Corynebacterium glutamicum model, were found to be in good agreement with those calculated by a previously published software. FluxPyt was tested in Microsoft™ Windows 7 and 10, as well as in Linux Mint 18.2. The availability of a free and open 13C-MFA software that works in various operating systems will enable more researchers to perform 13C-MFA and to further modify and develop the package.


2.
Starting from first column, write the labels of each column of the model as follows: RxnID rxnEq atom_transition rates rxnType basis deviation 3. Write reaction, atom transition equations, rates, reaction types, basis fluxes and deviations as follows:

5.
Put "*" sign in 8 th column in row corresponding to the reaction which the user wants to take as basis. The basis flux is usually the major substrate uptake flux, e.g. glucose influx reaction. 2. The first column should be the substrate ID. This should be same as the metabolite ID of the substrate as written in reaction equations.

3.
Second column represents carbon label at respective carbon atoms of the substrate molecule.
In above example, value of 0.99 represents 99% of the carbons at that position is labelled.
This value may vary based on the purity of labelled substrate you use in your experiment.
The value of 0.0107 represents the natural abundance of 13 C carbon.

4.
Third column represents ratio of specific labelled substrate used. If mixture of same metabolite labelled at different carbons is used, there proportion has to be written. In above case, 1-13 C-pyruvate and U-13 C-pyruvate is used in equal proportions. The proportion of Glutamate is written as 1 as there is only one form of glutamate used, i.e. 1-13 C-glutamate.
Similarly, if the proportion of different forms of a metabolite used is unknown, then value of "1" should be written under the "ratio" column and separate uptake reactions for each form of the metabolite should be written in the model.

5.
Save file as comma delimited file named as "substrate_input.csv"

5.
Second column is the molecular formula of the amino acid derivative excluding the carbon backbone.

6.
Third column represents number of masses include in the model for the amino acid.

7.
Forth column represents the EMU size plus 1 of the mass isotopomer.

How to use FluxPyt?
User guide is written for Anaconda installation in windows.
1. Make a folder (e.g. "mymodel") wherein you will store the csv files of model, substrate and correction data. All the three files should be present in same folder.
a. Open anaconda console window by typing "Anaconda" in search program panel in Windows.
b. Activate "FluxPyt_env" environment by typing: activate FluxPyt_env c. In the console window, type "spyder" and press "Enter" 3. In the "current directory" pane, paste the path to the "mymodel" folder and press "Enter".
For example, if you have stored the "mymodel" folder in "E" drive of the computer inside a folder named as "MFA_analysis", then the path will be: This can also be done by following way: import os os.chdir('E:\\MFA_analysis\\mymodel')

Flux estimation:
a. In IPython console, type following.
import fluxpyt fluxpyt.main() b. Python will ask, "Enter file name:". Type the name of the model you wrote and press "Enter". Do not write the extension of the file i.e. ".csv". It will be automatically added to filepath once the program runs. myFile c. Python will ask, "Is data for natural isotope correction available (y/n)?". Type "y" if correction for natural isotopes is required. Press "Enter".
d. Python will ask, "Enter Number of Iterations". It is recommended to use at least 10 iterations.
e. The flux estimation will run. If there are no errors or exceptions, optimal fluxes and rough estimates of flux ranges will be calculated.
f. After completion of flux estimation FluxPyt will ask: Optimization completed.
Is network diagram template available? (y/n) g. Type "y" if yes. Note that the flux diagram template diagram filename should be same as the model filename.
h. FluxPyt will again ask if Monte_Carlo simulations are to be run or not. If yes, it will ask number of data sets to be generated. Default value is 500. If no, then the program will exit.
i. One can Monte Carlo simulations and bootstrapping (provided Monte Carlo simulation has previously completed) separately.

Output Files
FluxPyt generates several result files for use during MFA (Table 1). FluxPyt provides automatic generation of flux maps based on template, graph representing differences in measured and calculated MIDs and the box plots representing bootstrap analysis results. All these results are also written in tabular form as separate csv files for further analysis by the user. In addition, all results are stored as pickle files in case the user wants to analyze the results in Python. After the Monte Carlo analysis has been done, user can do bootstrap analysis for reactions that he chooses (See point No. 5c in "How to use FluxPyt?" section).

File name Description optimal_solution.csv
Lists the optimal flux values for each reaction calculated by FluxPyt. The sum of squared residue and the chi-square cut-off valuesare also written here.

optimization_data.pckl
Consists of the optimization result, and the data required for calculation of the confidence intervals by Monte Carlo method.

calculated_mids.pckl
Contains calculated MIDs from the last iteration. It is used to write the "calulated_mids.txt" at the end of optimization.

montecarlo_results.csv
Contains the results of Monte Carlo analysis. For each reaction, the optimal solution and the 2.5, 16, 50, 84 and 97.5 percentile values are written.

flux_std.pckl
Contains the results of Monte Carlo analysis which is used by the bootstrap function.

bootstrap_dataframe.pckl
Contains bootstrap results as apandasdataframe. Each column contains the raw data from the bootstrap analysis for a particular reaction.