Skip to content

Commit 6febe1a

Browse files
committed
template
1 parent 8c7c8c8 commit 6febe1a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modelseedpy/core/mstemplate.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ def get_data(self):
6464
return {
6565
'id': self.id,
6666
'name': self.name,
67-
'abbreviation': self.abbreviation,
67+
'abbreviation': self.abbreviation if self.abbreviation else "",
6868
'aliases': [],
69-
'defaultCharge': self.default_charge,
70-
'deltaG': self.delta_g,
71-
'deltaGErr': self.delta_g_error,
72-
'formula': self.formula,
69+
'defaultCharge': self.default_charge if self.default_charge else 0,
70+
'deltaG': self.delta_g if self.delta_g else 10000000,
71+
'deltaGErr': self.delta_g_error if self.delta_g_error else 10000000,
72+
'formula': self.formula if self.formula else 'R',
7373
'isCofactor': 1 if self.is_cofactor else 0,
74-
'mass': self.mass
74+
'mass': self.mass if self.mass else 0
7575
}
7676

7777
def __repr__(self):
@@ -106,7 +106,7 @@ def _repr_html_(self):
106106

107107
class MSTemplateSpecies(Metabolite):
108108

109-
def __init__(self, comp_cpd_id, charge, compartment, cpd_id, max_uptake=0, template=None):
109+
def __init__(self, comp_cpd_id: str, charge: int, compartment: str, cpd_id, max_uptake=0, template=None):
110110
self._template_compound = None
111111
super().__init__(comp_cpd_id, '', '', charge, compartment)
112112
self._template = template

0 commit comments

Comments
 (0)