{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Single Model API\n", "\n", "## Building communities\n", "\n", "`micom` will construct communities from a specification via a Pandas DataFrame. Here, the DataFrame needs at least two columns: \"id\" and \"file\" which specify the ID of the organism/tissue and a file containing the actual individual model. \n", "\n", "To make more sense of that we can look at a small example. `micom` comes with a function that generates a simple example community specification consisting of several copies of a small *E. coli* model containing only the central carbon metabolism." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "genus | \n", "species | \n", "reactions | \n", "metabolites | \n", "file | \n", "
---|---|---|---|---|---|---|
0 | \n", "Escherichia_coli_1 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "
1 | \n", "Escherichia_coli_2 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "
2 | \n", "Escherichia_coli_3 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "
3 | \n", "Escherichia_coli_4 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "
\n", " | id | \n", "genus | \n", "species | \n", "reactions | \n", "metabolites | \n", "file | \n", "abundance | \n", "
---|---|---|---|---|---|---|---|
id | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
Escherichia_coli_1 | \n", "Escherichia_coli_1 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "0.25 | \n", "
Escherichia_coli_2 | \n", "Escherichia_coli_2 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "0.25 | \n", "
Escherichia_coli_3 | \n", "Escherichia_coli_3 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "0.25 | \n", "
Escherichia_coli_4 | \n", "Escherichia_coli_4 | \n", "Escherichia | \n", "Escherichia coli | \n", "95 | \n", "72 | \n", "/home/cdiener/code/micom/micom/data/e_coli_cor... | \n", "0.25 | \n", "
\n", " | organism | \n", "seedid | \n", "kingdom | \n", "phylum | \n", "mclass | \n", "order | \n", "family | \n", "genus | \n", "oxygenstat | \n", "metabolism | \n", "... | \n", "draftcreated | \n", "phenotype | \n", "imgid | \n", "ncbiid | \n", "platform | \n", "kbaseid | \n", "species | \n", "file | \n", "id | \n", "taxa_id | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "Abiotrophia defectiva ATCC 49176 | \n", "Abiotrophia defectiva ATCC 49176 (592010.4) | \n", "Bacteria | \n", "Firmicutes | \n", "Bacilli | \n", "Lactobacillales | \n", "Aerococcaceae | \n", "Abiotrophia | \n", "Facultative anaerobe | \n", "Saccharolytic, fermentative or respiratory | \n", "... | \n", "07/01/14 | \n", "1.0 | \n", "2.562617e+09 | \n", "592010.0 | \n", "ModelSEED | \n", "NaN | \n", "defectiva | \n", "models/Abiotrophia_defectiva_ATCC_49176.xml | \n", "Abiotrophia_defectiva_ATCC_49176 | \n", "46125.0 | \n", "
1 | \n", "Achromobacter xylosoxidans A8 | \n", "Achromobacter xylosoxidans A8 (762376.5) | \n", "Bacteria | \n", "Proteobacteria | \n", "Betaproteobacteria | \n", "Burkholderiales | \n", "Alcaligenaceae | \n", "Achromobacter | \n", "Aerobe | \n", "Respiratory | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "762376.0 | \n", "ModelSEED | \n", "kb_g_3268_model_gf | \n", "xylosoxidans | \n", "models/Achromobacter_xylosoxidans_A8.xml | \n", "Achromobacter_xylosoxidans_A8 | \n", "85698.0 | \n", "
2 | \n", "Achromobacter xylosoxidans NBRC 15126 = ATCC 2... | \n", "NaN | \n", "Bacteria | \n", "Proteobacteria | \n", "Betaproteobacteria | \n", "Burkholderiales | \n", "Alcaligenaceae | \n", "Achromobacter | \n", "Aerobe | \n", "Respiratory | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "1216976.0 | \n", "Kbase | \n", "kb|g.208127 | \n", "xylosoxidans | \n", "models/Achromobacter_xylosoxidans_NBRC_15126.xml | \n", "Achromobacter_xylosoxidans_NBRC_15126 | \n", "85698.0 | \n", "
3 | \n", "Acidaminococcus fermentans DSM 20731 | \n", "Acidaminococcus fermentans DSM 20731 (591001.3) | \n", "Bacteria | \n", "Firmicutes | \n", "Negativicutes | \n", "Acidaminococcales | \n", "Acidaminococcaceae | \n", "Acidaminococcus | \n", "Obligate anaerobe | \n", "Fermentative | \n", "... | \n", "04/17/16 | \n", "NaN | \n", "6.463119e+08 | \n", "591001.0 | \n", "Kbase | \n", "kb|g.2555 | \n", "fermentans | \n", "models/Acidaminococcus_fermentans_DSM_20731.xml | \n", "Acidaminococcus_fermentans_DSM_20731 | \n", "905.0 | \n", "
4 | \n", "Acidaminococcus intestini RyC-MR95 | \n", "Acidaminococcus intestini RyC-MR95 (568816.4) | \n", "Bacteria | \n", "Firmicutes | \n", "Negativicutes | \n", "Selenomonadales | \n", "Acidaminococcaceae | \n", "Acidaminococcus | \n", "Obligate anaerobe | \n", "Asaccharolytic, glutamate is fermented | \n", "... | \n", "08/03/14 | \n", "4.0 | \n", "2.511231e+09 | \n", "568816.0 | \n", "Kbase | \n", "NaN | \n", "intestini | \n", "models/Acidaminococcus_intestini_RyC_MR95.xml | \n", "Acidaminococcus_intestini_RyC_MR95 | \n", "187327.0 | \n", "
5 rows × 26 columns
\n", "