Skip to content

Commit 89287a8

Browse files
committed
template_compound fix
1 parent 76ce3ee commit 89287a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/Others/Biochem.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"cell_type": "markdown",
1414
"metadata": {},
1515
"source": [
16-
"### Load the database object from local github repository"
16+
"### Load the database object from local github repository\n",
17+
"https://github.com/ModelSEED/ModelSEEDDatabase"
1718
]
1819
},
1920
{

modelseedpy/biochem/modelseed_compound.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ def __init__(
5959
self.flags |= set(flags)
6060

6161
def to_template_compartment_compound(self, compartment):
62-
res = self.copy()
63-
res.id = f"{self.seed_id}_{compartment}"
64-
res.compartment = compartment
62+
cpd_id = f"{self.seed_id}_{compartment}"
63+
res = MSTemplateSpecies(cpd_id, self.charge, compartment, self.id)
6564
res.annotation.update(self.annotation)
6665
return res
6766

0 commit comments

Comments
 (0)