Skip to content

Add random_seed for AF2, Boltz and ColabFold#588

Open
jscgh wants to merge 8 commits intodevfrom
add-random_seed
Open

Add random_seed for AF2, Boltz and ColabFold#588
jscgh wants to merge 8 commits intodevfrom
add-random_seed

Conversation

@jscgh
Copy link
Copy Markdown
Contributor

@jscgh jscgh commented Apr 20, 2026

This pull request adds support for explicit random seed control across the alphafold2, boltz, and colabfold modules, improving reproducibility for stochastic inference. Users can now set a global --random_seed parameter, or override it with mode-specific parameters. Documentation and schema files have been updated to reflect these new options.

  • Introduced boltz_random_seed, and colabfold_random_seed parameters in both nextflow.config and nextflow_schema.json. These override the global seed when specified.
  • Added a pipeline-wide random_seed parameter to nextflow.config and nextflow_schema.json, allowing users to set a global seed for all supported modules. Each module now uses its mode-specific seed if provided, otherwise falls back to the global seed (random_seed).

PR checklist

  • This comment contains a description of changes (with reason).
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • CHANGELOG.md is updated.

@jscgh jscgh self-assigned this Apr 20, 2026
@jscgh jscgh added the enhancement Improvement for existing functionality label Apr 20, 2026
@nf-core-bot

This comment was marked as off-topic.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 20, 2026

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 042dca4

+| ✅ 343 tests passed       |+
#| ❔   4 tests were ignored |#
!| ❗  30 tests had warnings |!
Details

❗ Test warnings:

  • files_exist - File not found: conf/igenomes.config
  • files_exist - File not found: conf/igenomes_ignored.config
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • schema_description - No description provided in schema for parameter: rosettafold2na_uniref30_link
  • schema_description - No description provided in schema for parameter: rosettafold2na_bfd_link
  • schema_description - No description provided in schema for parameter: rosettafold2na_pdb100_link
  • schema_description - No description provided in schema for parameter: rosettafold2na_weights_link
  • schema_description - No description provided in schema for parameter: rfam_full_region_link
  • schema_description - No description provided in schema for parameter: rfam_cm_link
  • schema_description - No description provided in schema for parameter: rnacentral_rfam_annotations_link
  • schema_description - No description provided in schema for parameter: rnacentral_id_mapping_link
  • schema_description - No description provided in schema for parameter: rnacentral_sequences_link
  • schema_description - No description provided in schema for parameter: rosettafold2na_uniref30_path
  • schema_description - No description provided in schema for parameter: rosettafold2na_bfd_path
  • schema_description - No description provided in schema for parameter: rosettafold2na_pdb100_path
  • schema_description - No description provided in schema for parameter: rosettafold2na_weights_path
  • local_component_structure - aria2_uncompress.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_esmfold_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_helixfold3_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_rosettafold2na_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_rosettafold_all_atom_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_alphafold3_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_boltz_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_alphafold2_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_colabfold_dbs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - post_processing.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 3.5.2
  • Run at 2026-04-21 00:20:55

jscgh added 3 commits April 20, 2026 15:35
Latest version is a tool release.
Template needs to be manually updated to satisfy nf-core-bot
@jscgh jscgh force-pushed the add-random_seed branch from 0c7fab4 to 4d66b6b Compare April 20, 2026 05:36
@jscgh jscgh marked this pull request as draft April 20, 2026 05:40
@jscgh jscgh force-pushed the add-random_seed branch from dbf3138 to 59b5ec0 Compare April 20, 2026 06:00
@jscgh jscgh marked this pull request as ready for review April 20, 2026 06:00
Comment thread conf/modules_alphafold2.config Outdated
Comment thread docs/usage.md
Copy link
Copy Markdown
Contributor

@tlitfin tlitfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have requested minor changes.

I am also a bit conflicted about whether it is best to:
a) Only support mode-specific flags (so there is no confusion if using the global flag for a non-supported mode). We do expose max-template-date as a mode specific flag only which is a similar precedent.
b) Only support global flag (to avoid creating many additional pipeline params since users will never want to set different mode-level seeds).
c) Current behaviour with global flag (for convenience) + mode-specific flags. Do the mode specific flags add value here?

My gut feel is a slight preference for b > a > c. Not sure if others have a strong opinion here.

We should probably review the way we define these shared parameters to make sure they are consistent (eg max-template-date - although this can probably be deprecated as a pipeline parameter and hard-coded to future date in ext.args).

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

Labels

enhancement Improvement for existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants