Skip to content

Refactor/meta map#16

Merged
hyphaltip merged 4 commits into
mainfrom
refactor/meta-map
Jun 29, 2026
Merged

Refactor/meta map#16
hyphaltip merged 4 commits into
mainfrom
refactor/meta-map

Conversation

@hyphaltip

Copy link
Copy Markdown
Member

No description provided.

hyphaltip and others added 4 commits June 28, 2026 19:07
Two config-layer changes:

1. Define params.genome_dir = "${launchDir}/input_clean_genomes" in
   profile_annotate.config. It was referenced by the ASM_STATS call site
   (funannotate.nf:2063) but never defined, so `-profile test -stub-run`
   crashed with "Argument of file() function cannot be null" — i.e. CI on
   main was red. The value matches GENOME_CLEAN's storeDir target and
   earlgrey_mask.nf's identical param. Stub-run gate is now green (exit 0).

2. Rename the `module` provisioning profile to `ucr_hpcc` to mark it as an
   institutional (site-specific Lmod) profile, the nf-core/configs model.
   Portable runs use singularity/pixi. Updates nextflow.config, the renamed
   conf/provision_ucr_hpcc.config header, run_annotate.sh default, and doc refs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFGQVQDdSLEgpSJehG9qx5
…acking

Rewrite REFACTORING_PLAN.md as the single source of truth: the meta-map data
contract (Principle 0), target main.nf/workflows/subworkflows/modules layout,
per-process extraction checklist gated on stub-run, corrected migration order,
and the nf-core distance scorecard.

Remove IMPLEMENTATION_SUMMARY.md and MODULE_STRUCTURE.txt — status reports that
described aspiration as completed work and would rot.

Add .github/REFACTOR_ISSUES.md (epic + 12 ordered issues) and the idempotent
scripts/create_refactor_issues.sh that creates them via gh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFGQVQDdSLEgpSJehG9qx5
Phase 0 (#3) groundwork — the only safe, standalone sub-step ahead of the
atomic channel conversion:

- Add SampleUtils.makeMeta(row): the single authoritative definition of the
  per-sample `meta` map, reproducing the funannotate.nf `jobs` channel cleaning
  field-for-field so wiring it in will be behaviour-preserving. Not yet called.
- Promote the hardcoded header_length=24 constant to params.header_length
  (nextflow.config + nextflow_schema.json) — it is global, not per-sample, so it
  leaves the per-sample tuple in the conversion.
- Document the atomic conversion recipe (shim technique + the position-coupled
  channel-op translations) in REFACTORING_PLAN.md Principle 0.

No behaviour change: makeMeta is unused, header_length is still threaded through
the tuple for now. Stub-run gate green (completed=16, failed=0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFGQVQDdSLEgpSJehG9qx5
…l(meta), val/path(genome))

Replace the fragile positional 10-tuple
  tuple(out, asmid, species, strain, locustag, busco, header_length, transl_table, gz, taxonid)
with the standard DSL2 meta-map contract on every process and every channel op.

Processes converted (shim: alias block at script top, input/output rewritten):
  GENOME_CLEAN, GENOME_CLEAN_BATCH, MASKREPEAT_TANTAN_RUN, RNASEQ_PREPARE,
  FUNANNOTATE_TRAIN, FUNANNOTATE_PREDICT, ANTISMASH_RUN, INTERPROSCAN_RUN,
  SIGNALP_RUN, FUNANNOTATE_ANNOTATE, FUNANNOTATE_UPDATE

Workflow changes:
  - jobs channel: per-field defs → SampleUtils.makeMeta(row), emits tuple(meta, gz)
  - postpredict channel: same, emits just meta
  - All ~40 channel ops updated: filter/map destructuring, species-keyed groupTuple/combine,
    slice sentinels replaced, annotate chain simplified (meta-only)
  - clean_genome_ch: uses it[0] index (not fixed-arity destructure) so the gate works
    whether ifEmpty([]) contributes 0 or N elements to the combined sentinel

params.header_length (added in groundwork commit) now consumed in all processes;
removed from per-sample tuple entirely.

Stub-run gate: 13 completed, 0 failed (GENOME_CLEAN_BATCH + MASKREPEAT×2 +
FUNANNOTATE_PREDICT×2 + ANTISMASH×2 + INTERPROSCAN×2 + SIGNALP×2 + ANNOTATE×2).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AbWwmm9v6dJn13sgAJn3Sa
@hyphaltip
hyphaltip merged commit 3ccb72c into main Jun 29, 2026
2 checks passed
@hyphaltip
hyphaltip deleted the refactor/meta-map branch June 29, 2026 15:39
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