This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Eggnog emapper.py error

Hi guys,

I'm trying to run eggnog to annotate some proteins. I followed the exact instructions found on their wiki page for downloading and basic usage. It runs for a few minutes then I get an error.

$ python emapper.py -i proteins.faa --output emapper_output -m diamond

Traceback (most recent call last):
  File "emapper.py", line 1001, in <module>
    main(args)
  File "emapper.py", line 216, in main
    dump_diamond_matches(args.input, seed_orthologs_file, args)
  File "emapper.py", line 353, in dump_diamond_matches
    raise e
subprocess.CalledProcessError: Command returned non-zero exit status -9

Anyone know what is causing this error?

Thank you

annotation protein eggnog emapper

Probably related to the version of diamond: diamond sometimes changes its database format, and a new version of the software may be incompatible with an old database.

What diamond version are you using? How did you install the eggnog databases?

I installed eggnog by downloading this file (1.03.tar.gz) found here: https://github.com/jhcepas/eggnog-mapper/releases and then running download_eggnog_data.py (to get the databases, took a long time)

That is all I did, I did not install diamond separately as I thought it came with the package above.

My bad, you are right: it seems eggnog-mapper uses an "internal" diamond. Try running it directly from the command-line to see if there is some problem with it:

/path/to/eggnog_base/bin/diamond

Or maybe you have a local diamond with precedence over eggnog-mapper's diamond. What is the result of which diamond?

Thanks for your help, I tried running it directly, got this

Error: Syntax: diamond COMMAND [OPTIONS]. To print help message: diamond help

which diamond results in

/usr/bin/which: no diamond in (/cvmfs/home/etc..etc)

Try doing export PATH="/path/to/eggnog-mapper-version/bin":$PATH before python emapper.py (replace /path/to/eggnog-mapper-version/bin to yours)?

Thank you. Just tried this, no luck unfortunately

My final guess is the diamond database was prepared under a newer diamond than the one from eggnog-mapper 1.0.3 (which bundles diamond 0.8.22), as an eggnog-mapper 2.0 (which bundles diamond 0.9.24) is almost released. Try manually replacing diamond, or try to install eggnog-mapper directly from the git repo with git clone.

I will try that and report back. Thank you for the help!

Tried installing eggnog-mapper directly from git repo, it ran for ~30mins then the same kind of error:

Building reference index... Traceback (most recent call last):
  File "emapper.py", line 1210, in <module>
    main(args)
  File "emapper.py", line 226, in main
    dump_diamond_matches(args.input, seed_orthologs_file, args)
  File "emapper.py", line 380, in dump_diamond_matches
    raise e
subprocess.CalledProcessError: Command returned non-zero exit status -9

1 answer

In case this happens to anyone else, it turned out it was just a memory issue! Just ran it with more memory and it now runs fine. Thanks for your input everyone.

How did you run with more memory? Did you change computers?

Or were you using a resource manager such as SLURM or SGE, and you changed the queue or memory settings?

SLURM, and I just requested a node with more memory

Log in to answer this question.