Processing and integrating data with genome-scale metabolic models (GEM)
Project description
PipeGEM v0.1.0-alpha1
This is a package for visualizing and analyzing metabolic models. Also, it allows users to integrate omic data, metabolic tasks, and medium data with GEMs. The analysis functions in the package are based on cobrapy: https://cobrapy.readthedocs.io/en/latest/
How to get PipeGEM
To install directly from PyPI:
pip install pipegem
How to use this package
single model
import pipeGEM as pg
from pipeGEM.utils import load_model
model = load_model("your_model_path") # cobra.Model
pmodel = pg.Model(model)
# Print out model information
print(pmodel)
# Do and plot pFBA result
flux_analysis = pmodel.do_flux_analysis("pFBA")
flux_analysis.plot()
multiple models
import pipeGEM as pg
from pipeGEM.utils import load_model
model_1 = load_model("your_model_path_1")
model_2 = load_model("your_model_path_2")
group = pg.Group({"model1": model_1, "model2": model_2})
# Do and plot pFBA result
flux_analysis = group.do_flux_analysis("pFBA")
flux_analysis.plot()
Generate context-specific models
import numpy as np
import pipeGEM as pg
from pipeGEM.utils import load_model
from pipeGEM.data import GeneData, synthesis
# initialize model
mod = pg.Model(load_model("your_model_path_1"))
# create dummy transcriptomic data
dummy_data = synthesis.get_syn_gene_data(mod, n_sample=3)
# calculate reaction activity score
gene_data = GeneData(data=dummy_data["sample_0"], # pd.Series or a dict
data_transform=lambda x: np.log2(x), # callable
absent_expression=-np.inf) # value
mod.add_gene_data(name_or_prefix="sample_0", # name of the data
data=gene_data,
or_operation="nanmax", # alternative: nansum
threshold=-np.inf,
absent_value=-np.inf)
# apply GIMME algorithm on the model
gimme_result = mod.integrate_gene_data(data_name="sample_0", integrator="GIMME")
context_specific_gem = gimme_result.result_model
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pipeGEM-0.0.1a1.tar.gz
(132.8 kB
view hashes)
Built Distribution
pipeGEM-0.0.1a1-py3-none-any.whl
(144.9 kB
view hashes)
Close
Hashes for pipeGEM-0.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d17a9a64dea94eb99fdd89e1d34f65fddc9c5a0fa38c195af28149c32a13eb7 |
|
MD5 | f77faeb847aaa3734e75758a616b3e70 |
|
BLAKE2b-256 | 7e68db7b1de3ae279a933538b7c601d1e90af22695325a22f4aa6c707cafe22f |