Problems with Eggnog renaming from grouped table

Hey team,

I’ve run HUMAnN (v3.7) and regrouped my UniRef90 table to Eggnog. Now, I’m trying to rename the Eggnog table to be more human readable, but humann_rename_table can’t find the Eggnog names mapping file.

What I have done:

I’ve successfully installed the utility mapping files (humann_databases --download utility_mapping full download_dir --update-config yes)

I’ve regrouped the table (humann_regroup_table -i <uniref90_genefams_table> -g uniref90_eggnog -o <eggnog_grouped_table>)

I’ve also been able to regroup and rename my tables based on GO and PFams.

What breaks:

humann_rename_table -i <eggnog_grouped_table> -n eggnog -o <eggnog_grouped_named_table>

Which results in a FileNotFound error:
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/conda_environment/lib/python3.7/site-packages/humann/tools/../data/misc/map_eggnog_name.txt.gz'

Is there somewhere I can download map_eggnog_name.txt.gz?

That file should be part of the (full) HUMAnN utility mapping database if you have that downloaded?

Hi again,

I am using humann v3.9 installed in a mamba environment.
I used this to download the utility mapping
humann_databases --download utility_mapping full ./databases

I got the same error as @sterrettJD .

humann_config --print

HUMAnN Configuration ( Section : Name = Value )
database_folders : nucleotide = /media/akodon/ANDRES/databases/chocophlan
database_folders : protein = /media/akodon/ANDRES/databases/uniref
database_folders : utility_mapping = /media/akodon/ANDRES/databases/utility_mapping

The utility mapping database appears as correclty located… How can I reroute or fix this?
Thanks

Andrés

If you run humann_rename_table -h it should list out the naming options available to you. Do you see the eggNOG names in that list?

Hi Eric, thanks for your help, I hadn’t tried that here is the output:

-n {kegg-orthology,kegg-pathway,kegg-module,ec,metacyc-rxn,metacyc-pwy,pfam,eggnog,go,infogo1000,uniref50,uniref90}, --names {kegg-orthology,kegg-pathway,kegg-module,ec,metacyc-rxn,metacyc-pwy,pfam,eggnog,go,infogo1000,uniref50,uniref90}

These are the options but the -n option that I used was the same as the one listed above…

humann_rename_table --input humann_pathways.tsv --names eggnog --output humann_pathways_regroup.tsv --simplify

I got this result

Loading table from: humann_pathways.tsv
  Treating humann_pathways.tsv as stratified output, e.g. ['UNINTEGRATED', 'g__Acetobacter.s__Acetobacter_sp_CAG_267']
Loading mapping file from: /home/evolucion/mambaforge/envs/humano/lib/python3.12/site-packages/humann/tools/../data/misc/map_eggnog_name.txt.gz
Traceback (most recent call last):
  File "/home/evolucion/mambaforge/envs/humano/bin/humann_rename_table", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/evolucion/mambaforge/envs/humano/lib/python3.12/site-packages/humann/tools/rename_table.py", line 143, in main
    polymap = util.load_polymap( c_default_names[args.names].path, allowed_keys=allowed_keys )
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/evolucion/mambaforge/envs/humano/lib/python3.12/site-packages/humann/tools/util.py", line 341, in load_polymap
    size_warn( path )
  File "/home/evolucion/mambaforge/envs/humano/lib/python3.12/site-packages/humann/tools/util.py", line 268, in size_warn
    if m * os.path.getsize( path ) > c_many_bytes:
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen genericpath>", line 62, in getsize
FileNotFoundError: [Errno 2] No such file or directory: '/home/evolucion/mambaforge/envs/humano/lib/python3.12/site-packages/humann/tools/../data/misc/map_eggnog_name.txt.gz'

Thanks

A

Hmm, it’s strange that it can see the list of files but not load one. Must be something weird with how it’s been installed. The script allows you to pass a custom path for mapping IDs to names (--custom). If you can see the path to the names file and view it with less, then you could pass it manually to the script with that --custom flag. The script tries to automatically connect to available mapping files but something isn’t working there.

1 Like

Pointing to the database location worked! Thanks again for your help.

1 Like