Skip to content

Align scdownstream with sc-best-practices defaults and backlog#303

Open
nictru wants to merge 25 commits into
devfrom
best-practices
Open

Align scdownstream with sc-best-practices defaults and backlog#303
nictru wants to merge 25 commits into
devfrom
best-practices

Conversation

@nictru

@nictru nictru commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR aligns nf-core/scdownstream with the sc-best-practices workflow and closes the remaining pipeline backlog items tracked in the publication concordance doc.

  • QC and preprocessing defaults: MAD-based filtering, mito ≤8%, min_cells=20, SoupX ambient correction, scDblFinder with annotate-only doublets
  • Feature selection and normalisation: binomial deviance default; optional log1p, scran, and Pearson residual layers via normalization_methods / transformed_layer
  • Differential expression: multi-engine de_methods framework with pseudobulk PyDESeq2/edgePython auto-triggering; filtered Wilcoxon cluster markers in reports
  • Annotation: unified annotation: naming, manifest-driven cluster aggregation, and optional CyteType integration
  • Clustering and integration (latest): Leiden flavor=igraph; new neighbors_n_pcs parameter; optional --tsne embeddings; Scanorama integration with Symphony-style preprocessing

Also adds a python_only profile (scAR + Scrublet + HVGs) and updates usage, output, and reproducibility documentation.

Generated by Composer

Test plan

  • nf-core pipelines lint
  • nf-test test on affected modules and subworkflows (cluster, integrate, scanorama, tsne, neighbors, leiden)
  • nextflow run . -profile test,docker --outdir <OUTDIR>

nictru added 8 commits July 8, 2026 09:19
Update samplesheet schema defaults (MAD, mito cap, min_cells), default
doublet detection to scDblFinder, and add --doublet_removal for optional
filtering. Centralise QC thresholds in schema_input.json and make
SCANPY_FILTER skip unset thresholds while always computing QC metrics.
Swap default ambient correction to scAR and doublet detection to Scrublet
when running with -profile python_only alongside a container profile.
Introduce scry/deviance module and --feature_selection (hvgs|deviance|none),
defaulting to deviance per sc-best-practices, with python_only and tests
pinned to HVGs and integration_hvgs renamed to integration_n_features.
… subworkflows.

Unify rank-genes-groups, pseudobulk, and edgePython sc DE under de_methods; extract RANK_GENES_GROUPS, orchestrate via DIFFERENTIAL_EXPRESSION, remove skip_rankgenesgroups, and ensure CyteType always runs on Wilcoxon markers.
Unify per-sample donor_col to obs donor during QC, infer pseudobulking from DE methods, and expand MultiQC marker-gene and QC reporting with updated docs and tests.
Introduce log1p, scran, and Pearson residual modules with a NORMALIZATION
subworkflow, normalization_methods and transformed_layer parameters, and
native sparse layer fragments merged via ch_layers at finalize.
Standardise per-cell and cluster annotation column propagation via manifests, add cluster annotation orchestration, and ensure filtered marker genes feed reports and downstream consumers.

Generated by GPT-5.5.
Set Leiden to igraph, expose neighbors_n_pcs, add optional t-SNE, and wire Scanorama integration with Symphony-style preprocessing and container configs.

Generated by Composer
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 922697c

+| ✅ 313 tests passed       |+
#| ❔   1 tests had warnings |#
!| ❗  15 tests had warnings |!
Details

❗ Test warnings:

  • files_exist - File not found: conf/igenomes.config
  • files_exist - File not found: conf/igenomes_ignored.config
  • readme - README contains the placeholder zenodo.XXXXXXX. This should be replaced with the zenodo doi (after the first release).
  • pipeline_todos - TODO string in README.md: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file.
  • pipeline_todos - TODO string in README.md: Add bibliography of tools and data used in your pipeline
  • pipeline_todos - TODO string in nextflow.config: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in CONTRIBUTING.md: Add any pipeline specific contribution guidelines here, such as coding styles, procedures, checklists etc.
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in base.config: Customise requirements for specific processes.
  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.0.2
  • Run at 2026-07-13 18:53:06

nictru added 17 commits July 11, 2026 09:04
Default to scran normalisation with transformed_layer=scran, override in
python_only to log1p/log1p_norm, and document which integrations consume
the layer versus raw counts or internal normalisation.
Add pearson_residuals_hvgs with counts_layer-aware HVG selection on raw
counts, remove the pearson_residuals normalisation layer, and update schema,
docs, and nf-tests accordingly.
Layer-aware integrations now always read the precomputed log1p or scran layer with explicit log_normalize=false, and the shifted-log AnnData layer is renamed to log1p for alignment with the method name.
INTEGRATE now delegates HVG, deviance, and Pearson-residual gene filtering plus empty-cell removal to FEATURE_SELECTION, matching the NORMALIZATION split.
Regenerate snapshots for modules whose outputs changed under the local apptainer/daisybio test profile.

Generated by Composer
Use `container` instead of `conda` in lock-file configs so CI matches
the format produced by nf-core/tools 4.0.2.
Regenerate snapshots for subworkflows whose outputs changed under the local apptainer/daisybio test profile.

Generated by Composer
Build a dedicated SCRAN_NORMALIZATION container, align combine/sub_integrate tests with the single normalization_method input, and harden cell-cycle, rank-genes, and deviance outputs.
…ce paths.

Harden module templates for gene symbol handling, size factors, and empty DE results, align quality-control assertions with filtered outputs, and refresh snapshots.

Generated by Composer
Correct the swapped PER_GROUP inputs in scdownstream, switch SoupX-sensitive
pipeline tests to decontX, remove the redundant build_minimal test, and update
passing pipeline snapshots.
Normalise complete parents once, keep layers in H5ADs, subset intersection genes for integration via ADATA_SUBSETVAR, and stop forwarding integration feature-selection var fragments to FINALIZE so union parents finalize without axis mismatches.
Use structural snapshots for the normalization subworkflow test and regenerate pipeline snapshots after the COMBINE/FINALIZE output changes.
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