Skip to content

Commit 904dea0

Browse files
committed
Updated fungi template
1 parent d6be19c commit 904dea0

File tree

3 files changed

+867154
-231
lines changed

3 files changed

+867154
-231
lines changed

Scripts/TemplateHelper.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ def readReactionsFile(self, path, includeLinenum=True, noFormat=False):
444444
try:
445445
masterReaction = self.masterReactions[reactionId]
446446
except KeyError:
447-
if 'reaction' in fieldNames and fields[fieldNames['reaction']]:
448-
masterReaction = self._gen_reaction_info(fields[fieldNames['reaction']])
447+
if 'custom_reaction' in fieldNames and fields[fieldNames['custom_reaction']]:
448+
masterReaction = self._gen_reaction_info(fields[fieldNames['custom_reaction']])
449449
else:
450450
raise ReactionNotFoundError('Reaction %s not found in master biochemistry' %(reactionId))
451451

@@ -475,6 +475,7 @@ def readReactionsFile(self, path, includeLinenum=True, noFormat=False):
475475

476476
# Make sure all of the compartments are valid.
477477
compartmentIds = fields[fieldNames['compartment']].split('|')
478+
compartmentIds.sort(key=lambda x: ["m", "n", "p", "x", "z", "c", "e"].index(x))
478479
idcomp = compartmentIds[0]
479480
for cindex in range(len(compartmentIds)):
480481
try:

0 commit comments

Comments
 (0)