emmamglass / reconstructor

This repository contains all source code in the reconstructor python package, installation instructions, important file dependencies, and benchmarking scores for reconstructor models. Reconstructor is a COBRApy compatible, automated GENRE building tool from gene fastas based on KEGG annotations.
MIT License
17 stars 5 forks source link

When I test "python -m reconstructor --test yes", I met errors #12

Open ZhaoPengpeng1116 opened 1 day ago

ZhaoPengpeng1116 commented 1 day ago

python -m reconstructor --input_file Osplanchnicus.aa.fasta --file_type 1 --gram negative --media rich", I get an error: Performing test 1 python -m reconstructor --input_file C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\488.146.fa --file_type 1 --gram negative Using Gram negative objective function Using minimum objective flux fraction of 0.01 and maximum fraction of 0.5 Using 1 processor(s) Loading GENRE construction databases... [-----------------------------------------] Aligning peptide sequences to KEGG database, may take some time... Saving BLASTp results to C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\488.146.KEGGprot.out Windows blasting C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\488.146.fa vs C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor/refs/screened_kegg_prokaryotes_pep_db running blastp with the following command line... C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\diamond blastp -p 1 -d C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor/refs/screened_kegg_prokaryotes_pep_db -q C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\488.146.fa -o C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\488.146.KEGGprot.out --more-sensitive --max-target-seqs 1 --quiet finished blast Creating draft GENRE from BLAST results... ['rich'] Identifying new metabolism (Step 1 of 2)... [-----------------------------------------] set() Identifying new metabolism (Step 2 of 2)... [--------------- ]Traceback (most recent call last):   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\reconstructor__main.py", line 245, in _find_reactions     universal.solver.update()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1464, in update     self._add_constraints(add_constr)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 782, in _add_constraints     self._glpk_set_row_bounds(constraint)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 841, in _glpk_set_row_bounds     raise Exception( Exception: Something is wrong with the provided bounds nan and nan in constraint 5e14340f-a00a-11ef-b326-70665598db6e: nan <= 1.0biomass_GmNeg - 1.0biomass_GmNeg_reverse_cd371 <= nan During handling of the above exception, another exception occurred: Traceback (most recent call last):   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\runpy.py", line 194, in _run_module_as_main     return _run_code(code, main_globals, None,   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\runpy.py", line 87, in _run_code     exec(code, run_globals)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\reconstructor__main.py", line 670, in     media_reactions = _find_reactions(filled_genre, universal, metabolic_tasks, universal_obj, min_frac, max_frac, 2, file_type)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\reconstructor__main.py", line 271, in _find_reactions     solution = universal.optimize()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\cobra\core\model.py", line 1228, in exit     context.reset()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\cobra\util\context.py", line 42, in reset     entry()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\cobra\util\solver.py", line 206, in reset     model.solver.objective = reverse_value   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 630, in objective     super(Model, self.class__).objective.fset(self, value)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1226, in objective     self.update()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1464, in update     self._add_constraints(add_constr)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 761, in _add_constraints     super(Model, self)._add_constraints(constraints, sloppy=sloppy)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1573, in _add_constraints     self._constraints.append(constraint)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\container.py", line 172, in append     raise ContainerAlreadyContains("Container '%s' already contains an object with name '%s'." % (self, value.name)) optlang.exceptions.ContainerAlreadyContains: Container '<optlang.container.Container object at 0x000002056EA36310>' already contains an object with name '5e14340f-a00a-11ef-b326-70665598db6e'. Performing test 2 python -m reconstructor --input_file C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\JCP8151B.KEGGprot.out --file_type 2 --gram negative Using Gram negative objective function Using minimum objective flux fraction of 0.01 and maximum fraction of 0.5 Using 1 processor(s) Loading GENRE construction databases... [-----------------------------------------] Creating draft GENRE from BLAST results... ['rich'] Identifying new metabolism (Step 1 of 2)... [-----------------------------------------] set() Identifying new metabolism (Step 2 of 2)... [--------------- ]Traceback (most recent call last):   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\reconstructor__main__.py", line 245, in _find_reactions     universal.solver.update()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1464, in update     self._add_constraints(add_constr)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 782, in _add_constraints     self._glpk_set_row_bounds(constraint)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 841, in _glpk_set_row_bounds     raise Exception( Exception: Something is wrong with the provided bounds nan and nan in constraint c61b8fbf-a00a-11ef-b07b-70665598db6e: nan <= 1.0biomass_GmNeg - 1.0biomass_GmNeg_reverse_cd371 <= nan During handling of the above exception, another exception occurred: Traceback (most recent call last):   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\runpy.py", line 194, in _run_module_as_main     return _run_code(code, main_globals, None,   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\runpy.py", line 87, in _run_code     exec(code, run_globals)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\reconstructor\main__.py", line 670, in     media_reactions = _find_reactions(filled_genre, universal, metabolic_tasks, universal_obj, min_frac, max_frac, 2, file_type)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\reconstructor\main.py", line 271, in _find_reactions     solution = universal.optimize()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\cobra\core\model.py", line 1228, in exit     context.reset()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\cobra\util\context.py", line 42, in reset     entry()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\cobra\util\solver.py", line 206, in reset     model.solver.objective = reverse_value   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 630, in objective     super(Model, self.class__).objective.fset(self, value)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1226, in objective     self.update()   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1464, in update     self._add_constraints(add_constr)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\glpk_interface.py", line 761, in _add_constraints     super(Model, self)._add_constraints(constraints, sloppy=sloppy)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\interface.py", line 1573, in _add_constraints     self._constraints.append(constraint)   File "C:\Users\zhaopengju\anaconda3\envs\reconstructor\lib\site-packages\optlang\container.py", line 172, in append     raise ContainerAlreadyContains("Container '%s' already contains an object with name '%s'." % (self, value.name)) optlang.exceptions.ContainerAlreadyContains: Container '<optlang.container.Container object at 0x000002A44C0D6310>' already contains an object with name 'c61b8fbf-a00a-11ef-b07b-70665598db6e'. Performing test 3 python -m reconstructor --input_file C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\fmt.metaG.01044A.bin.149.KEGGprot.sbml --file_type 3 --gram negative Using Gram negative objective function Using minimum objective flux fraction of 0.01 and maximum fraction of 0.5 Using 1 processor(s) Loading GENRE construction databases... [-----------------------------------------] ['rich'] Identifying new metabolism... [-----------------------------------------] set() Ignoring reaction 'biomass_GmPos' since it already exists.         Draft reconstruction had 692 genes, 900 reactions, and 938 metabolites         Gapfilled 0 reactions and 0 metabolites         Final reconstruction has 900 reactions and 938 metabolites         Final objective flux is 167.442 Saving new GENRE to C:\Users\zhaopengju\anaconda3\envs\reconstructor\Lib\site-packages\reconstructor\testfiles\fmt.metaG.01044A.bin.149.KEGGprot.extended.sbml