Gc bias genomes - #71
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for generating GC bias curves per organism when using composite references that provide a gc_groups_dir, while still producing the whole-reference curve. This fits the pipeline’s “collect statistics” stage and extends what gets forwarded into downstream aggregation.
Changes:
- Introduces
gc_bias_curvessubworkflow to run Picard GC bias on whole reference and (optionally) per-contig-group subsets, plus concatenation of curves. - Adds new modules for subsetting BAMs by contig group and concatenating GC bias metrics.
- Extends reference configuration to include
gc_groups_dirfor multiple genomes and updates reference paths.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| subworkflows/gc_bias_curves.nf | New subworkflow orchestrating whole-reference and per-group GC bias generation. |
| modules/subset_bam_to_contig_group.nf | New process to subset BAMs to contig groups with header validation for Picard compatibility. |
| modules/gc_bias.nf | Refactors GC bias process to be reusable for whole vs group curves and to label group in output metrics. |
| modules/concatenate_gc_bias.nf | New process to combine whole + per-group GC bias metrics into one file. |
| main.nf | Switches pipeline to use gc_bias_curves and adds optional --genome_contigs aggregation input when contig groups exist. |
| conf/references.config | Adds gc_groups_dir entries and updates reference file locations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| ///////// Collect statistics /////// | ||
| gc_bias( md_bams, genome_fa, genome_fai ) | ||
| gc_bias_curves( md_bams ) |
|
Fixed the snapshots and pinned the versions of nextflow so that we don't have the CI failures anymore |
lnblum
left a comment
There was a problem hiding this comment.
Looks good to me. Bit of a bummer that we have to write all the bams another time for really big runs, but not sure there's a feasible streaming option that doesn't make debugging harder.
Did you happen to test the workflow for a genome without gc_groups_dir, as I'm guessing folks running it externally may not use this feature?
I may have tried to derive contigs.txt and the bed file from an fai to reduce the number of independent inputs..what was your thinking around that?
|
I guess the ideal scenario (for a later improvement) would be to patch the gc bias tool to take a contig list and calculate on the fly. Probably pretty easy to add... |
|
Turned into a larger thing to incorporate the gc_groups and updating all of the genomes in the amazon bucket (including adding mouse). Updated the snapshots and pinned versions so that CI failures don't creep up again. |
No description provided.