Skip to content

Commit

Permalink
Merge branch 'cshenry-main' into main_copy
Browse files Browse the repository at this point in the history
  • Loading branch information
freiburgermsu committed Jul 19, 2023
2 parents 8bb7300 + 4914110 commit 332672b
Show file tree
Hide file tree
Showing 27 changed files with 3,589 additions and 1,329 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,8 @@ dmypy.json
.pyre/


*.FASTQ/
*.FASTQ/
.pydevproject
.settings/*
*data/*
*.lp
162 changes: 156 additions & 6 deletions examples/Model Reconstruction/Biomass.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"id": "5434992c-fc67-40f5-ae08-82f44790666c",
"metadata": {},
"outputs": [],
"source": [
"from modelseedpy.helpers import get_template\n",
"from modelseedpy.core.mstemplate import MSTemplateBuilder"
"import modelseedpy"
]
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 2,
"id": "b243e00a-4a8b-489d-a778-61844a439e63",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"cobrakbase 0.2.8\n"
"cobrakbase 0.3.1\n"
]
}
],
Expand All @@ -30,6 +29,157 @@
"kbase = cobrakbase.KBaseAPI()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "3a177c16-ecb0-4050-bbf5-47aad10f2af9",
"metadata": {},
"outputs": [],
"source": [
"template = kbase.get_from_ws('GramNegModelTemplateV3', 'NewKBaseModelTemplates')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "4ce52552-dce2-4c44-9884-cf00d15e76ab",
"metadata": {},
"outputs": [],
"source": [
"from modelseedpy import MSBuilder"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "6f216f6a-5e25-4697-bf6b-9ae63475b5c7",
"metadata": {},
"outputs": [],
"source": [
"from cobra.core import Model\n",
"model = Model('test')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "d9763d58-daba-4751-811f-23581b390025",
"metadata": {},
"outputs": [],
"source": [
"biomass = template.biomasses[0]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "d3e884ac-2568-445a-ac04-1508b536c88a",
"metadata": {},
"outputs": [],
"source": [
"reaction = biomass.build_biomass(model, '0', True)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "f5140ac5-273f-4eb5-b806-ddd9178b252e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"cpd00010_c0 {'modelseed_template_id': 'cpd00010_c'}\n",
"cpd11493_c0 {'modelseed_template_id': 'cpd11493_c'}\n",
"cpd12370_c0 {'modelseed_template_id': 'cpd12370_c'}\n",
"cpd00003_c0 {'modelseed_template_id': 'cpd00003_c'}\n",
"cpd00006_c0 {'modelseed_template_id': 'cpd00006_c'}\n",
"cpd00205_c0 {'modelseed_template_id': 'cpd00205_c'}\n",
"cpd00254_c0 {'modelseed_template_id': 'cpd00254_c'}\n",
"cpd10516_c0 {'modelseed_template_id': 'cpd10516_c'}\n",
"cpd00063_c0 {'modelseed_template_id': 'cpd00063_c'}\n",
"cpd00009_c0 {'modelseed_template_id': 'cpd00009_c'}\n",
"cpd00099_c0 {'modelseed_template_id': 'cpd00099_c'}\n",
"cpd00149_c0 {'modelseed_template_id': 'cpd00149_c'}\n",
"cpd00058_c0 {'modelseed_template_id': 'cpd00058_c'}\n",
"cpd00015_c0 {'modelseed_template_id': 'cpd00015_c'}\n",
"cpd10515_c0 {'modelseed_template_id': 'cpd10515_c'}\n",
"cpd00030_c0 {'modelseed_template_id': 'cpd00030_c'}\n",
"cpd00048_c0 {'modelseed_template_id': 'cpd00048_c'}\n",
"cpd00034_c0 {'modelseed_template_id': 'cpd00034_c'}\n",
"cpd00016_c0 {'modelseed_template_id': 'cpd00016_c'}\n",
"cpd00220_c0 {'modelseed_template_id': 'cpd00220_c'}\n",
"cpd00017_c0 {'modelseed_template_id': 'cpd00017_c'}\n",
"cpd00201_c0 {'modelseed_template_id': 'cpd00201_c'}\n",
"cpd00087_c0 {'modelseed_template_id': 'cpd00087_c'}\n",
"cpd00345_c0 {'modelseed_template_id': 'cpd00345_c'}\n",
"cpd00042_c0 {'modelseed_template_id': 'cpd00042_c'}\n",
"cpd00028_c0 {'modelseed_template_id': 'cpd00028_c'}\n",
"cpd00557_c0 {'modelseed_template_id': 'cpd00557_c'}\n",
"cpd00264_c0 {'modelseed_template_id': 'cpd00264_c'}\n",
"cpd00118_c0 {'modelseed_template_id': 'cpd00118_c'}\n",
"cpd00056_c0 {'modelseed_template_id': 'cpd00056_c'}\n",
"cpd15560_c0 {'modelseed_template_id': 'cpd15560_c'}\n",
"cpd15352_c0 {'modelseed_template_id': 'cpd15352_c'}\n",
"cpd15500_c0 {'modelseed_template_id': 'cpd15500_c'}\n",
"cpd00166_c0 {'modelseed_template_id': 'cpd00166_c'}\n",
"cpd01997_c0 {'modelseed_template_id': 'cpd01997_c'}\n",
"cpd03422_c0 {'modelseed_template_id': 'cpd03422_c'}\n",
"cpd00104_c0 {'modelseed_template_id': 'cpd00104_c'}\n",
"cpd00037_c0 {'modelseed_template_id': 'cpd00037_c'}\n",
"cpd00050_c0 {'modelseed_template_id': 'cpd00050_c'}\n",
"cpd15793_c0 {'modelseed_template_id': 'cpd15793_c'}\n",
"cpd15540_c0 {'modelseed_template_id': 'cpd15540_c'}\n",
"cpd15533_c0 {'modelseed_template_id': 'cpd15533_c'}\n",
"cpd15432_c0 {'modelseed_template_id': 'cpd15432_c'}\n",
"cpd02229_c0 {'modelseed_template_id': 'cpd02229_c'}\n",
"cpd15665_c0 {'modelseed_template_id': 'cpd15665_c'}\n",
"cpd15666_c0 {'modelseed_template_id': 'cpd15666_c'}\n",
"cpd00023_c0 {'modelseed_template_id': 'cpd00023_c'}\n",
"cpd00001_c0 {'modelseed_template_id': 'cpd00001_c'}\n",
"cpd00033_c0 {'modelseed_template_id': 'cpd00033_c'}\n",
"cpd00035_c0 {'modelseed_template_id': 'cpd00035_c'}\n",
"cpd00039_c0 {'modelseed_template_id': 'cpd00039_c'}\n",
"cpd00041_c0 {'modelseed_template_id': 'cpd00041_c'}\n",
"cpd00051_c0 {'modelseed_template_id': 'cpd00051_c'}\n",
"cpd00053_c0 {'modelseed_template_id': 'cpd00053_c'}\n",
"cpd00054_c0 {'modelseed_template_id': 'cpd00054_c'}\n",
"cpd00060_c0 {'modelseed_template_id': 'cpd00060_c'}\n",
"cpd00065_c0 {'modelseed_template_id': 'cpd00065_c'}\n",
"cpd00066_c0 {'modelseed_template_id': 'cpd00066_c'}\n",
"cpd00069_c0 {'modelseed_template_id': 'cpd00069_c'}\n",
"cpd00084_c0 {'modelseed_template_id': 'cpd00084_c'}\n",
"cpd00107_c0 {'modelseed_template_id': 'cpd00107_c'}\n",
"cpd00119_c0 {'modelseed_template_id': 'cpd00119_c'}\n",
"cpd00129_c0 {'modelseed_template_id': 'cpd00129_c'}\n",
"cpd00132_c0 {'modelseed_template_id': 'cpd00132_c'}\n",
"cpd00156_c0 {'modelseed_template_id': 'cpd00156_c'}\n",
"cpd00161_c0 {'modelseed_template_id': 'cpd00161_c'}\n",
"cpd00322_c0 {'modelseed_template_id': 'cpd00322_c'}\n",
"cpd00115_c0 {'modelseed_template_id': 'cpd00115_c'}\n",
"cpd00012_c0 {'modelseed_template_id': 'cpd00012_c'}\n",
"cpd00241_c0 {'modelseed_template_id': 'cpd00241_c'}\n",
"cpd00356_c0 {'modelseed_template_id': 'cpd00356_c'}\n",
"cpd00357_c0 {'modelseed_template_id': 'cpd00357_c'}\n",
"cpd00002_c0 {'modelseed_template_id': 'cpd00002_c'}\n",
"cpd00038_c0 {'modelseed_template_id': 'cpd00038_c'}\n",
"cpd00052_c0 {'modelseed_template_id': 'cpd00052_c'}\n",
"cpd00062_c0 {'modelseed_template_id': 'cpd00062_c'}\n",
"cpd00008_c0 {'modelseed_template_id': 'cpd00008_c'}\n",
"cpd00067_c0 {'modelseed_template_id': 'cpd00067_c'}\n",
"cpd11416_c0 {'modelseed_template_id': 'cpd11416_c'}\n",
"cpd17041_c0 {'modelseed_template_id': 'cpd17041_c'}\n",
"cpd17042_c0 {'modelseed_template_id': 'cpd17042_c'}\n",
"cpd17043_c0 {'modelseed_template_id': 'cpd17043_c'}\n"
]
}
],
"source": [
"for m in reaction.metabolites:\n",
" print(m, m.notes)"
]
},
{
"cell_type": "code",
"execution_count": 42,
Expand Down Expand Up @@ -551,7 +701,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
Loading

0 comments on commit 332672b

Please sign in to comment.