Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated to nf-core template 4.0.2 [#454](https://github.com/nf-core/mhcquant/pull/454)
- Updated all nf-core modules to their latest versions [#454](https://github.com/nf-core/mhcquant/pull/454)

### `Fixed`

- Fixed silent per-sample drop from order-dependent `combine(by:)` in QUANT [#460](https://github.com/nf-core/mhcquant/pull/460)

### `Dependencies`

| Dependency | Old version | New version |
Expand Down
7 changes: 6 additions & 1 deletion subworkflows/local/quant/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ workflow QUANT {

// Manipulate such that [meta_run1, idxml_run1, pout_group1], [meta_run2, idxml_run2, pout_group1] ...
ch_runs_score_switched
// Nextflow can only combine/join on the exact groupKey object, merge_id is not sufficient
.map { meta, idxml -> [groupKey([id: "${meta.sample}_${meta.condition}"], meta.group_count) , meta, idxml] }
// Combine on the unwrapped key.target ([id] map), NOT the groupKey object: GroupKey.equals()
// is asymmetric (groupKey.equals(map)==true but map.equals(groupKey)==false), so a
// groupKey-vs-map combine silently drops pairs depending on operand arrival order on AWS Batch
// (nextflow-io/nextflow#4104). filter_q_value carries the same [id] map, so map-vs-map equals
// is symmetric and order-independent.
.map { key, meta, idxml -> [key.target, meta, idxml] }
.combine(filter_q_value, by:0)
.map { group_meta, meta, idxml, q_value -> [meta, idxml, q_value] }
.set { ch_runs_to_filter}
Expand Down
Loading