Skip to content

Merged - #95

Closed
KevinMLanderos wants to merge 3 commits into
mainfrom
v2
Closed

Merged #95
KevinMLanderos wants to merge 3 commits into
mainfrom
v2

Conversation

@KevinMLanderos

@KevinMLanderos KevinMLanderos commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Merged single-cell workflow and notebooks addition

zaidissa and others added 2 commits July 29, 2026 11:43
Purely additive integration — bulk pipeline unchanged (no files removed).

New: --mode dispatcher (bulk default | singlecell); single-cell modality with two
routes (full-SC with GEX Seurat, and VDJ-only). Single-cell data is pseudobulked and
run through the shared bulk engine (ANNOTATE / SAMPLE / PATIENT / COMPARE incl.
GIANA / GLIPH2 / TCRdist3 / OLGA), then CoNGA / consensus / repertoire / master summary.

Additive hooks in shared files (no bulk behaviour removed):
- ANNOTATE_FROM_CONCAT entrypoint; PATIENT cluster emits + --patient_col
- SAMPLE tcrdist emits (superset of the sample_csv emit); SAMPLE_PLOT gated to bulk
- GLIPH2 patient-prefixed cluster_member_details emit; tcrdist3 empty-nucseq handling
- Per-process container routing (tcrtoolkit + scratch-tcr) via --sc_container
- SC params added to nextflow.config and nextflow_schema.json (singlecell_options)

Validated end-to-end on real data for both single-cell routes (on the prior base).
Bulk cellranger/pseudobulk path, channel-based reports, and convert subworkflow are
kept exactly as in main.
  single-cell test coverage

  Merges the all_notebooks branch (report notebook pipeline wiring) into v2,
  incorporating PR #93 review feedback from Dima/Copilot, replaces the
  samplesheet's timepoint_order column with an optional pipeline parameter,
  and establishes real-execution test coverage for --mode singlecell -
  finding and fixing 8 real bugs in the process, all confirmed via actual
  container execution.

  Pipeline wiring (from all_notebooks)
  - Wire 3 more report notebooks into the pipeline: discovery brief, patient
    details part 1/2, on top of the existing QC report.
  - Add named emits for sample/patient/compare outputs needed by the new
    reports (v/j family, tcrdist/olga/vdjdb, convergence, tcrpheno,
    shared_cdr3, giana/gliph2).
  - Stage sibling {{< include >}}'d .qmd files alongside their parent
    notebook; resolve template_pheno.qmd / template_patient_clustering.qmd
    generic-include shims to the right notebook at render time, since Quarto
    includes have no native runtime conditional.
  - Fix legacy-vs-AIRR column naming mismatches, a convergence-file merge
    silently returning zero rows, and VDJdb/phenotype join-key bugs, all
    found by running the new notebooks end-to-end against real output.

  Merge conflicts with v2's single-cell modality (gliph2.nf, nextflow.config,
  nextflow_schema.json, subworkflows/local/{patient,sample}.nf) resolved by
  keeping both branches' additive changes, and rewriting patient.nf's
  gliph2_cluster_details emit as a direct ternary on GLIPH2_TURBOGLIPH.out
  per this Nextflow version's strict-syntax requirement.

  PR #93 review feedback (Copilot + Dima)
  - Fix a dead subject_col != subject_col conditional in
    template_discovery_brief.qmd.
  - Replace an outdated GLIPH2 example in RENDER_NOTEBOOK's staged_layout
    comment with the template_pheno.qmd case that's actually used.
  - Strengthen render_notebook.nf.test to assert staged symlinks actually
    exist, not just that HTML rendered.
  - Document the stage_cmds join separator, the ch_discovery_report
    .combine() safety argument, and trim an overlong comment.

  Timepoint ordering (team decision)
  - Remove the redundant timepoint_order column from the samplesheet.
  - Add --timepoint_order: an optional ordered comma-separated list (e.g.
    Base,Week4,EOT); unset defaults to numeric rank if every value parses
    as a number, otherwise alphabetical.
  - Compute timepoint_order_col at notebook-render time in every notebook
    that loads its own copy of the samplesheet; replace a dead
     fallback in template_overlap.qmd with
    a reuse of the rank already carried on clonotypes_df.

  Single-cell mode:
  Built synthetic-but-real fixtures (a real Seurat object with computed
  PCA/UMAP, real Cell Ranger-schema VDJ contigs) and nf-test coverage for
  VDJ_QC, TCELL_INTEGRATION, CLUSTER_TO_SC, and CONSENSUS_CLUSTERING - all
  now passing for real through the actual pipeline containers, plus a
  pipeline-level VDJ-only test in tests/main.nf.test (62 processes, full
  route from VDJ_QC through MASTER_SUMMARY).
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 481a871.

♻️ This comment has been updated with latest results.

…ts/nextflow.config, since GitHub Actions runners only have 4 CPUs while conf/base.config requests 8, causing every SC test (VDJ_QC, CONGA, CONSENSUS_CLUSTERING, TCELL_INTEGRATION, CLUSTER_TO_SC) to fail immediately with Process requirement exceeds available CPUs. This only overrides the CI test config, not production defaults.
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.

2 participants