Closed Harpreet525 closed 11 months ago
Thanks for the report, @Harpreet525.
This is interesting. Self note: If we can reproduce it, probably os.makedirs()
instead of os.mkdir()
will solve the problem. I'm not sure why the MISC/KEGG
wouldn't be there, though.
I probably missed this because I am always testing with the misc/KEGG
directory already in place rather than from a fresh install without that directory :)
I fixed both the incorrect case for misc
in the path KODatabase.default_dir
, AND I switched the mkdir
function to makedirs
. Currently testing it with anvi-setup-kegg-data --kegg-data-dir TEST_KEGG -T 6 --mode modeling
, but it will take about two hours to finish, so we won't know for a while if it worked. I will report back.
Thank you very much for your quick action, @ivagljiva!
i had replaced and changed the case of data/MISC/KEGG path with data/misc/KEGG in the reactionnetwork.py script and the kegg database setup completed successfully. Hoping this was the correct method !
Regards
Total number of KOs/entry files ..............: 26,252 KEGG KO database version .....................: Release 108.0+/10-03, Oct 23 KEGG KO list .................................: /bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/data/misc/KEGG/KO_REACTION_NETWORK/ko_list.txt KEGG KO info .................................: /bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/data/misc/KEGG/KO_REACTION_NETWORK/ko_info.txt Table of select KEGG KO data .................: /bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/data/misc/KEGG/KO_REACTION_NETWORK/ko_data.tsv Archived KEGG KO entry files .................: /bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/data/misc/KEGG/KO_REACTION_NETWORK/ko_entries.tar.gz
✓ anvi-setup-kegg-data took 1:45:28.341934
That was exactly the right way to fix it @Harpreet525 :) Looks like it worked.
Now this issue should be fixed in anvio-dev
as well!
Should I update the tar.gz archive attached to the release, @ivagljiva? We didn't do anything major in the repo, and it would be nice for people to not have to switch to anvio-dev to address this issue. What do you think?
I think that is a good idea @meren.
But please wait a little bit before you do it. I want my test to finish running just to make sure everything is A-OK first :)
(I'll ping you here when its done)
Thank you very much for catching that, @Harpreet525, and for the quick fix, @ivagljiva. Updating the release sounds fine, @meren.
@meren , this should be good to go :) Feel free to update the release (and I will close this issue). Thank you all very much!
this should be good to go :) Feel free to update the release (and I will close this issue)
Just for posterity, this is now done, and I updated the tarball attached to the release reflecting the tested changes implemented in 59640ec0e513088754e9e53734481a4ac0459996 and 7ca5a8d30c6f1434f2af5e8b61490e10c66834c8.
Short description of the problem
Error in setting up the kegg database in freshly installed latest version of anvio probably because of the naming error
anvi'o version
Anvio 8
anvi-self-test --suite mini worked fine.
System info
Linux Ubuntu , installation of anvio via pip and by default as indicated in anvio guide.
Detailed description of the issue
File "/bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/biochemistry/reactionnetwork.py", line 1148, in set_up os.mkdir(parent_dir) FileNotFoundError: [Errno 2] No such file or directory: '/bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/data/MISC/KEGG'
Here, the reactionnetwork.py is locating the data stored in the path /bettik/PROJECTS/pr-microbio/Singhhar/miniconda3/envs/anvio/lib/python3.10/site-packages/anvio/data/MISC/KEGG.
However, it is unable to find the path because of the case sensitive letter "MISC" in the path. By default, the files are stored in data/misc/KEGG. But the reactionnetwork.py is locating it at data/MISC/KEGG.
Regards