Skip to content

Modularization plan, ucr_hpcc institutional profile, and CI-green fix#15

Merged
hyphaltip merged 7 commits into
mainfrom
refactor/modularization-plan
Jun 29, 2026
Merged

Modularization plan, ucr_hpcc institutional profile, and CI-green fix#15
hyphaltip merged 7 commits into
mainfrom
refactor/modularization-plan

Conversation

@hyphaltip

Copy link
Copy Markdown
Member

Summary

Sets up the DSL2 modularization effort and fixes the broken stub-run/CI gate.
Note this branch also carries the 5 previously unpushed modularization
commits from local main (4c50fd8b115dbc) — origin/main was behind, so
they ride in here.

Changes

  • Fix params.genome_dir (CI-breaking). The ASM_STATS call site
    (funannotate.nf:2063) referenced params.genome_dir, which was never
    declared, so -profile test -stub-run crashed at graph build (file() cannot
    be null). Declared it as ${launchDir}/input_clean_genomes — the GENOME_CLEAN
    storeDir target, matching earlgrey_mask.nf. Stub-run now passes (exit 0).
  • Repivot provisioning moduleucr_hpcc as an institutional
    (site-specific Lmod) profile, the nf-core/configs model. Portable runs use
    singularity/pixi.
  • Authoritative REFACTORING_PLAN.md — meta-map data contract (Principle 0),
    target main.nf/workflows/subworkflows/modules layout, per-process
    extraction checklist gated on stub-run, corrected migration order, nf-core
    scorecard. Removes the two rot-prone status docs.
  • Issue tracking.github/REFACTOR_ISSUES.md (epic + 12 issues) and the
    idempotent scripts/create_refactor_issues.sh.

Verification

  • nextflow config . -profile annotate,slurm,ucr_hpcc — parses
  • nextflow run . -profile test -stub-run — exit 0, 14 processes
  • nextflow run . --help — renders

hyphaltip and others added 7 commits June 28, 2026 12:58
- Extract ASM_STATS process into modules/asm_stats.nf for reuse by both funannotate.nf and earlgrey_mask.nf
- Generate asm_stats.tsv automatically from clean genomes if --gen_asm_stats=true (default)
- Make SELECT_REPS optional in earlgrey_mask.nf via --skip_select_reps flag
- Add params for gen_asm_stats, skip_select_reps, and tables_dir to control these features
- When skip_select_reps=true, all genomes are processed for EarlGrey without size filtering

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Create reusable module for annotation workflows:
- ANTISMASH_RUN: Secondary metabolite detection
- INTERPROSCAN_RUN: Protein domain annotation
- SIGNALP_RUN: Signal peptide prediction

Document Phase 1-3 modularization plan for progressive extraction
of funannotate pipeline components into independent modules.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Reorganize refactoring plan to align with actual workflow:

GENOME PREPROCESSING:
- Clean: FCS_GX, sourpurge, vecscreen (modules/AAFTF/)
- Mask: TANTAN, REPEATMODELER, REPEATMASKER, EARLGREY, NONE (modules/repeatmasking/)
- Summary Stats: ASM_STATS (modules/AAFTF/)

GENE PREDICTION:
- RNA-seq: SRA_QUERY, SRA_FETCH, RNASEQ_PREPARE (modules/rnaseq_fetch/)
- Funannotate: TRAIN, PREDICT, UPDATE (modules/funannotate/)

ANNOTATION:
- Tools: ANTISMASH, SIGNALP, INTERPROSCAN (modules/annotate/)
- Final: FUNANNOTATE_ANNOTATE (modules/annotate/)

Add modules/README.md with development guidelines, testing procedures,
and step-by-step rollout plan for progressive extraction.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Create detailed ASCII diagram showing:
- Phase-by-phase module organization
- Data flow through all stages
- Input/output contracts for each process
- Current status and implementation priority
- Masking strategy options (TANTAN, REPEATMODELER, REPEATMASKER, EARLGREY, NONE)

Provides visual reference for implementation planning and code review.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Create detailed review document covering:
- Complete list of deliverables (4 working implementations)
- Full modularization plan (4 phases with directory structures)
- Implementation priority and rationale
- Critical decision points requiring expert review:
  * RNA-seq fetch extraction strategy
  * Repeat masking strategy selector design
  * AAFTF contamination tool extraction
  * Setup database ordering pattern
- Testing and compatibility concerns
- Rollout timeline and next steps

Ready for architecture review before implementation begins.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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
@hyphaltip
hyphaltip merged commit bb86cef into main Jun 29, 2026
2 checks passed
@hyphaltip
hyphaltip deleted the refactor/modularization-plan branch June 29, 2026 15:56
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