Repository navigation
bam_taps_conversion: optional rastair version 2 caller (use_rastair2) - #13641
Conversation
New boolean input `use_rastair2`. false keeps the rastair 0.8 chain (mbias -> mbiasparser -> call -> methylkit) unchanged; true runs rastair2/call (VCF + CpG BED) and bcftools/stats on the VCF instead. One reference is shared by all samples, whether it is passed once or per sample. New outputs: vcf, vcf_tbi, bed, bed_tbi, bcftools_stats (empty when rastair 0.8 runs; the rastair 0.8 outputs are empty when rastair2 runs). Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Almost there, these are fairly minor nits, tbh:
- Blocking: use lowercase
channeland named closure parameters in the new tests. - Not blocking: put a bare
assert workflow.successbeforeassertAll(...), and write grouped inputs in test names as[ bam, bai ]. - The subworkflow logic looks good.
combine(...).first()handles both reference styles, and the rastair 0.8 path is unchanged.
While you are here (not blocking):
tests/main.nf.test:28-40also usesChannel.
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>
With use_rastair2, paired-end samples now run rastair2/mbias and their cutoffs are passed to rastair2/call as --nOT/--nOB; single-end samples are called untrimmed. If mbias reports several contigs, the longest one is used. New emits: mbias_html, mbias_cutoffs. Tests: lowercase `channel`, named closure parameters, bare `assert workflow.success`, and `[ bam, bai ]` in test names (review). New test with a paired-end and a single-end sample. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
Thanks! All points applied: bare assert workflow.success before assertAll, and [ bam, bai ] in the test names. This update also adds automatic M-bias trimming for rastair2, using the new rastair2/mbias from nf-core/modules#13678 · rastair2/mbias: new module…. |
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>
New sixth input `trims`: [] (estimate trims with rastair mbias/mbiasparser or rastair2/mbias, as before) or [ nOT, nOB ] to use those bases to ignore for both callers and skip the M-bias steps. Lets pipelines expose the trims as parameters. Invalid values are an error. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…verride - Run both TAPS callers through BAM_TAPS_CONVERSION (nf-core/modules#13641, installed from its branch until it is merged). rastair version 2 now estimates trims with rastair2/mbias (#13678), like rastair 0.8 does with mbias + mbiasparser. When they can't be estimated, nothing is trimmed. - --trim_OT/--trim_OB (default unset) replace the estimate for both callers. - --rastair2_mbias_region: region for the rastair2 M-bias estimate, by default the first 10 Mb of the longest contig. - Warn when rastair 0.8 gets single-end samples: it only calls properly paired reads, so they get no methylation calls. - rastair 0.8 modules updated to nf-core master (version topics); the mbiasparser patch is no longer needed. Generated by Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi @eduard-watchmaker! 👋 Just reviewed the updated test suite following @adamrtalbot's feedback:
Both the subworkflow logic and the accompanying test suite look clean, robust, and ready for merge! 🚀 |
|
Hi @Lukecele thanks for the review in here too, any chance you can approve the PR so I can merge? |
Lukecele
left a comment
There was a problem hiding this comment.
LGTM! Verified that all feedback points from @adamrtalbot are addressed (lowercase channel.of, clean assertions, descriptive test names). Tests and snapshots are 100% green. 🚀
|
@adamrtalbot can you approve too? Thanks! |
|
Yes soon give me free minutes free times
Il mer 11 nov 2026, 17:30 Eduard Casas ***@***.***> ha
scritto:
… @eduard-watchmaker <https://github.com/eduard-watchmaker> requested your
review on: nf-core/modules#13641
<#13641> bam_taps_conversion:
optional rastair version 2 caller (use_rastair2).
—
Reply to this email directly, view it on GitHub
<#13641?email_source=notifications&email_token=AU3A7UV6FNYSWO5IWHLFGD35YSH2LA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGNJYGE4TQMJWG42TTJTSMVQXG33OWBZGK5TJMV3V64TFOF2WK43UMVSKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#event-35819816759>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU3A7UQ7CCUXYGWPULXRC735YSH2LAVCNFSNUABFKJSXA33TNF2G64TZHMYTSOBZHAZDAOBTHNEXG43VMU5TMMRZGA3TQNBVG43KC5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AU3A7USYTLBDA3ITV5HAWD35YSH2LA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGNJYGE4TQMJWG42TTJTSMVQXG33OWBZGK5TJMV3V64TFOF2WK43UMVSKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AU3A7USHZ5IZSYTVASO4VMD5YSH2LA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGNJYGE4TQMJWG42TTJTSMVQXG33OWBZGK5TJMV3V64TFOF2WK43UMVSKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because your review was requested.Message ID:
***@***.***>
|
…re#13678) * rastair2/mbias: new module; rastair2/call: take M-bias cutoffs 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> * rastair2/mbias, rastair2/call: lowercase channel, named closure parameters in tests Same test conventions as requested on nf-core#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> * rastair2/mbias: no estimate instead of an error when no read has a CpG 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> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… 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>
This PR adds rastair version 2 as an optional caller in
bam_taps_conversion, for nf-core/methylseq's TAPS path, with automatic M-bias trimming. rastair 0.8 stays the default.use_rastair2(boolean).falseruns the existing rastair 0.8 chain unchanged:rastair/mbias→rastair/mbiasparser→rastair/call→rastair/methylkit. The existing test's outputs are byte-identical; its snapshot only gains the new, empty channels.trueruns rastair version 2:rastair2/mbiason paired-end samples, to find how many bases to ignore at each read end. Its report needs read-pair flags, so single-end samples are called without trimming.rastair2/callwith each sample's cutoffs as--nOT/--nOB(methylation/SNV VCF plus a CpG BED).bcftools/statson the VCF for MultiQC.trims(list).[]uses the M-bias estimate (rastair 0.8:rastair/mbias+rastair/mbiasparser; rastair version 2:rastair2/mbias).[ nOT, nOB ](eachr1_start,r1_end,r2_start,r2_end) uses those bases to ignore for both callers and skips the M-bias steps, so pipelines can expose the trims as parameters. Invalid values are an error. If the estimate can't be made (single-end samples for rastair2, or no reads with CpGs in range), nothing is trimmed.RASTAIR2_MBIASwith--regioninext.args(for example a methylated spike-in like lambda), which also keeps memory down on large genomes. If mbias reports several contigs, the subworkflow uses the longest one.vcf,vcf_tbi,bed,bed_tbi,bcftools_stats,mbias_htmlandmbias_cutoffs. Whichever caller isn't run leaves its outputs empty.bam_taps_conversion; nf-core/methylseq will passfalseor its--taps_callerchoice.meta.ymlsays so; pipelines should gate it behind an explicit opt-in.Tests: the existing rastair 0.8 test; rastair2 with two samples and one reference as a value channel (checks the cutoffs reach
call); a paired-end plus a single-end sample (only the paired-end one is trimmed); manualtrimsfor each caller (no M-bias steps, trims reachcall); invalidtrimsfails; and a rastair2 stub with a per-sample reference.Generated by Claude Code
PR checklist
nf-core subworkflows test bam_taps_conversion --profile docker(7 tests)nf-core subworkflows test bam_taps_conversion --profile singularity(CI)nf-core subworkflows test bam_taps_conversion --profile conda(CI)Lint: 0 failures, 0 warnings.
🤖 Generated with Claude Code