CRITICAL ERROR: The directory provided for ChocoPhlAn

Hi,
I’ve been having a very hard time running the humann2 pipeline. I’ve been encountering a lot of incompatibility issues trying to install and making all work together either in a iOS or in HPC. Haven’t succeeded yet. My last attempt on HPC was through the docker image
docker_image= docker.io/biobakery/workflows:0.13.2
and then running the pipeline as suggested:

Download databases

humann2_databases --download chocophlan full $PWD
humann2_databases --download uniref uniref90_diamond $PWD
humann2_databases --download utility_mapping full $PWD

mkdir H2_"$SAMPLE"Output
humann2 --input “$SAMPLE"FR_unmapped.fastq.gz --output H2”$SAMPLE"Output --nucleotide-database $PWD --protein-database $PWD

And I am getting this next error which I have not been able to solve:
Unable to write to the HUMAnN2 config file.
Unable to write to the HUMAnN2 config file.
Unable to write to the HUMAnN2 config file.
CRITICAL ERROR: The directory provided for ChocoPhlAn does not contain files of the expected format (ie ‘^[g__][s__]’).

I would appreciate deeply any suggestions, thank you!

Hello, I just double checked and in the base conda environment running that container in docker it looks like you should be able to write to the config file with the default permissions. Is it possible you are in an environment where you do not have write permissions in the container (like Singularity on your HPC)? If you don’t have permission to write to the container and thus the config file you can run the download command with the option “–update-config no” and it will bypass writing the config file. This will resolve the write errors you are seeing. If you don’t update the config file you are correct in that you would want to provide the “–nucleotide-database $FOLDER1” and “–protein-database $FOLDER2” options to humann so it will know where to look for these databases. It looks like in your command you might be providing the same database location to both and this location does not contain the nucleotide database files. The nucleotide database files, also named ChocoPhlAn, are of the format g__* . Try changing the database locations that you provide and I think this should resolve the final error you are seeing.

Thank you,
Lauren

1 Like

Thank you Lauren it seemed to work, but now i have a different database related error:

CRITICAL ERROR: Error executing: /opt/conda/bin/metaphlan2.py /var/lib/condor/execute/slot1/dir_39176/H2_117Output/117_FR_unmapped_humann2_temp/tmp4TUF8b/tmprEqZ2i -t rel_ab -o /var/lib/condor/execute/slot1/dir_39176/H2_117Output/117_FR_unmapped_humann2_temp/117_FR_unmapped_metaphlan_bugs_list.tsv --input_type multifastq --bowtie2out /var/lib/condor/execute/slot1/dir_39176/H2_117Output/117_FR_unmapped_humann2_temp/117_FR_unmapped_metaphlan_bowtie2.txt

Error message returned from metaphlan2.py :

Downloading MetaPhlAn2 database
Please note due to the size this might take a few minutes
ERROR: Unable to create folder for database install: /opt/conda/bin/databases

Am I missing something else?
Thank you for your help and patience.

Hello, It looks like you do not have permission to write to the folder /opt/conda/bin/databases. If you can change the permissions on the folder, it should resolve the error you are seeing.

Thanks,
Lauren

Howdy,
I am relatively new to working with Humann2 and have experienced an error similar to what was resolved here. I am running it as a Singularity image on a virtual machine which has strict user access permissions.

The error message returned is as follows:
ERROR: Unable to create folder for database install: /opt/conda/bin/databases

The code that I ran was:
humann2 --input input.fastq.gz --verbose --remove-temp-output --nucleotide-database $DIRchocophlan --protein-database $DIRuniref --output output_name

Thanks for your help in resolving this issue,
Sam