nf-core / nf-core/proteinfold

AlphaFold3 data pipeline never finds the Rfam database (Rfam-*.fasta glob does not match the shipped filename)

Open Beginner friendly
#649 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
115
Forks
75
PR merge metrics
No merged PRs in 30d

Description

Description of the bug

Hey,

I've found this bug and had claude write it up. see below:

RUN_ALPHAFOLD3_DATAPIPELINE always fails with ERROR: No Rfam database found, even when the Rfam database is present and was downloaded by the pipeline itself.

The module checks for the Rfam file with this glob:

https://github.com/nf-core/proteinfold/blob/dev/modules/local/run_alphafold3_datapipeline/main.nf#L69

rfam=$(ls -v ./rfam/Rfam-*.fasta 2>/dev/null | tail -n 1 || echo "")
if [[ -z "$rfam" ]]; then
    echo "ERROR: No Rfam database found"
    exit 1
fi

But the file the pipeline downloads is named rfam_14_9_clust_seq_id_90_cov_80_rep_seq.fasta. From conf/dbs.config:

alphafold3_rfam_link = 'https://storage.googleapis.com/alphafold-databases/v3.0/rfam_14_9_clust_seq_id_90_cov_80_rep_seq.fasta.zst'

Lowercase r, underscores, no hyphen. Rfam-.fasta cannot match it on a case-sensitive filesystem. Nothing between ARIA2_RFAM in PREPARE_ALPHAFOLD3_DBS and the module renames the file, and the publish pattern in conf/modules_alphafold3.config is rfam.fasta, which confirms the lowercase name is what lands in ${params.alphafold3_db}/rfam/.

This is the same name DeepMind's own AlphaFold3 distribution uses (see src/alphafold3/scripts/copy_to_ssd.sh in google-deepmind/alphafold3), so users supplying a pre-existing AF3 database directory via --alphafold3_db hit it too.

This looks like a regression introduced by commit 357402c8 ("Fix path to check for rfam dbs in af3 datapipeline module", 28 Jul 2026), which changed the glob in the wrong direction:

diff
-    rfam=$(ls -v ./rfam/rfam*.fasta 2>/dev/null | tail -n 1 || echo "")
+    rfam=$(ls -v ./rfam/Rfam-*.fasta 2>/dev/null | tail -n 1 || echo "")

Rfam-*.fasta matches the HelixFold3 naming (Rfam-14.9_rep_seq.fasta, used in modules/local/run_helixfold3/main.nf), not the AlphaFold3 one.

The adjacent checks in the same module are fine: nt_rna*.fasta and rnacentral*.fasta both match their downloaded filenames. Rfam is the only mismatched one.

Suggested fix

Revert the glob, or accept both spellings:

diff
-    rfam=$(ls -v ./rfam/Rfam-*.fasta 2>/dev/null | tail -n 1 || echo "")
+    rfam=$(ls -v ./rfam/[Rr]fam[-_]*.fasta 2>/dev/null | tail -n 1 || echo "")
Command used and terminal output

Relevant files

No response

System information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at modules/local/run_alphafold3_datapipeline/main.nf around line 69 and compare its Rfam glob with the filename configured in conf/dbs.config. Also inspect conf/modules_alphafold3.config to confirm the published database name. Done means RUN_ALPHAFOLD3_DATAPIPELINE recognizes the downloaded or pre-existing AlphaFold3 Rfam file and no longer exits with the missing-database error.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.