-
Notifications
You must be signed in to change notification settings - Fork 4
Description
gapfiller_result_complete = dnngior.Gapfill(
draftModel=draft_model_path,
medium=None,
objectiveName=biomass_objective_id,
dbType='BiGG'
)
Gap-filling database = BiGG
No objective coefficients in model. Unclear what should be optimized
FileNotFoundError Traceback (most recent call last)
Cell In[34], line 2
----> 2 gapfiller_result_complete = dnngior.Gapfill(
3 draftModel=draft_model_path,
4 medium=None,
5 objectiveName=biomass_objective_id,
6 dbType='BiGG'
7 )
8 print("Gap-filling with complete medium finished (BiGG model).")
File /usr/local/Caskroom/miniforge/base/envs/dnngior/lib/python3.9/site-packages/dnngior/gapfill_class.py:70, in Gapfill.init(self, draftModel, trainedNNPath, medium, medium_file, black_list, grey_list, punish_cost, default_cost, objectiveName, dbType, gapfill)
67 # Build a Reaction object for the exchange reactions;
68 # if you have a defined medium, set the fixed_bounds argument accordingly
69 self.exchange_reacs = Reaction(model = self.path_to_exchanges, fixed_bounds = self.medium)
---> 70 self.db_reactions = Reaction(biochem_input = self.path_to_biochem, dbType=self.dbType)
72 # Merge reactions from db with those of the draft model
73 self.all_reactions = Reaction(fixed_bounds = self.medium, dbType=self.dbType)
File /usr/local/Caskroom/miniforge/base/envs/dnngior/lib/python3.9/site-packages/dnngior/reaction_class.py:63, in Reaction.init(self, model_folder, model_list, model, biochem_input, dbType, fixed_bounds)
59 self.model = self.__get_model(model)
61 self.dbType = dbType
---> 63 self.biochem_input = self.__get_reactions_from_biochem_input(biochem_input)
65 self.reactions = self.__get_reactions()
File /usr/local/Caskroom/miniforge/base/envs/dnngior/lib/python3.9/site-packages/dnngior/reaction_class.py:112, in Reaction.__get_reactions_from_biochem_input(self, biochem_input)
109 if biochem_input is None:
110 return None
--> 112 react_d = self.read_biochemistry_table(biochem_input)
113 reactions = {}
114 for reaction in react_d:
115
116 #I am assuming bacterial models (c0 and e0 compartments) and modelSEED identifiers
117 #as 'rxn00001'
File /usr/local/Caskroom/miniforge/base/envs/dnngior/lib/python3.9/site-packages/dnngior/reaction_class.py:323, in Reaction.read_biochemistry_table(self, filePath)
317 """
318 Reads a ModelSEED/PATRIC reaction database table, using the id, stoichiometry, direction and equation columns.
319 Returns a dictionary where id maps to a list of the other columns.
320 """
321 biochem = {}
--> 323 with open(filePath, 'r') as f:
324 f.readline() #Skip the header
325 for line in f:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Caskroom/miniforge/base/envs/dnngior/lib/python3.9/site-packages/dnngior/files/biochemistry/bigg_reactions.tsv'