Skip to content

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

Description

@SarahBeecroft

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions