Skip to content

docs(modkit/pileup): clarify BAM index, BED format, and --cpg requirements#10341

Open
sahuno wants to merge 1 commit intonf-core:masterfrom
sahuno:fix/modkit-pileup-meta-docs
Open

docs(modkit/pileup): clarify BAM index, BED format, and --cpg requirements#10341
sahuno wants to merge 1 commit intonf-core:masterfrom
sahuno:fix/modkit-pileup-meta-docs

Conversation

@sahuno
Copy link

@sahuno sahuno commented Mar 6, 2026

Summary

  • Update BAM index pattern from *.bai to *.{bai,csi} — modkit supports CSI indices via htslib, and ONT BAMs commonly use CSI
  • Document that --include-bed requires strict BED3 or BED6 format — BED4 (e.g. UCSC CpG island downloads) is silently rejected, leading to a confusing "zero valid positions parsed" error
  • Note that --cpg requires --modified-bases to also be passed via ext.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 to main.nf.

Test plan

  • Verified module runs successfully with CSI-indexed BAMs via Nextflow on SLURM
  • Verified --cpg --modified-bases 5mC produces correct bedMethyl output
  • Verified BED3 input works after converting from BED4
  • Existing nf-test suite should pass unchanged (no code modifications)

🤖 Generated with Claude Code

…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>
@SPPearce
Copy link
Contributor

SPPearce commented Mar 6, 2026

Please post on the nf-core slack #github-invitations channel, to be added to the organisation so the tests runs.

Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

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

@fellen31
Copy link
Contributor

fellen31 commented Mar 6, 2026

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 --modified-bases, I think the tool handles that pretty clearly already, i.e.:

error: the following required arguments were not provided:
  --modified-bases <MODIFIED_BASES>...

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.

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.

3 participants