2. Data fetching and processing¶
More details about list_models¶
In [ ]:
Copied!
import pandas as pd
import numpy as np
import pipeGEM as pg
from pipeGEM.data.fetching import list_models, load_remote_model
import pandas as pd
import numpy as np
import pipeGEM as pg
from pipeGEM.data.fetching import list_models, load_remote_model
In [3]:
Copied!
# search human models
model_list = list_models(organism="human")
# search human models
model_list = list_models(organism="human")
In [4]:
Copied!
model_list
model_list
Out[4]:
| id | organism | reaction_count | metabolite_count | gene_count | database | |
|---|---|---|---|---|---|---|
| 1 | Human-GEM | Homo sapiens | 13024 | 8363 | 2920 | metabolic atlas |
| 1 | iAB_RBC_283 | Homo sapiens | 469 | 342 | 346 | BiGG |
| 12 | iAT_PLT_636 | Homo sapiens | 1008 | 738 | 636 | BiGG |
| 105 | RECON1 | Homo sapiens | 3741 | 2766 | 1905 | BiGG |
| 106 | Recon3D | Homo sapiens | 10600 | 5835 | 2248 | BiGG |
In [5]:
Copied!
# select by number of components
model_list = list_models(organism="mouse",
max_n_genes=2000, max_n_mets=3000, max_n_rxns=5000)
# select by number of components
model_list = list_models(organism="mouse",
max_n_genes=2000, max_n_mets=3000, max_n_rxns=5000)
In [6]:
Copied!
model_list
model_list
Out[6]:
| id | organism | reaction_count | metabolite_count | gene_count | database | |
|---|---|---|---|---|---|---|
| 77 | iMM1415 | Mus musculus | 3726 | 2775 | 1375 | BiGG |
Generate simulated gene data¶
In [7]:
Copied!
from pipeGEM.data.synthesis import get_syn_gene_data
import seaborn as sns
import numpy as np
from pipeGEM.data.synthesis import get_syn_gene_data
import seaborn as sns
import numpy as np
In [8]:
Copied!
mouse = load_remote_model('iMM1415')
mouse = load_remote_model('iMM1415')
Set parameter Username Academic license - for non-commercial use only - expires 2024-06-25
No objective coefficients in model. Unclear what should be optimized
In [9]:
Copied!
raw_count = get_syn_gene_data(mouse, n_sample=9, random_state=42)
raw_count.head()
raw_count = get_syn_gene_data(mouse, n_sample=9, random_state=42)
raw_count.head()
Out[9]:
| sample_0 | sample_1 | sample_2 | sample_3 | sample_4 | sample_5 | sample_6 | sample_7 | sample_8 | |
|---|---|---|---|---|---|---|---|---|---|
| 12846 | 14845 | 162353 | 11429 | 67283 | 155462 | 1584067 | 100515 | 145758 | 167789 |
| 67689 | 4406663 | 5444541 | 2174195 | 1115432 | 13400292 | 766236 | 913081 | 1989966 | 5588672 |
| 237940 | 1524538 | 3264187 | 8463146 | 1826585 | 3019458 | 1613887 | 1405787 | 7459855 | 2358988 |
| 222 | 57165 | 4878 | 3100 | 49435 | 10238 | 27138 | 94524 | 1704 | 17945 |
| 76507 | 58703 | 1289389 | 187994 | 2591007 | 579267 | 972693 | 1202149 | 806222 | 2110348 |
In [10]:
Copied!
sns.displot(np.log2(raw_count + 1)["sample_0"])
sns.displot(np.log2(raw_count + 1)["sample_0"])
C:\Users\qwert\miniconda3\envs\py310\lib\site-packages\seaborn\axisgrid.py:118: UserWarning: The figure layout has changed to tight self._figure.tight_layout(*args, **kwargs)
Out[10]:
<seaborn.axisgrid.FacetGrid at 0x1a4bff930a0>
Maping gene data to a pipeGEM model¶
In [11]:
Copied!
from pipeGEM.data import GeneData
from pipeGEM.data import GeneData
In [12]:
Copied!
p_mouse = pg.Model("imm1415", mouse)
p_mouse = pg.Model("imm1415", mouse)
In [13]:
Copied!
gene_data = GeneData(data=raw_count["sample_0"],
data_transform=lambda x: np.log2(x),
absent_expression=0)
gene_data = GeneData(data=raw_count["sample_0"],
data_transform=lambda x: np.log2(x),
absent_expression=0)
In [14]:
Copied!
p_mouse.add_gene_data(name_or_prefix="sample_0",
data=gene_data,
or_operation="nanmax", # alternative: nansum
threshold=-np.inf,
absent_value=-np.inf)
p_mouse.add_gene_data(name_or_prefix="sample_0",
data=gene_data,
or_operation="nanmax", # alternative: nansum
threshold=-np.inf,
absent_value=-np.inf)
100%|███████████████████████████████████████████████████████████████████████████| 3726/3726 [00:00<00:00, 20452.82it/s]
Finished mapping in 0.20606780052185059 seconds.
In [15]:
Copied!
p_mouse.reactions.get_by_id("2HBt2")
p_mouse.reactions.get_by_id("2HBt2")
Out[15]:
| Reaction identifier | 2HBt2 |
| Name | 2 hydroxybutyrate cotransport with proton |
| Memory address | 0x1a4bf7efa90 |
| Stoichiometry |
2hb_e + h_e <=> 2hb_c + h_c 2 Hydroxybutyrate C4H7O3 + H+ <=> 2 Hydroxybutyrate C4H7O3 + H+ |
| GPR | 80879 or 20503 or 20501 |
| Lower bound | -100000.0 |
| Upper bound | 100000.0 |
In [16]:
Copied!
p_mouse.gene_data["sample_0"].rxn_scores["2HBt2"]
p_mouse.gene_data["sample_0"].rxn_scores["2HBt2"]
C:\Users\qwert\AppData\Local\Temp\ipykernel_34972\3651060646.py:2: RuntimeWarning: divide by zero encountered in log2 data_transform=lambda x: np.log2(x),
Out[16]:
19.428086140626256
In [17]:
Copied!
gene_data.transformed_gene_data["80879"], gene_data.transformed_gene_data["20503"], gene_data.transformed_gene_data["20501"]
gene_data.transformed_gene_data["80879"], gene_data.transformed_gene_data["20503"], gene_data.transformed_gene_data["20501"]
C:\Users\qwert\AppData\Local\Temp\ipykernel_34972\3651060646.py:2: RuntimeWarning: divide by zero encountered in log2 data_transform=lambda x: np.log2(x),
Out[17]:
(17.02433890053839, 17.910098103986154, 19.428086140626256)
Finding data thresholds¶
In [18]:
Copied!
# modified rFASTCORMICS thresholds
rFASTCORMICS_threshold = gene_data.get_threshold("rFASTCORMICS", return_heuristic=False)
# modified rFASTCORMICS thresholds
rFASTCORMICS_threshold = gene_data.get_threshold("rFASTCORMICS", return_heuristic=False)
transform: True cutting off 115 data since their expression values are below -inf data's range: [5.0, 28.13763674747688]
C:\Users\qwert\AppData\Local\Temp\ipykernel_34972\3651060646.py:2: RuntimeWarning: divide by zero encountered in log2 data_transform=lambda x: np.log2(x),
p_score of init values: 0.08537313386787253 original guess: 19.360653430827234 22.139761515007624 best fitted Amps: 0.023454819532955057 0.12048959290393145 best fitted means: 20.62204439000541 19.4026091837788
C:\Users\qwert\PycharmProjects\pipeGEM\pipeGEM\analysis\_threshold.py:158: UserWarning: Fail to find proper parameters, return the best 3 params
warnings.warn(f"Fail to find proper parameters, return the best {k} params")
In [19]:
Copied!
rFASTCORMICS_threshold.plot()
print(f"Expression threshold: {rFASTCORMICS_threshold.exp_th}")
rFASTCORMICS_threshold.plot()
print(f"Expression threshold: {rFASTCORMICS_threshold.exp_th}")
Expression threshold: 20.62204439000541
In [20]:
Copied!
# percentile thresholds (which are also called 'global threshold')
p_threshold = gene_data.get_threshold("percentile", p=[90, 75, 50])
# percentile thresholds (which are also called 'global threshold')
p_threshold = gene_data.get_threshold("percentile", p=[90, 75, 50])
transform: True
C:\Users\qwert\AppData\Local\Temp\ipykernel_34972\3651060646.py:2: RuntimeWarning: divide by zero encountered in log2 data_transform=lambda x: np.log2(x),
In [21]:
Copied!
p_threshold
p_threshold
Out[21]:
PercentileThresholdAnalysis at 0x1a4d9bf68c0
-----------
Parameters:
{'p': [90, 75, 50], 'exp_p': None, 'non_exp_p': None}
-----------
Result keys:
data, exp_th, non_exp_th, threshold_series
-----------
Running time:
0.0010004043579101562
In [22]:
Copied!
p_threshold.threshold_series
p_threshold.threshold_series
Out[22]:
p=90 23.013880 p=75 21.501370 p=50 19.554229 dtype: float64
In [23]:
Copied!
p_threshold.plot()
p_threshold.plot()
In [24]:
Copied!
raw_count
raw_count
Out[24]:
| sample_0 | sample_1 | sample_2 | sample_3 | sample_4 | sample_5 | sample_6 | sample_7 | sample_8 | |
|---|---|---|---|---|---|---|---|---|---|
| 12846 | 14845 | 162353 | 11429 | 67283 | 155462 | 1584067 | 100515 | 145758 | 167789 |
| 67689 | 4406663 | 5444541 | 2174195 | 1115432 | 13400292 | 766236 | 913081 | 1989966 | 5588672 |
| 237940 | 1524538 | 3264187 | 8463146 | 1826585 | 3019458 | 1613887 | 1405787 | 7459855 | 2358988 |
| 222 | 57165 | 4878 | 3100 | 49435 | 10238 | 27138 | 94524 | 1704 | 17945 |
| 76507 | 58703 | 1289389 | 187994 | 2591007 | 579267 | 972693 | 1202149 | 806222 | 2110348 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 30955 | 824385 | 470969 | 837334 | 1383151 | 2000101 | 1240493 | 2203814 | 216831 | 85358 |
| 18709 | 330946 | 2996446 | 1645833 | 716716 | 7043678 | 13927808 | 487353 | 4274073 | 1665708 |
| 20975 | 1782456 | 2959058 | 416373 | 122911 | 1537358 | 1671129 | 3025042 | 530628 | 221207 |
| 320634 | 1302911 | 179079 | 1358922 | 149480 | 1672668 | 488008 | 33415 | 938677 | 643217 |
| 269437 | 118270 | 63514 | 26325 | 0 | 2430 | 441263 | 0 | 201031 | 0 |
1375 rows × 9 columns
In [25]:
Copied!
# To find local threshold, we need to aggregate several GeneData first!
dummy_groups = pd.DataFrame({"gp1": {c: "a" if int(c.split("_")[1]) > 4 else "b" for c in raw_count.columns}})
gene_data_dic = {}
for c in raw_count.columns:
gene_data_dic[c] = GeneData(data=raw_count[c],
data_transform=lambda x: np.log2(x),
absent_expression=0)
agg_gene_data = GeneData.aggregate(gene_data_dic, group_annotation=dummy_groups)
agg_gene_data
# To find local threshold, we need to aggregate several GeneData first!
dummy_groups = pd.DataFrame({"gp1": {c: "a" if int(c.split("_")[1]) > 4 else "b" for c in raw_count.columns}})
gene_data_dic = {}
for c in raw_count.columns:
gene_data_dic[c] = GeneData(data=raw_count[c],
data_transform=lambda x: np.log2(x),
absent_expression=0)
agg_gene_data = GeneData.aggregate(gene_data_dic, group_annotation=dummy_groups)
agg_gene_data
Out[25]:
DataAggregation at 0x1a4d9bbcb50
-----------
Parameters:
{'method': 'concat', 'prop': 'data', 'absent_expression': 0, 'group': {'sample_0': ['sample_0'], 'sample_1': ['sample_1'], 'sample_2': ['sample_2'], 'sample_3': ['sample_3'], 'sample_4': ['sample_4'], 'sample_5': ['sample_5'], 'sample_6': ['sample_6'], 'sample_7': ['sample_7'], 'sample_8': ['sample_8']}}
-----------
Result keys:
agg_data, group_annotation
In [26]:
Copied!
local_th = agg_gene_data.find_local_threshold(p=50, group_name="gp1")
local_th = agg_gene_data.find_local_threshold(p=50, group_name="gp1")
In [27]:
Copied!
local_th.plot(genes=["76507", "20975"])
local_th.plot(genes=["76507", "20975"])
Visualizing gene data¶
In [28]:
Copied!
corr_result = agg_gene_data.corr()
corr_result = agg_gene_data.corr()
In [29]:
Copied!
corr_result
corr_result
Out[29]:
CorrelationAnalysis at 0x1a4f4d683d0
-----------
Parameters:
{'by': 'sample'}
-----------
Result keys:
correlation_result
In [30]:
Copied!
corr_result.plot(annot=True)
corr_result.plot(annot=True)
In [31]:
Copied!
pca_result = agg_gene_data.dim_reduction(method="PCA")
pca_result = agg_gene_data.dim_reduction(method="PCA")
In [32]:
Copied!
pca_result
pca_result
Out[32]:
PCA_Analysis at 0x1a4be1022f0
-----------
Parameters:
{'dr_method': 'PCA', 'method': 'concat', 'prop': 'data', 'absent_expression': 0, 'group': {'sample_0': ['sample_0'], 'sample_1': ['sample_1'], 'sample_2': ['sample_2'], 'sample_3': ['sample_3'], 'sample_4': ['sample_4'], 'sample_5': ['sample_5'], 'sample_6': ['sample_6'], 'sample_7': ['sample_7'], 'sample_8': ['sample_8']}}
-----------
Result keys:
PC, exp_var, components, group_annotation
In [33]:
Copied!
pca_result.plot(color_by="gp1")
pca_result.plot(color_by="gp1")
In [34]:
Copied!
pca_result.plot(color_by="default")
pca_result.plot(color_by="default")
In [35]:
Copied!
tsne_result = agg_gene_data.dim_reduction(method="TSNE")
tsne_result.plot(color_by="gp1")
tsne_result = agg_gene_data.dim_reduction(method="TSNE")
tsne_result.plot(color_by="gp1")
In [36]:
Copied!
tsne_result = agg_gene_data.dim_reduction(method="UMAP")
tsne_result.plot()
tsne_result = agg_gene_data.dim_reduction(method="UMAP")
tsne_result.plot()
C:\Users\qwert\miniconda3\envs\py310\lib\site-packages\umap\umap_.py:2344: UserWarning: n_neighbors is larger than the dataset size; truncating to X.shape[0] - 1 warn(
Medium data¶
In [37]:
Copied!
from pipeGEM.data import MediumData
from pipeGEM.data import MediumData
In [38]:
Copied!
human = load_remote_model("Human-GEM")
human = load_remote_model("Human-GEM")
Model Human-GEM is already downloaded
In [39]:
Copied!
human.summary()
human.summary()
Out[39]:
Objective
1.0 MAR13082 = 187.35362997658078
Uptake
| Metabolite | Reaction | Flux | C-Number | C-Flux |
|---|---|---|---|---|
| MAM01291e | MAR00566 | 0.3888 | 22 | 0.01% |
| MAM01771e | MAR00567 | 0.01104 | 20 | 0.00% |
| MAM01371e | MAR00569 | 1000 | 10 | 10.33% |
| MAM01741e | MAR00571 | 0.1629 | 22 | 0.00% |
| MAM01689e | MAR00573 | 0.4173 | 22 | 0.01% |
| MAM00094e | MAR00575 | 0.1049 | 22 | 0.00% |
| MAM01696e | MAR00576 | 3.583 | 20 | 0.07% |
| MAM02648e | MAR00577 | 0.6377 | 20 | 0.01% |
| MAM01432e | MAR00618 | 0.01104 | 26 | 0.00% |
| MAM02456e | MAR00620 | 0.01104 | 17 | 0.00% |
| MAM02385e | MAR00621 | 0.01104 | 24 | 0.00% |
| MAM00656e | MAR00628 | 23.38 | 9 | 0.22% |
| MAM02564e | MAR00637 | 0.01104 | 24 | 0.00% |
| MAM02646e | MAR00650 | 42.91 | 18 | 0.80% |
| MAM02685e | MAR00656 | 7.903 | 7 | 0.06% |
| MAM02715e | MAR00658 | 1.247 | 8 | 0.01% |
| MAM02808e | MAR00661 | 0.7874 | 8 | 0.01% |
| MAM02690e | MAR00662 | 0.01104 | 15 | 0.00% |
| MAM00135e | MAR00698 | 0.02208 | 24 | 0.00% |
| MAM00111e | MAR00699 | 0.01104 | 24 | 0.00% |
| MAM00132e | MAR00700 | 0.01104 | 24 | 0.00% |
| MAM02494e | MAR00702 | 0.3672 | 14 | 0.01% |
| MAM01802e | MAR01939 | 0.007756 | 27 | 0.00% |
| MAM01605e | MAR01965 | 18.29 | 36 | 0.68% |
| MAM02000e | MAR04148 | 1000 | 26 | 26.86% |
| MAM03494e | MAR04886 | 0.01104 | 10 | 0.00% |
| MAM02635e | MAR04889 | 10.39 | 11 | 0.12% |
| MAM03540e | MAR04923 | 0.01104 | 19 | 0.00% |
| MAM01583e | MAR04927 | 0.01104 | 22 | 0.00% |
| MAM01373e | MAR04929 | 0.01104 | 22 | 0.00% |
| MAM02964e | MAR08959 | 354.8 | 26 | 9.53% |
| MAM03102e | MAR08967 | 0.007756 | 59 | 0.00% |
| MAM02559e | MAR09029 | 0.3895 | 5 | 0.00% |
| MAM02389e | MAR09036 | 0.3009 | 18 | 0.01% |
| MAM02125e | MAR09038 | 23.02 | 6 | 0.14% |
| MAM02184e | MAR09039 | 45.12 | 6 | 0.28% |
| MAM02360e | MAR09040 | 92.02 | 6 | 0.57% |
| MAM02426e | MAR09041 | 72.16 | 6 | 0.45% |
| MAM02471e | MAR09042 | 22.54 | 5 | 0.12% |
| MAM02724e | MAR09043 | 38.17 | 9 | 0.35% |
| MAM02993e | MAR09044 | 57.01 | 4 | 0.24% |
| MAM03089e | MAR09045 | 9.891 | 11 | 0.11% |
| MAM03135e | MAR09046 | 67.5 | 5 | 0.35% |
| MAM02630e | MAR09048 | 186.7 | 0 | 0.00% |
| MAM02353e | MAR09051 | 0.0003146 | 94027 | 0.03% |
| MAM01307e | MAR09061 | 81.11 | 3 | 0.25% |
| MAM01369e | MAR09062 | 37.61 | 4 | 0.16% |
| MAM01975e | MAR09063 | 56.55 | 5 | 0.29% |
| MAM03101e | MAR09064 | 28.59 | 9 | 0.27% |
| MAM02770e | MAR09068 | 160.4 | 5 | 0.83% |
| MAM02896e | MAR09069 | 68.65 | 3 | 0.21% |
| MAM01370e | MAR09070 | 63.44 | 4 | 0.26% |
| MAM02042e | MAR09103 | 18.35 | 0 | 0.00% |
| MAM02049e | MAR09107 | 0.007756 | 34 | 0.00% |
| MAM01704e | MAR09108 | 666.7 | 9 | 6.20% |
| MAM01401e | MAR09109 | 0.007756 | 10 | 0.00% |
| MAM02842e | MAR09143 | 0.007756 | 17 | 0.00% |
| MAM02834e | MAR09147 | 0.03483 | 20 | 0.00% |
| MAM01330e | MAR09152 | 0.007756 | 29 | 0.00% |
| MAM01938e | MAR09154 | 0.007756 | 28 | 0.00% |
| MAM02982e | MAR09159 | 0.007756 | 12 | 0.00% |
| MAM02394e | MAR09167 | 0.007756 | 8 | 0.00% |
| MAM01415e | MAR09215 | 0.0116 | 27 | 0.00% |
| MAM01280e | MAR09254 | 600.5 | 10 | 6.20% |
| MAM01361e | MAR09269 | 0.007756 | 62 | 0.00% |
| MAM01397e | MAR09271 | 0.003867 | 45 | 0.00% |
| MAM01398e | MAR09272 | 0.05435 | 39 | 0.00% |
| MAM01450e | MAR09285 | 4.573 | 27 | 0.13% |
| MAM01630e | MAR09295 | 6.789 | 9 | 0.06% |
| MAM01669e | MAR09300 | 708.1 | 10 | 7.32% |
| MAM01671e | MAR09305 | 237.3 | 10 | 2.45% |
| MAM02038e | MAR09348 | 246.2 | 10 | 2.54% |
| MAM02026e | MAR09351 | 1.64 | 10 | 0.02% |
| MAM02041e | MAR09354 | 1000 | 0 | 0.00% |
| MAM02470e | MAR09372 | 56.07 | 1 | 0.06% |
| MAM02583e | MAR09378 | 0.3533 | 6 | 0.00% |
| MAM02833e | MAR09404 | 0.05035 | 20 | 0.00% |
| MAM03130e | MAR09440 | 66.42 | 9 | 0.62% |
| MAM02814e | MAR09691 | 0.007756 | 8 | 0.00% |
| MAM03161e | MAR09729 | 76.1 | 6 | 0.47% |
| MAM00674e | MAR09842 | 0.3261 | 3 | 0.00% |
| MAM01644e | MAR09847 | 1.019 | 9 | 0.01% |
| MAM02696e | MAR09858 | 12.47 | 3 | 0.04% |
| MAM03149e | MAR09861 | 153.3 | 10 | 1.58% |
| MAM02940e | MAR09924 | 4.837 | 25 | 0.12% |
| MAM02411e | MAR09925 | 6.733 | 23 | 0.16% |
| MAM02122e | MAR10250 | 2.138 | 27 | 0.06% |
| MAM02388e | MAR10254 | 5.367 | 25 | 0.14% |
| MAM02497e | MAR10265 | 336.9 | 6 | 2.09% |
| MAM02974e | MAR10345 | 0.01104 | 21 | 0.00% |
| MAM01584e | MAR10432 | 0.01104 | 20 | 0.00% |
| MAM00916e | MAR10441 | 0.2265 | 3 | 0.00% |
| MAM02978e | MAR10496 | 0.007756 | 9 | 0.00% |
| MAM03684e | MAR11293 | 1000 | 6 | 6.20% |
| MAM01620e | MAR11349 | 262.3 | 4 | 1.08% |
| MAM02579e | MAR11420 | 18.35 | 0 | 0.00% |
| MAM01973e | MAR11424 | 0.007756 | 6 | 0.00% |
| MAM00350e | MAR11895 | 0.01938 | 20 | 0.00% |
| MAM01231e | MAR11897 | 0.003867 | 20 | 0.00% |
| MAM02117e | MAR11949 | 0.01104 | 23 | 0.00% |
| MAM01045e | MAR11953 | 0.007756 | 20 | 0.00% |
| MAM02927e | MAR11959 | 277.7 | 18 | 5.16% |
| MAM01417e | MAR11965 | 0.003867 | 27 | 0.00% |
| MAM01841e | MAR11974 | 577.5 | 6 | 3.58% |
| MAM02750e | MAR12127 | 2.868 | 11 | 0.03% |
| MAM00003e | MAR13040 | 0.01104 | 17 | 0.00% |
| MAM00008e | MAR13041 | 0.01104 | 20 | 0.00% |
| MAM00010e | MAR13042 | 0.01104 | 20 | 0.00% |
| MAM00017e | MAR13043 | 0.01104 | 20 | 0.00% |
| MAM00021e | MAR13045 | 0.01104 | 22 | 0.00% |
| MAM00117e | MAR13047 | 0.01104 | 14 | 0.00% |
| MAM00260e | MAR13048 | 0.01104 | 22 | 0.00% |
| MAM00265e | MAR13049 | 0.01104 | 22 | 0.00% |
| MAM00315e | MAR13050 | 0.01104 | 24 | 0.00% |
| MAM00341e | MAR13051 | 0.01104 | 22 | 0.00% |
| MAM01207e | MAR13053 | 0.01104 | 20 | 0.00% |
| MAM01238e | MAR13055 | 0.01104 | 17 | 0.00% |
| MAM01582e | MAR13056 | 0.01104 | 22 | 0.00% |
| MAM02053e | MAR13057 | 0.01104 | 21 | 0.00% |
| MAM02457e | MAR13058 | 0.01104 | 20 | 0.00% |
| MAM02613e | MAR13059 | 0.01104 | 19 | 0.00% |
| MAM02745e | MAR13060 | 0.01104 | 14 | 0.00% |
| MAM03045e | MAR13061 | 0.01104 | 23 | 0.00% |
| MAM03051e | MAR13062 | 0.01104 | 13 | 0.00% |
| MAM03153e | MAR13063 | 0.01104 | 26 | 0.00% |
Secretion
| Metabolite | Reaction | Flux | C-Number | C-Flux |
|---|---|---|---|---|
| MAM01155e | MAR01871 | -666.7 | 9 | 6.69% |
| MAM03127e | MAR01964 | -18.29 | 40 | 0.82% |
| MAM02402e | MAR04164 | -669 | 24 | 17.91% |
| MAM01965e | MAR09034 | -136.7 | 6 | 0.92% |
| MAM02352e | MAR09055 | -0.0003146 | 33247 | 0.01% |
| MAM02751e | MAR09072 | -1000 | 0 | 0.00% |
| MAM02046e | MAR09078 | -34.69 | 1 | 0.04% |
| MAM02819e | MAR09133 | -585.1 | 3 | 1.96% |
| MAM02403e | MAR09135 | -403.3 | 3 | 1.35% |
| MAM01249e | MAR09242 | -1000 | 2 | 2.23% |
| MAM01279e | MAR09253 | -1000 | 5 | 5.58% |
| MAM01285e | MAR09255 | -592.1 | 10 | 6.61% |
| MAM01396e | MAR09273 | -0.05822 | 33 | 0.00% |
| MAM01619e | MAR09290 | -262.3 | 4 | 1.17% |
| MAM02037e | MAR09353 | -945.8 | 5 | 5.28% |
| MAM02167e | MAR09360 | -237.3 | 10 | 2.65% |
| MAM02843e | MAR09406 | -1000 | 5 | 5.58% |
| MAM02961e | MAR09418 | -354.8 | 2 | 0.79% |
| MAM02997e | MAR09422 | -54.57 | 5 | 0.30% |
| MAM01989e | MAR09463 | -354.8 | 26 | 10.29% |
| MAM01410e | MAR09809 | -12.53 | 4 | 0.06% |
| MAM02120e | MAR09811 | -1000 | 6 | 6.69% |
| MAM02642e | MAR09813 | -11.23 | 8 | 0.10% |
| MAM03150e | MAR09860 | -153.3 | 10 | 1.71% |
| MAM00105e | MAR09922 | -27.37 | 25 | 0.76% |
| MAM03971e | MAR10024 | -187.4 | 0 | 0.00% |
| MAM00235e | MAR10047 | -2.54 | 5 | 0.01% |
| MAM03445e | MAR10513 | -285.6 | 10 | 3.19% |
| MAM03190e | MAR11491 | -0.02327 | 6 | 0.00% |
| MAM01759e | MAR11942 | -519.8 | 5 | 2.90% |
| MAM02929e | MAR11947 | -275.2 | 18 | 5.53% |
| MAM03209e | MAR12202 | -331 | 24 | 8.86% |
In [40]:
Copied!
# load default medium
dmem_medium = MediumData.from_file("DMEM", id_col_label="human_1")
# load default medium
dmem_medium = MediumData.from_file("DMEM", id_col_label="human_1")
In [41]:
Copied!
human = pg.Model(model=human, name_tag="human")
human = pg.Model(model=human, name_tag="human")
In [42]:
Copied!
human.add_medium_data(name="dmem", data=dmem_medium)
human.add_medium_data(name="dmem", data=dmem_medium)
In [43]:
Copied!
human.apply_medium(name="dmem")
human.apply_medium(name="dmem")
MAR09047 is an inorganic exchange reaction (not constrained) MAR09073 is an inorganic exchange reaction (not constrained) MAR09079 is an inorganic exchange reaction (not constrained) MAR09088 is an inorganic exchange reaction (not constrained) MAR09103 is an inorganic exchange reaction (not constrained) MAR09148 is an inorganic exchange reaction (not constrained) MAR09149 is an inorganic exchange reaction (not constrained) MAR09162 is an inorganic exchange reaction (not constrained) MAR09169 is an inorganic exchange reaction (not constrained) MAR09204 is an inorganic exchange reaction (not constrained) MAR09354 is an inorganic exchange reaction (not constrained) MAR09381 is an inorganic exchange reaction (not constrained) MAR09383 is an inorganic exchange reaction (not constrained) MAR09386 is an inorganic exchange reaction (not constrained) MAR09432 is an inorganic exchange reaction (not constrained) MAR09703 is an inorganic exchange reaction (not constrained) MAR04154 is an inorganic exchange reaction (not constrained) MAR04155 is an inorganic exchange reaction (not constrained) MAR11405 is an inorganic exchange reaction (not constrained) MAR11420 is an inorganic exchange reaction (not constrained) MAR11906 is an inorganic exchange reaction (not constrained) MAR11982 is an inorganic exchange reaction (not constrained) MAR11983 is an inorganic exchange reaction (not constrained) MAR11984 is an inorganic exchange reaction (not constrained) MAR11985 is an inorganic exchange reaction (not constrained) MAR13068 is an inorganic exchange reaction (not constrained) MAR13072 is an inorganic exchange reaction (not constrained) MAR10024 is an inorganic exchange reaction (not constrained) MAR10028 is an inorganic exchange reaction (not constrained)
In [44]:
Copied!
human.summary()
human.summary()
Out[44]:
Objective
1.0 MAR13082 = 75.83141020981205
Uptake
| Metabolite | Reaction | Flux | C-Number | C-Flux |
|---|---|---|---|---|
| MAM02685e | MAR00656 | 1000 | 7 | 18.49% |
| MAM01965e | MAR09034 | 160.2 | 6 | 2.54% |
| MAM02125e | MAR09038 | 393.7 | 6 | 6.24% |
| MAM02184e | MAR09039 | 18.26 | 6 | 0.29% |
| MAM02360e | MAR09040 | 37.25 | 6 | 0.59% |
| MAM02426e | MAR09041 | 29.21 | 6 | 0.46% |
| MAM02471e | MAR09042 | 12.98 | 5 | 0.17% |
| MAM02724e | MAR09043 | 15.45 | 9 | 0.37% |
| MAM02993e | MAR09044 | 23.08 | 4 | 0.24% |
| MAM03089e | MAR09045 | 4.003 | 11 | 0.12% |
| MAM03135e | MAR09046 | 27.32 | 5 | 0.36% |
| MAM02630e | MAR09048 | 1000 | 0 | 0.00% |
| MAM01975e | MAR09063 | 2488 | 5 | 32.86% |
| MAM03101e | MAR09064 | 11.57 | 9 | 0.28% |
| MAM01365e | MAR09066 | 284.1 | 6 | 4.50% |
| MAM02896e | MAR09069 | 51.35 | 3 | 0.41% |
| MAM01974e | MAR09071 | 520.4 | 5 | 6.87% |
| MAM01821e | MAR09076 | 0.003139 | 0 | 0.00% |
| MAM01513e | MAR09083 | 9.47 | 5 | 0.13% |
| MAM02042e | MAR09103 | 698.9 | 0 | 0.00% |
| MAM01401e | MAR09109 | 0.003139 | 10 | 0.00% |
| MAM02819e | MAR09133 | 2700 | 3 | 21.40% |
| MAM02842e | MAR09143 | 0.006279 | 17 | 0.00% |
| MAM02817e | MAR09144 | 0.003139 | 8 | 0.00% |
| MAM02680e | MAR09145 | 0.8653 | 9 | 0.02% |
| MAM01830e | MAR09146 | 62.54 | 19 | 3.14% |
| MAM02834e | MAR09147 | 0.04389 | 20 | 0.00% |
| MAM01330e | MAR09152 | 0.003139 | 29 | 0.00% |
| MAM01938e | MAR09154 | 0.003139 | 28 | 0.00% |
| MAM02982e | MAR09159 | 0.003139 | 12 | 0.00% |
| MAM02394e | MAR09167 | 0.003139 | 8 | 0.00% |
| MAM01361e | MAR09269 | 0.003139 | 62 | 0.00% |
| MAM02041e | MAR09354 | 1000 | 0 | 0.00% |
| MAM02159e | MAR09358 | 7.742 | 5 | 0.10% |
| MAM02171e | MAR09361 | 1.164 | 6 | 0.02% |
| MAM02583e | MAR09378 | 0.143 | 6 | 0.00% |
| MAM02631e | MAR09383 | 1000 | 0 | 0.00% |
| MAM02147e | MAR09386 | 62.53 | 0 | 0.00% |
| MAM02996e | MAR09423 | 15.7 | 10 | 0.41% |
Secretion
| Metabolite | Reaction | Flux | C-Number | C-Flux |
|---|---|---|---|---|
| MAM02675e | MAR00617 | -354.2 | 16 | 10.98% |
| MAM03560e | MAR04936 | -0.3883 | 22 | 0.02% |
| MAM01596e | MAR09058 | -1000 | 1 | 1.94% |
| MAM01307e | MAR09061 | -1000 | 3 | 5.81% |
| MAM01628e | MAR09065 | -689.9 | 3 | 4.01% |
| MAM02751e | MAR09072 | -960.1 | 0 | 0.00% |
| MAM02578e | MAR09073 | -482.8 | 0 | 0.00% |
| MAM02046e | MAR09078 | -1000 | 1 | 1.94% |
| MAM02039e | MAR09079 | -1000 | 0 | 0.00% |
| MAM01797e | MAR09084 | -988.4 | 2 | 3.83% |
| MAM02658e | MAR09087 | -1.71 | 5 | 0.02% |
| MAM02403e | MAR09135 | -1000 | 3 | 5.81% |
| MAM10005e | MAR09209 | -1000 | 1 | 1.94% |
| MAM01115e | MAR09234 | -62.53 | 20 | 2.42% |
| MAM01249e | MAR09242 | -7.736 | 2 | 0.03% |
| MAM01833e | MAR09318 | -2.14 | 1 | 0.00% |
| MAM02362e | MAR09364 | -26.12 | 20 | 1.01% |
| MAM00325e | MAR09443 | -1.165 | 12 | 0.03% |
| MAM00371e | MAR09444 | -12.91 | 14 | 0.35% |
| MAM00403e | MAR09445 | -216.5 | 16 | 6.71% |
| MAM01682e | MAR09685 | -116.6 | 6 | 1.35% |
| MAM02642e | MAR09813 | -3.204 | 8 | 0.05% |
| MAM03117e | MAR09816 | -1.942 | 11 | 0.04% |
| MAM03971e | MAR10024 | -75.83 | 0 | 0.00% |
| MAM01209e | MAR10145 | -161.6 | 20 | 6.26% |
| MAM01216e | MAR10217 | -185.9 | 18 | 6.48% |
| MAM03569e | MAR10228 | -0.3883 | 20 | 0.02% |
| MAM00128e | MAR10442 | -0.3883 | 14 | 0.01% |
| MAM03415e | MAR10501 | -351.4 | 12 | 8.17% |
| MAM03464e | MAR10532 | -263.3 | 13 | 6.63% |
| MAM03473e | MAR10541 | -3.86 | 13 | 0.10% |
| MAM03903e | MAR10663 | -325.8 | 15 | 9.47% |
| MAM01862e | MAR11400 | -987.6 | 4 | 7.65% |
| MAM02439e | MAR11404 | -683.2 | 4 | 5.30% |
| MAM02579e | MAR11420 | -1000 | 0 | 0.00% |
| MAM03777e | MAR11508 | -124.7 | 6 | 1.45% |
| MAM00010e | MAR13042 | -0.3883 | 20 | 0.02% |
| MAM00021e | MAR13045 | -0.3883 | 22 | 0.02% |
| MAM00260e | MAR13048 | -0.3883 | 22 | 0.02% |
| MAM00265e | MAR13049 | -0.3883 | 22 | 0.02% |
| MAM00315e | MAR13050 | -0.3883 | 24 | 0.02% |
| MAM00341e | MAR13051 | -0.3883 | 22 | 0.02% |
| MAM01207e | MAR13053 | -0.3883 | 20 | 0.02% |
| MAM01235e | MAR13054 | -0.3883 | 20 | 0.02% |
| MAM01582e | MAR13056 | -0.3883 | 22 | 0.02% |
| MAM02457e | MAR13058 | -0.3883 | 20 | 0.02% |
In [ ]:
Copied!