metevolsim(元色演化模拟器)python包
MetEvolSim的Python项目详细描述
气象模拟
metevolsim是一个python包,提供了研究代谢浓度长期演变的数值工具。 MetEvolSim作为一个输入任何SBML代谢网络模型,一旦动力学参数和初始代谢浓度被指定,并且存在稳定的稳态。通过Copasi软件计算稳态浓度。
Metevolsim正由查尔斯·罗卡伯特、戈博尔·博罗斯和巴尔茨·帕普开发。
目录
依赖关系
- Python ≥ 3,
- Numpy ≥ 1.15 (automatically installed when using pip),
- Python-libsbml ≥ 5.17 (automatically installed when using pip),
- pip ≥ 19.1 (optional).
Installation
• To install Copasi software, visit http://copasi.org/。
•要安装python依赖项:
pip install numpy python-libsbml
•要安装当前版本的Metevolsim:
pip install MetEvolSim
或者,下载您选择的文件夹中的latest release并解压缩它。然后按照以下说明操作:
# Navigate to the MetEvolSim foldercd /path/to/MetEvolSim # Install metevolsim Python package python3 setup.py install
首次使用
MeTeaSIM作为一个输入,任何{a3}代谢网络模型,只要指定动力学参数和初始代谢浓度,并且存在稳定的稳态。metevolsim提供了一个类来操作sbml模型:类Model
。还需要定义一个目标函数(反应名称和系数的列表),并提供copasise软件的路径。
# Import metevolsim packageimportMetEvolSim# Create an objective functiontarget_fluxes=[['ATPase',1.0],['PDC',1.0]]# Load the SBML metabolic modelmodel=MetEvolSim.Model(sbml_filename='glycolysis.xml',objective_function=target_fluxes,copasi_path='/Applications/COPASI/CopasiSE')# Print some informations on the metabolic modelprint(model.get_number_of_species())print(model.get_WT_species_value('Glc'))# Get a kinetic parameter at randomparam=model.get_random_parameter()print(param)# Mutate this kinetic parameter with a log-scale mutation size 0.01model.random_parameter_mutation(param,sigma=0.01)# Compute wild-type and mutant steady-statesmodel.compute_WT_steady_state()model.compute_mutant_steady_state()
metevolsim允许对sbml代谢模型进行两种类型的数值分析:
- 进化实验,基于马尔可夫链蒙特卡罗(mcmc)算法,
- 敏感性分析,通过探索给定范围内的每个动力学参数,记录相关的通量和代谢丰度变化。
所有数值分析输出文件都保存在由metevolsim自动创建的子文件夹output
中。
进化实验:
有三种进化实验可供选择:
MUTATION_ACCUMULATION
:在没有任何选择阈值的情况下接受所有新的突变,进行突变累积实验,METABOLIC_SUM_SELECTION
:通过对代谢丰度之和应用稳定选择来运行一个进化实验,TARGET_FLUXES_SELECTION
:对目标函数应用稳定选择来运行一个进化实验。
# Load a Markov Chain Monte Carlo (MCMC) instancemcmc=MetEvolSim.MCMC(sbml_filename='glycolysis.xml',objective_function=target_fluxes,total_iterations=10000,sigma=0.01,selection_scheme="MUTATION_ACCUMULATION",selection_threshold=1e-4,copasi_path='/Applications/COPASI/CopasiSE')# Initialize the MCMC instance mcmc.initialize()# Compute the successive iterations and write output filesstop_MCMC=Falsewhilenotstop_MCMC:stop_mcmc=mcmc.iterate()mcmc.write_output_file()mcmc.write_statistics()
敏感性分析:
# Load a sensitivity analysis instancesa=MetEvolSim.SensitivityAnalysis(sbml_filename='glycolysis.xml',factor_range=1.0,factor_step=0.01,copasi_path='/Applications/COPASI/CopasiSE')# Initialize the sensitivity analysis instance sa.initialize()# Perform the sensitivity analysis for each kinetic parameterstop_SA=Falsewhilenotstop_SA:stop_SA=sa.explore_next_parameter()
帮助
要获得有关metevolsim类或方法的帮助,请使用python帮助函数:
help(MetEvolSim.Model.set_species_initial_value)
要获得快速描述以及参数和输出列表:
Help on function set_species_initial_value in module MetEvolSim:
set_species_initial_value(self, species_id, value)
Set the initial concentration of the species 'species_id' in the
mutant model.
Parameters
----------
species_id: str
Species identifier (as defined in the SBML model).
value: float >= 0.0
Species abundance.
Returns
-------
None
(END)
版权所有
版权所有©2018-2019 Charles Rocabert、Gábor boross和Balázs Papp。 保留所有权利。
许可证
此程序是自由软件:您可以根据自由软件基金会发布的GNU通用公共许可证(许可证的第3版或(由您选择)任何更高版本)的条款重新分发和/或修改它。
这个程序被分发,希望它是有用的,但是没有任何保证;甚至没有对适销性或适合特定用途的默示保证。有关更多详细信息,请参阅GNU通用公共许可证。
您应该已经收到一份GNU通用公共许可证的副本和这个程序。如果没有,请参阅http://www.gnu.org/licenses/。