docs(modkit/pileup): clarify BAM index, BED format, and --cpg requirements - #10341
docs(modkit/pileup): clarify BAM index, BED format, and --cpg requirements#10341sahuno wants to merge 3 commits into
Conversation
…ments in meta.yml
- Update BAI index pattern to *.{bai,csi} since modkit supports CSI indices via htslib
- Document that --include-bed requires BED3 or BED6 format (BED4 is rejected)
- Note that --cpg requires --modified-bases to be passed via ext.args
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Please post on the nf-core slack #github-invitations channel, to be added to the organisation so the tests runs. |
SPPearce
left a comment
There was a problem hiding this comment.
Is it worth adding a check in the module code itself for the --modified-bases or the number of columns in the bed file? Rather than just the meta.yml
For For better error reporting on the number of columns in the bed file, I feel like this is something that should be adressed in an issue at https://github.com/nanoporetech/modkit rather than checking it in the nf-core module. The tool is actively developed and maintained. |
|
Can you open an Issue over at the original repo then? :) |
|
Upstream issue opened at nanoporetech/modkit#605 — reporting that Also now part of the nf-core GitHub org so CI should run on this PR. |
|
@SPPearce @famosab — both blockers are now resolved:
Happy to address any further feedback! |
I think we could add a check in the module main.nf like but other than that I think it looks good But maybe the modified bases can not be deducted from the input then feel free to ignore :) |
…e-bed coupling
Verified each claim against modkit 0.6.1 rather than paraphrasing:
- A BED4 `--include-bed` fails with "improperly formatted BED line, must be
BED3 or BED6" followed by "zero valid positions parsed from BED file";
BED3 and BED6 both work. Quoting the exact strings makes the note greppable
when someone hits the error.
- `--include-bed` additionally requires `--motif` or `--modified-bases` in
ext.args, independently of `--cpg` ("currently, --include-bed requires a
--motif or --modified-bases"). This coupling was undocumented; added it to
the `bed` input description.
No `main.nf` change: modkit's own error for a missing `--modified-bases` is
already explicit, and the correct value (5mC, 5hmC, ...) depends on what the
basecaller tagged, so it cannot be deduced from the module inputs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP
|
@SPPearce @famosab @fellen31 — I went back to On adding a @famosab's On the BED column count: confirmed, and I've put the exact error text in BED3 and BED6 both work (1706 and 821 rows respectively on the test BAM). One extra coupling I found while testing, which wasn't in the original PR I've added that to the Upstream issue for the BED4 handling is at nanoporetech/modkit#605. |
Brings the branch up to date with master. The stale base made the `Get module name` step of the Linting workflow fail with "Argument list too long": paths-filter diffed 1521 commits' worth of module files into the inline github-script argv. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013fqrTt7TV2RSSUHaA4wP4v
Summary
*.baito*.{bai,csi}— modkit supports CSI indices via htslib, and ONT BAMs commonly use CSI--include-bedrequires strict BED3 or BED6 format — BED4 (e.g. UCSC CpG island downloads) is silently rejected, leading to a confusing "zero valid positions parsed" error--cpgrequires--modified-basesto also be passed viaext.args, otherwise modkit errors with "required arguments not provided"All three issues were discovered while testing the module with real ONT methylation data (mm10, dorado basecalled BAMs with 5mCG_5hmCG modifications).
Changes
Documentation-only changes to
meta.yml. No code changes tomain.nf.Test plan
--cpg --modified-bases 5mCproduces correct bedMethyl output🤖 Generated with Claude Code