The bioBakery help forum

Humann_config Update Error

I downloaded the database using wget -c (HUMAnN doesn’t appear to support resuming broken downloads but overwrites from the beginning) and I would like to update my configuration.

$ humann_databases | head -n 3
HUMANnN2 Databases ( database : build = location )
chocophlan : full = http://huttenhower.sph.harvard.edu/humann_data/chocophlan/full_chocophlan.v296_201901b.tar.gz
chocophlan : DEMO = http://huttenhower.sph.harvard.edu/humann_data/chocophlan/DEMO_chocophlan.v296_201901b.tar.gz

I run $ humann_config --update chocophlan full /verona/biostat/databases/Chocophlan3/ and the error is

ERROR: Unable to add new section ( chocophlan ) to config file: /verona/biostat/software/Python3/lib/python3.7/site-packages/humann/humann.cfg

The file is writeable by everyone in group biostat.

$ ls -lh /verona/biostat/software/Python3/lib/python3.7/site-packages/humann/humann.cfg
-rwxrwx--- 1 biostat biostat 826 May 19 11:35 humann.cfg

I am a member of the biostat group.

$ groups
stgrad biostat

Why doesn’t it work? Why does the error message mention “add new section” if I’m trying to update an existing section?

Sorry for the confusion - I think you are mixing up commands for the databases (download) and config (configuration) script. See the following commands for attaching an already-downloaded databases to your installation:

Note that if you download a new database using databases it will automatically change your config (assuming you have permission to edit it, which I agree you should).

Ah, humann_config --update database_folders nucleotide /verona/nobackup/biostat/databases/Chocophlan3/ shows a success message.

But, it’s not shown in the list of databases if I run humann_databases afterwards.

(Python3) /verona/biostat$ humann_databases
HUMANnN2 Databases ( database : build = location )
chocophlan : full = http://huttenhower.sph.harvard.edu/humann_data/chocophlan/full_chocophlan.v296_201901b.tar.gz
chocophlan : DEMO = http://huttenhower.sph.harvard.edu/humann_data/chocophlan/DEMO_chocophlan.v296_201901b.tar.gz
uniref : uniref50_diamond = http://huttenhower.sph.harvard.edu/humann_data/uniprot/uniref_annotated/uniref50_annotated_v201901b_full.tar.gz
uniref : uniref90_diamond = http://huttenhower.sph.harvard.edu/humann_data/uniprot/uniref_annotated/uniref90_annotated_v201901b_full.tar.gz
uniref : uniref50_ec_filtered_diamond = http://huttenhower.sph.harvard.edu/humann_data/uniprot/uniref_ec_filtered/uniref50_ec_filtered_201901b_subset.tar.gz
uniref : uniref90_ec_filtered_diamond = http://huttenhower.sph.harvard.edu/humann_data/uniprot/uniref_ec_filtered/uniref90_ec_filtered_201901b_subset.tar.gz
uniref : DEMO_diamond = http://huttenhower.sph.harvard.edu/humann_data/uniprot/uniref_annotated/uniref90_DEMO_diamond_v201901b.tar.gz
utility_mapping : full = http://huttenhower.sph.harvard.edu/humann_data/full_mapping_v201901b.tar.gz

Also, it’s not what I expect from the documentation:

--update <section> <name> <value>
                        update the section : name to the value provided

My understanding is that section is the first column shown by humann_databases (e.g. chocophlan, uniref) name is the first item after the colon (e.g. full) and value is the first item after the equals sign (i.e. the URLs). Why does the user manual suggest --update database_folders when none of the items in the above output are database_folders?

I manually download the databases using wget because the HUMAnN command doesn’t support download resuming, if it breaks partway through.

I just noticed that “HUMANnN2 Databases” has one too many N in it. I have never used version 2, so I guess that the version number displayed is also wrong.

It does like we have a typo (and a wrong number) in the databases script; I’ll make a note to get that fixed. I think if you run humann_config you’ll see the updated path. humann_databases is a utility to help with downloading the databases, so what you’re seeing when you run it is the URLs of the files it knows how to fetch (rather than paths on your system).