Skip to content

fix: repair moldb-enumerate-mols workflow and correct enumeration count#17

Merged
tdudgeon merged 1 commit into
mainfrom
fix-moldb-enumerate-mols-pipeline
Jul 20, 2026
Merged

fix: repair moldb-enumerate-mols workflow and correct enumeration count#17
tdudgeon merged 1 commit into
mainfrom
fix-moldb-enumerate-mols-pipeline

Conversation

@tdudgeon

Copy link
Copy Markdown
Collaborator

Summary

  • moldb/enumerate_mols.nf wired its enumerate process to nf-processes/rdkit/enumerate.nf, which wraps the top-level enumerate.py — that script only ever writes real SDF blocks. The downstream load_enum process (moldb.load_enums) expects tab-delimited smiles\tid\tcode .cxsmi records instead, causing IndexError: list index out of range at runtime.
  • moldb/enumerate.py (a separate, moldb-specific script) already supports exactly that .cxsmi output mode, but no Nextflow process wrapped it. Added nf-processes/moldb/enumerate.nf (following the existing nf-processes/moldb/filter.nf pattern) and repointed the include in enumerate_mols.nf.
  • Also fixed two multi-channel-output call sites in enumerate_mols.nf (load_enum(enumerate.out) and enumerate.out.subscribe) that needed explicit [0]/[1] indices — same convention already used everywhere else in this repo's .nf files (e.g. le_conformers.nf, frag-merge-pharmacophore.nf).
  • With the pipeline actually running end-to-end for the first time, moldb-count-rows's enumeration test turned out to have a stale hardcoded expected count (514). Verified across 3 independent fresh-database runs that the real, reproducible count is 529 (not RDKit embedding randomness — identical every run), and updated the test accordingly.

Test plan

  • jote --manifest data-manager/manifest-moldb.yaml against a real Postgres instance: all 12 tests now pass end-to-end (previously the run-group aborted at test 5/12, and even after the first fix, at test 6/12)

🤖 Generated with Claude Code

enumerate_mols.nf was wired to nf-processes/rdkit/enumerate.nf, which
wraps the top-level enumerate.py (SDF-only output). The downstream
load_enum process (moldb.load_enums) expects tab-delimited
smiles/id/code .cxsmi records, which moldb/enumerate.py already knows
how to produce via its --output *.cxsmi mode, but no Nextflow process
wrapped it. Added nf-processes/moldb/enumerate.nf to fill that gap and
repointed the include.

Also fixes two multi-channel-output call sites in enumerate_mols.nf
(load_enum(enumerate.out) and enumerate.out.subscribe) that needed
explicit [0]/[1] indices, matching the convention used elsewhere in
this repo's .nf files.

With the pipeline actually running end-to-end for the first time, the
moldb-count-rows "enumeration" test's hardcoded expected count (514)
turned out to be stale. Verified across 3 independent fresh-database
runs that the real, reproducible count is 529, and updated the test.

Verified with jote against a real Postgres instance: all 12 tests in
manifest-moldb.yaml now pass end-to-end (previously blocked at test
5/12).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tdudgeon
tdudgeon merged commit 52916c8 into main Jul 20, 2026
12 checks passed
@tdudgeon
tdudgeon deleted the fix-moldb-enumerate-mols-pipeline branch July 20, 2026 12:26
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