Refactor/meta map#16
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.