Skip to content

Commit

Permalink
Merge pull request #148 from jplfaria/dev
Browse files Browse the repository at this point in the history
changes in MSTemplate file to add additional biomass categories
  • Loading branch information
Fxe authored Nov 7, 2024
2 parents 87143dd + a76a45e commit 7ad20c4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions modelseedpy/core/mstemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ def __init__(
lipid,
cellwall,
cofactor,
pigment,
carbohydrate,
energy,
other,
):
Expand All @@ -543,6 +545,8 @@ def __init__(
:param lipid:float
:param cellwall:float
:param cofactor:float
:param pigment:float
:param carbohydrate:float
:param energy:float
:param other:float
"""
Expand All @@ -555,6 +559,8 @@ def __init__(
self.lipid = lipid
self.cellwall = cellwall
self.cofactor = cofactor
self.pigment = pigment
self.carbohydrate = carbohydrate
self.energy = energy
self.other = other
self.templateBiomassComponents = DictList()
Expand All @@ -573,6 +579,8 @@ def from_table(
lipid,
cellwall,
cofactor,
pigment,
carbohydrate,
energy,
other,
):
Expand All @@ -586,6 +594,8 @@ def from_table(
lipid,
cellwall,
cofactor,
pigment,
carbohydrate,
energy,
other,
)
Expand Down Expand Up @@ -633,6 +643,8 @@ def from_dict(d, template):
d["lipid"],
d["cellwall"],
d["cofactor"],
d["pigment"],
d["carbohydrate"],
d["energy"],
d["other"],
)
Expand Down Expand Up @@ -689,6 +701,8 @@ def get_or_create_reaction(self, model, baseid, compartment=None, index=None):
def build_biomass(self, model, index="0", classic=False, GC=0.5, add_to_model=True):
types = [
"cofactor",
"pigment",
"carbohydrate",
"lipid",
"cellwall",
"protein",
Expand All @@ -699,6 +713,8 @@ def build_biomass(self, model, index="0", classic=False, GC=0.5, add_to_model=Tr
]
type_abundances = {
"cofactor": self.cofactor,
"pigment": self.pigment,
"carbohydrate": self.carbohydrate,
"lipid": self.lipid,
"cellwall": self.cellwall,
"protein": self.protein,
Expand Down Expand Up @@ -876,6 +892,8 @@ def get_data(self):
"lipid": self.lipid,
"cellwall": self.cellwall,
"cofactor": self.cofactor,
"pigment": self.pigment,
"carbohydrate": self.carbohydrate,
"energy": self.energy,
"other": self.other,
"templateBiomassComponents": [],
Expand Down Expand Up @@ -1122,6 +1140,8 @@ def overwrite_biomass_from_table(
lipid,
cellwall,
cofactor,
pigment,
carbohydrate,
energy,
other,
):
Expand All @@ -1139,6 +1159,8 @@ def overwrite_biomass_from_table(
lipid,
cellwall,
cofactor,
pigment,
carbohydrate,
energy,
other,
)
Expand Down

0 comments on commit 7ad20c4

Please sign in to comment.