Expose DESeq2 interaction contrasts and separate fixed-module testing - #10
Merged
Merged
Conversation
CharlotteAnne
marked this pull request as ready for review
October 2, 2026 16:42
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.
Paired fraction experiments need gene-level interaction contrasts and a separate competitive test of a fixed gene module. The existing Flow interface exposes only pairwise DESeq2 comparisons with additive blocking, although DESeq2 itself supports these designs.
This adds
analysis_mode=design_contrastsusing DESeq2, with explicit design formulas and numeric coefficient-weight tables. Optionalmodule_test=cameralaunches a separate limma-voom CAMERA process with the same design and contrasts. Gene results, module results, fitted objects, normalization, filters and statistical assumptions are saved separately. Existing pairwise DESeq2 remains the default.DESeq2 uses Wald tests and unshrunk effects with 95% intervals, disables automatic count replacement and independent filtering after the explicit CPM filter, retains Cook's-distance exclusions as NA, and applies BH per contrast across expression-eligible genes. The module background never restricts DESeq2 gene tests. Explicitly declared tximport lengthScaledTPM count estimates are rounded only for DESeq2, with a rounding audit; fractional raw counts are rejected. CAMERA retains its own voom estimates and correlation-aware module tests, explicitly labeled rather than presented as DESeq2 output.
Validation:
The GSEA test previously required a geneheat plot deliberately disabled in upstream commit
85940e6. This removes that obsolete expectation and the dead commented plotting block. Both enrichment-table assertions remain; supported ORA plots must now be complete PDFs containing a page. Enrichment calculations and thresholds are unchanged.CI now uses the pinned setup-nextflow v2.1.4 action, bundled Nextflow distributions and Java 17/Temurin. It retains the old-version target and current-stable coverage, explicitly sets
NXF_SYNTAX_PARSER=v1for this repository’s existing Groovy-based DSL2/config, and disables matrix fail-fast so every compatibility job reports its result. The README documents the parser requirement; a strict-syntax migration is not claimed.Includes both Flow schema formats, documentation, a container build recipe and automated tests. Release requires review plus a tested immutable image and registration of a new Flow version. This PR does not deploy the pipeline, import biological data or run biological validation. Control-gene matching, assay QC and biological support/refutation rules remain explicit protocol responsibilities.