Humann biocontainer: Unable to write to the HUMAnN config file

This seems to be a general caveat of using a config file stored with the codebase: depending on how the code is installed, the user does not have permission to modify the installed code & associated files (e.g., a config file).

In particular, I’m using a Docker container in which humann3 was installed via micromamba. Running any humann_config --update commands results in the error: Unable to write to the HUMAnN config file., which is likely due to permissions errors, as the code was installed via root during the creation of the Docker container.

Can one use an environmental variable to specify the path to a config file? I don’t see such an option in the docs: GitHub - biobakery/humann: HUMAnN 3.0 is the next generation of HUMAnN 1.0 (HMP Unified Metabolic Analysis Network).

Is there another method of providing an external config file? Specifically, I want to change the path to the mapping database, which AFAIK, can only be done via humann_config --update database_folders utility_mapping /PATH/TO/MAP/DB.

1 Like

Same, this would be really useful. linking this post. Our workaround was to bundle the utility mapping into the docker container, but there are so many other parameters in the config not exposed to the cli.

For now, I just added o+w permissions for the config file when building the container. That works, but it’s a bit of a hack. It definitely doesn’t work if multiple users were to use the same install (e.g., a central install of humann by an admin) or a team using the same conda env.