alphafold icon indicating copy to clipboard operation
alphafold copied to clipboard

ValueError: Could not find HHsearch database

Open zjq1011 opened this issue 2 years ago • 7 comments

E0624 19:12:16.996760 139990801621952 hhsearch.py:56] Could not find HHsearch database /media/fbsb2/AF2_database/pdb70/pdb70 Traceback (most recent call last): File "/home/fbsb2/apps/alphafold/run_alphafold.py", line 422, in app.run(main) File "/home/fbsb2/apps/alphafold/alphafold-conda/lib/python3.8/site-packages/absl/app.py", line 312, in run _run_main(main, args) File "/home/fbsb2/apps/alphafold/alphafold-conda/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main sys.exit(main(argv)) File "/home/fbsb2/apps/alphafold/run_alphafold.py", line 327, in main template_searcher = hhsearch.HHSearch( File "/home/fbsb2/apps/alphafold/alphafold/data/tools/hhsearch.py", line 57, in init raise ValueError(f'Could not find HHsearch database {database_path}') ValueError: Could not find HHsearch database /media/fbsb2/AF2_database/pdb70/pdb70

zjq1011 avatar Jun 24 '22 10:06 zjq1011

How to resolve this problem❓ I met it again

pariskang avatar Jul 04 '22 03:07 pariskang

I also got that error. Any thoughts?

almeida85 avatar Jul 15 '22 08:07 almeida85

+1 here. Got the same error.

wmustafaAwad avatar Jul 21 '22 15:07 wmustafaAwad

I got this error too

Mino01 avatar Jul 25 '22 17:07 Mino01

Hi, I solved the error. The error has nothing to do with HHsearch. This is the first database the code reads, so, naturally, if the code does not have access to read the data files, it will fail with this error. For me, I checked two things:

  1. File read permissions (check that the code you are running has access to the data directory). You can simply ls the directory or write a python code that uses the glob function (similar to the part that produces the error (here).
  2. Make sure you are entering the path right (check the path you are entering matches the directories depicted in alphafold's readme under genetic databases)

wmustafaAwad avatar Jul 25 '22 21:07 wmustafaAwad

Hi. Yes, in my case was a permissions issue. Solved already.

almeida85 avatar Jul 26 '22 10:07 almeida85

I have also solved it but it seems that I need to give all permission. I just executed chmod 777 for the data files.

zjq1011 avatar Jul 27 '22 03:07 zjq1011

This seems to be a resolved permissions problem - closing for now, feel free to reopen if this is still a problem.

andycowie avatar Aug 19 '22 12:08 andycowie

Hi,

I am trying to solve the same error.

I'm running AF2 as a module on my institution's cluster, To address the permission issue, I copied the pdb70 directory to my own directory and chmod 777 all the files.

Like this:

(base) [alexliu@node91 pdb70]$ ls -l
total 70673512
-rwxrwxrwx 1 alexliu chanlab         410 Oct 20 17:44 md5sum
-rwxrwxrwx 1 alexliu chanlab 56554823611 Oct 20 17:48 pdb70_a3m.ffdata
-rwxrwxrwx 1 alexliu chanlab     2049264 Oct 20 17:48 pdb70_a3m.ffindex
-rwxrwxrwx 1 alexliu chanlab     6967926 Oct 20 17:44 pdb70_clu.tsv
-rwxrwxrwx 1 alexliu chanlab    22338334 Oct 20 17:43 pdb70_cs219.ffdata
-rwxrwxrwx 1 alexliu chanlab     1562700 Oct 20 17:44 pdb70_cs219.ffindex
-rwxrwxrwx 1 alexliu chanlab  3485614545 Oct 20 17:44 pdb70_hhm.ffdata
-rwxrwxrwx 1 alexliu chanlab     1884124 Oct 20 17:43 pdb70_hhm.ffindex
-rwxrwxrwx 1 alexliu chanlab    20263781 Oct 20 17:43 pdb_filter.dat

Then I specify the pdb70 directory path to the one which I have permission over. The script looks like:

#!/bin/bash
#SBATCH -t 72:00:00
#SBATCH -p gpu
#SBATCH -A chanlab_gpu
#SBATCH --mem 150G
#SBATCH -c 1

module load alphafold/2.3.1

python /cluster/tools/software/centos7/alphafold/2.3.1/alphafold-2.3.1/run_alphafold.py \
        --fasta_paths=~/P42212.fasta \
        --max_template_date=2023-10-19 \
        --model_preset=monomer \
        --use_gpu_relax \
        --db_preset=full_dbs \
        --data_dir=/cluster/tools/data/commondata/alphafold \
        --output_dir=~/alphafold_test \
        --uniref90_database_path=/cluster/tools/data/commondata/alphafold/uniref90 \
        --mgnify_database_path=/cluster/tools/data/commondata/alphafold/mgnify \
        --template_mmcif_dir=/cluster/tools/data/commondata/alphafold/pdb_mmcif/mmcif_files \
        --obsolete_pdbs_path=/cluster/tools/data/commondata/alphafold/pdb_mmcif/obsolete.dat \
        --bfd_database_path=/cluster/tools/data/commondata/alphafold/bfd \
        --uniref30_database_path=/cluster/tools/data/commondata/alphafold/uniref30 \
        --pdb70_database_path=/cluster/projects/chanlab/pdb70

But I am still getting the same error even with permission to access the files.

(base) [alexliu@node52 alphafold_test]$ cat slurm-10409121.out
The databases of alphafold are at $alphafold_data.
$alphafold_home is set to /cluster/tools/software/centos7/alphafold/2.3.1.
E1025 16:12:36.010123 139968497416000 hhsearch.py:56] Could not find HHsearch database /cluster/projects/chanlab/pdb70
Traceback (most recent call last):
  File "/cluster/tools/software/centos7/alphafold/2.3.1/alphafold-2.3.1/run_alphafold.py", line 432, in <module>
    app.run(main)
  File "/cluster/tools/software/centos7/alphafold/2.3.1/lib/python3.8/site-packages/absl/app.py", line 312, in run
    _run_main(main, args)
  File "/cluster/tools/software/centos7/alphafold/2.3.1/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "/cluster/tools/software/centos7/alphafold/2.3.1/alphafold-2.3.1/run_alphafold.py", line 337, in main
    template_searcher = hhsearch.HHSearch(
  File "/cluster/tools/software/centos7/alphafold/2.3.1/alphafold-2.3.1/alphafold/data/tools/hhsearch.py", line 57, in __init__
    raise ValueError(f'Could not find HHsearch database {database_path}')
ValueError: Could not find HHsearch database /cluster/projects/chanlab/pdb70

It looks like a permission issue for everyone else on this thread. Can anyone let me know if I'm approaching this correctly?

Many thanks in advance. A.L.

northNomad avatar Oct 25 '23 20:10 northNomad