Skip to content

bismark/deduplicate, bismark/methylationextractor: size resources for Rust Bismark - #13944

Open
FelixKrueger wants to merge 1 commit into
nf-core:masterfrom
FelixKrueger:bismark-resources-rust
Open

FelixKrueger wants to merge 1 commit into
nf-core:masterfrom
FelixKrueger:bismark-resources-rust

Conversation

@FelixKrueger

Copy link
Copy Markdown
Contributor

bismark/deduplicate now passes --parallel min(task.cpus, 8), so Rust Bismark's multithreaded BAM decoding and encoding uses the cores the task requests. On a full methylseq run it used 1 of 12 requested CPUs before this change. The output is identical for any --parallel value.

bismark/methylationextractor moves to process_medium and no longer derives --multicore and --buffer_size from the task resources. Neither changes the output of Rust Bismark. Raising --multicore doesn't speed up extraction, and the task used 3 of 12 CPUs and 2.2 of 72 GB. Removing the two rules also stops them clashing with a user's --parallel or --ample_memory in ext.args.

Details (AI-assisted)
  • Measured on nf-core/methylseq test_full (7 PE WGBS samples). Before: dedup used 1.0 of 12 CPUs and 3.7 of 72 GB; the extractor used 3.1 of 12 CPUs and 2.2 of 72 GB. With this change: dedup uses 7–8 CPUs, and its total run time across the 7 samples falls from 1.06 h to 0.17 h. The extractor's run time is unchanged at process_medium.
  • Dedup stays process_high for memory at about 1 B read pairs (~55 GB). Extractor --CX runs need more memory than process_medium gives, which pipelines set in their own config.
  • An existing --parallel in ext.args is respected.
  • Module nf-tests and the fastq_align_dedup_bismark subworkflow tests pass against the current snapshots (no snapshot changes); only nf-core/methylseq uses these two modules.

PR checklist

  • This comment contains a description of changes (with reason).
  • Add a resource label
  • nf-core modules test bismark/deduplicate --profile docker, nf-core modules test bismark/methylationextractor --profile docker
  • nf-core subworkflows test fastq_align_dedup_bismark --profile docker

deduplicate passes `--parallel min(task.cpus, 8)` unless ext.args sets it:
Rust Bismark's BGZF decode/encode workers; output is byte-identical for any
value and gains stop at about 8. On methylseq test_full it used 1.0 of 12
requested CPUs.

methylationextractor moves to process_medium and no longer derives
`--multicore` (cpus/3) or `--buffer_size` (memory - 2G) from the task:
extra workers don't speed up Rust extraction, which is BAM-decode bound,
and the sort buffer is a Perl-era setting. On test_full it used 3.1 of 12
CPUs and 2.2 of 72 GB. Pipelines needing more (e.g. `--CX`) set it in
config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant