feat(#1-3): meta-map contract + INPUT_CHECK + repo skeleton - #17
Merged
Conversation
… subworkflows/local/) Issue #2 — INPUT_CHECK shared subworkflow Create subworkflows/local/input_check.nf encapsulating all samplesheet ingestion: splitCsv, taxon/asmid/suppress/n_test filters, SampleUtils.makeMeta, genome path resolution. Two emits: samples — val(meta) filters applied, no genome-existence check genomes — tuple(meta, gz) additionally gz.exists() filtered funannotate.nf: drop the 70-line inline suppressSet/taxonFilter/asmidFilter/ jobs-channel block; replace with INPUT_CHECK() + INPUT_CHECK.out.genomes. postpredict now derives from INPUT_CHECK.out.samples (no duplicate splitCsv). earlgrey_mask.nf: skip_select_reps=true path now calls INPUT_CHECK and maps meta → reps CSV, gaining taxon/asmid/suppress/n_test filtering it previously lacked entirely. Issue #3 — repo skeleton Create directory layout: modules/local/, subworkflows/local/, workflows/ git mv modules/asm_stats.nf → modules/local/asm_stats.nf Extract three annotation processes from funannotate.nf inline: modules/local/antismash_run.nf (ANTISMASH_RUN) modules/local/interproscan_run.nf (INTERPROSCAN_RUN) modules/local/signalp_run.nf (SIGNALP_RUN) Delete stale modules/annotation_tools.nf (old 10-tuple versions, superseded by the meta-map extraction into modules/local/). Update all include paths in funannotate.nf and earlgrey_mask.nf. Stub-run gate: 15 completed, 0 failed. 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.
Summary
Phases 0–1 of the DSL2 modularization plan (REFACTORING_PLAN.md): replace the fragile positional 10-tuple data contract with the standard meta-map, introduce INPUT_CHECK to
deduplicate samplesheet parsing, and establish the modules/local/ / subworkflows/local/ directory skeleton.
Closes #1 (meta-map contract), #2 (INPUT_CHECK subworkflow), #3 (repo skeleton)
Issue #1 — atomic meta-map conversion (799897a)
Every process was wired with a positional 10-tuple that required touching every call site to add a field. Replaced with the standard DSL2 contract throughout:
Before: tuple(out, asmid, species, strain, locustag, busco, header_length, transl_table, gz, taxonid)
After: tuple val(meta), val/path(genome)
meta = [id, asmid, species, strain, locustag, busco, transl_table, taxonid]
shell interpolations are untouched.
the sentinel is an empty list, 3+ when populated). A fixed { meta, _gz, _sentinel -> } closure fails on the 2-element case.
Issue #2 — INPUT_CHECK shared subworkflow (53deaef)
Extracted the samplesheet ingestion logic (duplicated between funannotate.nf and earlgrey_mask.nf) into subworkflows/local/input_check.nf. Emits two channels:
earlgrey_mask.nf's skip_select_reps=true path now calls INPUT_CHECK and gains taxon/asmid/suppress/n_test filtering it previously lacked entirely.
Issue #3 — repo skeleton (53deaef)
Directory layout established:
modules/local/ ← one process per file (convention)
subworkflows/local/ ← shared subworkflows
workflows/ ← future workflow entrypoints
Test plan
ANTISMASH/INTERPROSCAN/SIGNALP×2 → FUNANNOTATE_ANNOTATE×2)
🤖 Generated with Claude Code
https://claude.ai/code/session_01AbWwmm9v6dJn13sgAJn3Sa