Skip to content

Assemble modelcif | Synthetic tests - #48

Draft
keiran-rowell-unsw wants to merge 63 commits into
devfrom
assemble_modelcif
Draft

keiran-rowell-unsw wants to merge 63 commits into
devfrom
assemble_modelcif

Conversation

@keiran-rowell-unsw

@keiran-rowell-unsw keiran-rowell-unsw commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Part implements an ASSEMBLE_MODELCIF{} process as sketched out https://github.com/orgs/nf-core/projects/151

  • DUMMY files used to populate ModelCIF fields
    • This PR avoids touching upstream workflow wiring intentionally: to merge first as test-suite then wire in values from pipeline carefully
    • DUMMY_METRIC.tsv now uses 'realistic' 20 residues values, and is synced with docs/output.md
  • Comprehensive nf-test suite:
    • Uses the RCSB CifCheck program to validate against the ModelArchive dictionary
    • Reject completely invalid .mmcif; distinguishes from .pdb; and uses a real ma-.cif deposition to validate fields
      assemble_modelcif_X has ext.args config files to test creation of .bcif, or PAE embedded or linked
  • msa_tool used to specify .protocol.CoevolutionMSAStep() since the steps in-container aren't always inspectable
  • DUMMY_SOFTWARE_DETAILS used to handle minimal protocol ingest into .mmcif classes for now
  • populate_modelcif.py has a variety of _helper() local functions leading to a build_modelcif() function populated by argparse

Test data: the following .cif files and dictionaries are used for testing, but not included in the PR to avoid binaries and line count inflation, they may be included in in test-datasets/proteinfold

  • mmcif_ddl.sdb
  • mmcif_ma.sdb
  • mmcif_pdbx_v50.sdb
  • ma-atiya1-gk-01.cif‎

Databases: databases will not be handled in .data.Datagroup.ReferenceDatabasein this PR. populate_modelcif.py is getting quite long already. Plus, it's a separate concept that can tie into the work done for reference dataset at NCI.

nf-core#575 might make this database handling easier, if considered valuable

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 4.0.3.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the Synchronisation documentation.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Failed ❌

Posted for pipeline commit 27fb788

+| ✅ 281 tests passed       |+
#| ❔   4 tests were ignored |#
!| ❗  15 tests had warnings |!
-| ❌   8 tests failed       |-
Details

❌ Test failures:

  • nf_test_content - 'tests/modelcif_sw_entries.nf.test' does not contain outdir parameter, it should contain outdir = "$outputDir"
  • nf_test_content - 'tests/modelcif_sw_entries.nf.test' does not snapshot a 'versions.yml' file
  • nf_test_content - 'tests/modelcif_validate.nf.test' does not contain outdir parameter, it should contain outdir = "$outputDir"
  • nf_test_content - 'tests/modelcif_validate.nf.test' does not snapshot a 'versions.yml' file
  • nf_test_content - 'tests/assemble_modelcif.nf.test' does not contain outdir parameter, it should contain outdir = "$outputDir"
  • nf_test_content - 'tests/assemble_modelcif.nf.test' does not snapshot a 'versions.yml' file
  • nf_test_content - 'tests/cifcheck.nf.test' does not contain outdir parameter, it should contain outdir = "$outputDir"
  • nf_test_content - 'tests/cifcheck.nf.test' does not snapshot a 'versions.yml' file

❗ Test warnings:

  • files_exist - File not found: conf/igenomes.config
  • files_exist - File not found: conf/igenomes_ignored.config
  • 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!
  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required
  • 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 nextflow.config: Specify any additional parameters here
  • 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_esmfold_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
  • local_component_structure - aria2_uncompress.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

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 4.0.3
  • Run at 2026-10-01 06:07:57

@keiran-rowell-unsw keiran-rowell-unsw changed the title Assemble modelcif Assemble modelcif | Synthetic tests Sep 16, 2026
@keiran-rowell-unsw

Copy link
Copy Markdown
Member Author

@jscgh, I'm going to leave this as-is and try to wire in a proper prediction -> modelCIF in a separate PR.
ESMFold first because the available metrics are simpler.

I can imagine the modelCIF logic changing if #49 and other PRs merge in so I won't finesse this right now.

keiran-rowell-unsw and others added 12 commits September 21, 2026 17:12
- populate_modelcif.py: --seed accepts a rank_N-keyed *_seed.tsv
  (assets/DUMMY_SEED.tsv) or a single int; single-seed methods
  (alphafold2/colabfold/boltz via --random_seed) get a shared
  seed SoftwareParameter; multi-seed methods (alphafold3-style
  seed x sample filenames) get per-model seeds shown in model
  names, since the modelcif dumper registers only one QA metric
  type per class.
- bin/utils.py: infer_model_seed() for AF3 'seed-N' and
  ColabFold '_seed_NNN' filenames.
- Fix: modelcif System._before_write() only harvests parameter
  groups from system.software_groups; the container_image
  SoftwareWithParameters appended to system.software in
  22aaf0b was silently dropped from the output mmCIF.
- assemble_modelcif/main.nf: seed notes; stale TODOs refreshed.
…lcif.py

- protocol: optional template_search_step (driven by software-details YAML)
  inserted upstream of the coevolution MSA step, with its own Data and
  shared step software.
- per-program verified model facts (uses_templates, has_recycling,
  ColabFold has_relaxation) emitted as boolean SoftwareParameters;
  --param KEY=VALUE adds/overrides entries (ints, floats, bools coerced).
- dummy software details: alphafold2 now carries a template_search_step.
- CHANGELOG entry for the ASSEMBLE_MODELCIF feature batch.

Co-Authored-By: pi <noreply@pi.dev>
…am keys

- environment.yml: pin modelCIF to 1.7 (pip syntax, ==) so the conda-resolved
  versions match the recorded snapshots; regenerate the three versions.yml
  snapshot hashes accordingly.
- populate_modelcif.py: --param use_templates now aliases to the canonical
  uses_templates key instead of adding a duplicate field.

Co-Authored-By: pi <noreply@pi.dev>
TemplateSearchStep previously inherited the modeling Software, claiming
AlphaFold2 searched the templates. It now resolves a dedicated Software
from template_search_software.name (YAML) or --template_software
(the topic: val("template_search"), val(tool) emission), with version
from --template_version / YAML, drawn from the known search tools
(hhsearch/hhblits/jackhmmer/mmseqs2/AFDB). Falls back to the modeling
software group when the tool is unknown, preserving old behaviour.

- DUMMY_SOFTWARE_DETAILS: alphafold2 -> hhsearch, alphafold3 -> mmseqs2
  (per upstream data pipelines), use_main_software false.
- new nf-test asserting the attribution.

Co-Authored-By: pi <noreply@pi.dev>
…Biology-Computing/proteinfold into assemble_modelcif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant