Skip to content

First pipeline release - #54

Open
BenjaminWehnert1008 wants to merge 621 commits into
masterfrom
dev
Open

BenjaminWehnert1008 wants to merge 621 commits into
masterfrom
dev

Conversation

@BenjaminWehnert1008

@BenjaminWehnert1008 BenjaminWehnert1008 commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

First release: nf-core/deepmutscan v1.0.0

This PR merges dev into master for the first release of nf-core/deepmutscan. @MaximilianStammnitz and I would be very grateful for your release reviews 🙏🙂.

What this pipeline does

nf-core/deepmutscan processes deep mutational scanning (DMS) data from short-read sequencing of site-saturation mutagenesis libraries. It was primarily designed for shotgun sequencing of long open reading frames, where the variant library is randomly fragmented before sequencing (no tiling or barcoding), and it handles amplicon data in the same way. Importantly, because variant frequencies in shotgun sequencing data are often sparse – below 1 in 10,000 reads – and thus in the range of per-base sequencing error rates (Q30-Q40), we conceptualise and implement key single-nucleotide count error correction modules.

  1. Pre-processing and counting: FastQC → BWA-MEM alignment to a gene-sized (small) reference → samtools filtering (MAPQ ≥ 30, no indels) → vsearch read-pair merging and re-alignment → variant counting with a light-weight pysam/polars counter (replaces GATK AnalyzeSaturationMutagenesis, column-compatible output) → annotation and filtering against the programmed codon library (--mutagenesis_type).
  2. Error correction and library QC: single-nucleotide variant sequencing-error correction from read-linked "false double" mutants (maximum likelihood or empirical Bayes estimation) or from additionally supplied wildtype template sequencing data, with an interactive report; per-library QC plots (count heatmaps, positional coverage and count profiles, sequencing-depth rarefaction).
  3. Fitness: default log-ratio estimator relative to a high-quality and high-count synonymous wildtype proxy, rescaled to synonymous = 0 / stop = −1; optional DiMSum (--dimsum) and mutscan edgeR/limma (--mutscan); optional interactive 3D variant effect inspection tool from a user-supplied structure (--pdb).
  4. Reporting: A single, self-contained deepmutscan_report.html per run.

Testing

Known follow-ups

Done since this PR was opened:

Release review: many thanks @piplus2! We are working through the points in a few small PRs into dev (correctness of counting and mutscan, module containers/versions/ext.args, docs and citations). Once these are merged, we will reply to every point here in one go, so that only one re-review is needed.

Planned for later releases (see the milestones and the roadmap in #90):

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests! (pipeline-level nf-test with the test profile)
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/deepmutscan branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint). (passes with nf-core/tools 4.1.0; see Important! Template update for nf-core/tools v4.1.0 #65)
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).

Many thanks in advance to the reviewers, and to @mirpedrol and @mashehu for their guidance along the way.

MaximilianStammnitz and others added 30 commits November 25, 2025 11:14
updated image embedding in README.md and output.md
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
transfer parameter definitions from deepmutscan.nf to nextflow.config
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
Use templates for R scripts and use subworkflow for fitness calculation
Co-authored-by: Matthias Hörtenhuber <mashehu@users.noreply.github.com>
updated test data paths and other minor changes
fix usage of stops/synonymous mutations depending on availability
extended the possible codon alphabet; renamed 'max_diff_to_wt' to 'nnk_nns'
BenjaminWehnert1008 and others added 3 commits October 28, 2026 16:50
The Singularity images Seqera Containers builds use an Amazon Linux 2023 base
that ships no findutils, so MERGE_ALIGN failed with exit 127 under
-profile singularity. Globbing with bash parameter expansion needs no external
binary. The leading ./ is kept so $INDEX stays ./bwa/<prefix>, which bwa writes
into the BAM PG header, leaving the snapshot unchanged.
Resolve the BWA index prefix without find(1)
Container metadata, conda lock files and container configs for all local modules
@MaximilianStammnitz

Copy link
Copy Markdown
Collaborator

Hi @piplus2,

Thanks again for your follow-up! We have completed both of these remaining points now:

  1. Conda/Singularity CI (Brandnew README #2): after the 4.2.1 template update and the master merge (Important! Template update for nf-core/tools v4.2.1 #94, Resolve the BWA index prefix without find(1) #96), the full conda, docker and singularity matrix is green on the current head (eb0d3ce), for both Nextflow 25.10.4 and latest-everything.
  2. Container configs (Added functional hyperlinks to Readme #3): with Container metadata, conda lock files and container configs for all local modules #97, conf/containers_*.config now cover all local modules. We generated them with nf-core modules containers create, which built Docker and Singularity images for amd64 and arm64, conda lock files and the containers: sections in each meta.yml. Modules with identical environment.yml files share one image. There are two exceptions, both noted in docs/usage.md:

We also set manifest.diagram to the metro map. nf-core pipelines lint --release passes with 0 failures; the only warnings left are the Zenodo placeholder and newer nf-core module versions, which we'd update in v1.1.0.

Could you take another look when you have time? Many thanks!

@piplus2 piplus2 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MaximilianStammnitz and @BenjaminWehnert1008,

Thanks for wrapping these up! I checked the current head (eb0d3ce): the full conda/docker/singularity matrix is green on both Nextflow versions, and conf/containers_*.config now cover all local modules. The arm64 exceptions for RUN_MUTSCAN and RUN_DIMSUM are reasonable and well documented in usage.md. All my inline threads are resolved too.

The remaining items (release date/name, Zenodo DOI, module version bumps, EDAM) are fine as release-day tasks or follow-ups.

Great work on this, it's a big improvement since the first round. LGTM, congrats on the first release! 🎉

@maxulysse maxulysse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First quick pass.

I am slightly confused by the execution trace, are you in need of such a file in your report?

Comment thread CHANGELOG.md Resolved
Comment thread workflows/deepmutscan.nf Resolved
…TML report now links to Nextflow's execution report instead of reading the trace
Corrections to the CHANGELOG and report no longer reading the trace

@maxulysse maxulysse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the R scripts could gain to be re-assess.

I like that you kept them bundled in templates, but I do think we can move to bin, and try to reuse some of the code, instead of copying it.

Made some other comments on the code.

I would pay attention to queue vs value channel for the references.

Other general comment on my part, is I think some part are slightly too complex, or over designed, and would gain from being simplified, but I know how hard it can be, and I do like what you have made here, but I think collaborators and future you would like less maintenance burden

Comment thread workflows/deepmutscan.nf Resolved
Comment thread modules/local/fastq_check/main.nf Resolved
Comment thread workflows/deepmutscan.nf Resolved
…oadcasts; COUNTS_TO_FITNESS version; apptainer image for RUN_DIMSUM; new snapshot
@MaximilianStammnitz

MaximilianStammnitz commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks again @maxulysse for these thorough checks! 😇

The value channel update and some other small fixes are now in #99. On the R scripts and overall complexity: fair point. @BenjaminWehnert1008 and I agree that shared R code should live in one place, and we've opened #101 for v1.1.0. A good part of our v1.1.0 performance overhaul plans already goes towards that direction: fewer but larger processes, improved thread use and some tool replacements/upgrades (e.g. FastQC --> Falco #102).

Value channels for the reference and samplesheet; COUNTS_TO_FITNESS version; apptainer for RUN_DIMSUM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

6 participants