{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simulating MDV at Steady State" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Metabolic flux analysis involves simulating the labeling pattern of metabolites at a defined flux distribution in a given metabolic network. In this tutorial, we will demonstrate how to simulate the labeling pattern of metabolites using FreeFlux. We will use a [toy model](https://github.com/Chaowu88/freeflux/tree/main/models/toy) to illustrate the process." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We start by loading the metabolic model from a tab-separated values (tsv) [file](https://github.com/Chaowu88/freeflux/blob/main/models/toy/reactions.tsv). We then create a Simulator object for steady-state simulation ('ss'). We call the `set_target_EMUs method` to specify the EMUs whose MDVs need to be simulated." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from freeflux import Model\n", "\n", "MODEL_FILE = 'path/to/reactions.tsv'\n", "\n", "model = Model('demo')\n", "model.read_from_file(MODEL_FILE)\n", "\n", "sim = model.simulator('ss')\n", "sim.set_target_EMUs({\n", " 'Glu': [[1,2,3], '12345'], # EMU \"Glu_123\" and \"Glu_12345\"\n", " 'AKG': [2,3], # EMU \"AKG_23\"\n", " 'Cit': '12345' # EMU \"Cit_12345\"\n", "}) " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next, we specify the labeling strategy for the metabolic network. In this toy model, the network uptakes 25% (mol%) C2 labeled and 25% fully labeled acetyl-CoA with both 100% purities." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "sim.set_labeling_strategy(\n", " 'AcCoA', \n", " labeling_pattern = ['01', '11'], \n", " percentage = [0.25, 0.25], \n", " purity = [1, 1]\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "