Open timternetnet opened 4 months ago
Hi @timternetnet, I'm sorry you run into this issue. The fact that the emapper rule in our snakemake workflows was still calling python 2.7 was certainly a bug, which I just fixed, and if you were to track the anvi'o development branch (installation instructions here), you can see if it changes anything for you.
But there is a bigger problem with the emapper rule. Emapper used to call sys.exit()
at the end of its run to shutdown all lingering threads quickly, which made it impossible to use from within other workflows. I had raised this with its developers a few years ago but at that time they had offered no other solution, so we left the hook in our Snakemake rules, but we stopped using it.
As a workaround we resorted to running it manually by first getting all the gene amino acid sequences from a given contigs-db like this:
anvi-get-sequences-for-gene-calls -c CONTIGS.db \
--get-aa-sequences \
-o amino-acid-sequences.fa
Then running emapper manually as instructed in its tutorial, and then importing the results back into the contigs-db:
anvi-script-run-eggnog-mapper -c CONTIGS.db \
--annotation amino-acid-sequences.fa.emapper.annotations \
--use-version VERSION
Where VERSION
can be any of the versions listed in the help menu, which currently includes 2.0.0, 2.0.1, 2.0.5, 2.1.4, 2.1.6, 2.1.8, and 2.1.9, and can easily be extended to newer versions.
I am not sure if the sys.exit()
problem was resolved in newer versions. If it is resolved, the anvi'o program to run emapper and import its results should work without any issue. If it is not resolved, then it is normal that it shuts down the entire snakemake workflow :/
Please let us know if you discover something and whether there is anything we can do to make your life easier. But in the meantime I'm going to close the issue pending input from you.
Best wishes,
Short description of the problem
I'm trying to include Eggnog mapper in an Anvio workflow, but it stops with a non descriptive error. No clue if it's an issue with my workflow of with my installation.
anvi'o version
System info
Installation:
Result:
Detailed description of the issue
I included the following section in the workflow. I may be wrong on the entries I made in the anv_script part, but it bugs out running emapper.py. Perhaps it's relevant so I include it.
Note: I have tried multiple variations of the database & emapper_dir options, none seemed to advance the script.
Structure in
/Taxonomy/802/anvio-8-eggnogmapper
When running the workflow:
There's nothing descriptive in the log. I think the biggest pointer here is python2.7 being called while eggnog mapper requires python 3 (which runs on the system and is included in the installation). No clue why python 2 is being called.
I can run the following manually, which works from within the anvio environment:
Another pointer here is the --data_dir, a flag which is absent in the default workflow.
Perhaps I'm missing something obvious here, if anyone could share the eggnog part of their workflow, preferably with a custom database location and with a bac/arch installation, that could already help.
Thanks a lot!