Repository navigation
rastair2/mbias: new module; rastair2/call: take M-bias cutoffs - #13678
Merged
Merged
Conversation
rastair2/mbias runs `rastair per-read` and `rastair mbias` on paired-end TAPS reads and writes an HTML M-bias report plus, per contig, the bases to ignore at each read end (line 1 for --nOT, line 2 for --nOB). rastair2/call takes an optional cutoffs file in its main input tuple (`[]` for none) and passes it as --nOT/--nOB. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eduard-watchmaker
marked this pull request as ready for review
November 10, 2026 18:10
…eters in tests Same test conventions as requested on #13641: lowercase `channel`, named closure parameters, and a bare `assert process.success` before assertAll. Shorter comment on why rastair2/mbias runs per-read itself. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 tasks done
rastair's M-bias report fails on an empty table (for example a --region without reads). Write a short report and no cutoffs files instead, so callers fall back to no trimming. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eduard-watchmaker
enabled auto-merge
November 10, 2026 20:10
Contributor
|
Hi @eduard-watchmaker! 👋 Excellent work on A few highlights from reviewing the PR:
Ready to merge from my perspective! 🚀 |
Contributor
Author
|
Hi @Lukecele thanks for the nice review! Any chance you can approve my PR? |
Lukecele
approved these changes
Nov 11, 2026
Lukecele
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Verified the rastair2/mbias module and the optional cutoff passing in rastair2/call. CI tests and lockfiles are 100% green. 🚀
Contributor
|
Congrats on the merge @eduard-watchmaker! Glad to have helped out! 🎉 |
eduard-watchmaker
added a commit
to nf-core/methylseq
that referenced
this pull request
Nov 11, 2026
… bwameth/align from nf-core master bam_taps_conversion (nf-core/modules#13641) and rastair2/call and rastair2/mbias (nf-core/modules#13678) are unchanged from the PR branch; modules.json now points at master. bwameth/align is updated to nf-core/modules#13642, which is the same code as the local patch, so the patch is dropped. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 tasks done
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.
Description of the PR
Adds
rastair2/mbiasand letsrastair2/calluse its output, so rastair version 2 can work out and apply M-bias trimming automatically, asrastair/mbias+rastair/mbiasparser+rastair/calldo for rastair 0.8.New module
rastair2/mbias. Runsrastair per-read(ext.args, e.g.--region), thenrastair mbiason the per-read BED (ext.args2). Outputs:html: the M-bias report, with the suggested cutoffs drawn on the plots.cutoffs: one<prefix>.<contig>.cutoffs.txtper contig with enough data. Line 1 is the value for--nOT, line 2 for--nOB(r1_start,r1_end,r2_start,r2_end).rastair 2 calculates the cutoffs itself (the M-bias report scans outwards from the middle of the read for positions that differ from the middle), so no separate parser module is needed.
rastair2/call. The main input is now[ meta, bam, index, mbias_cutoffs ], with[]for no trimming. A cutoffs file is passed as--nOT/--nOB. Existing snapshots are unchanged.Notes:
rastair mbias --bamresolves symlinks in R, so it looks for the.baiand.fainext to the original files and fails with Nextflow's staging. The module runsper-readitself instead and turns off the V-bias plots (they read the FASTA from R) and GC plots (they need a VCF).--r-script-dir.--regionwithout reads),rastair mbiasfails on the empty table, so the module writes a short report and no cutoffs files instead. Callers then fall back to no trimming.--region(for example a methylated spike-in like lambda, or part of one chromosome). That also gives a single cutoffs file.rastair2/call. Lint'sbioconda_latestwarning (htslib 1.24 -> 1.25) is expected: the cap comes from bcftools 1.24.Why: on in-house human TAPS data (hg38 + lambda), rastair 2 without trimming gives 0.964 pooled CpG methylation on the fully methylated lambda control. With the cutoffs from
rastair2/mbias(OT2,0,6,0, OB4,0,4,0) it gives 0.982, matching rastair 0.8 with its M-bias trimming. The unmethylated control stays at 0.005.bam_taps_conversionuses these to trim automatically in #13641, which has this branch merged in, so this PR should be merged first. nf-core/methylseq (taps_v2, nf-core/methylseq#638) already runs them from that branch.Generated by Claude Code
PR checklist
versions.ymlfile.labelnf-core modules test rastair2/mbias --profile dockerandrastair2/call(10/10 passed locally, also withdocker,arm64)nf-core modules test <MODULE> --profile singularity(CI)nf-core modules test <MODULE> --profile conda(CI)🤖 Generated with Claude Code