Skip to content

fix(diann): use toList() not collect() for per-run mass-acc triples (runtime crash on DIA-NN >= 2.5.0) - #106

Merged
ypriverol merged 1 commit into
devfrom
fix/dia-mass-acc-tolist
Jun 9, 2026
Merged

ypriverol merged 1 commit into
devfrom
fix/dia-mass-acc-tolist

Conversation

@ypriverol

Copy link
Copy Markdown
Contributor

Summary

Hotfix for a runtime crash in the DIA-NN >= 2.5.0 mass-accuracy branch added in #104.

ch_parsed_vals maps each PRELIMINARY log to a [ms2, ms1, sw] triple, then .collect().map { rows -> rows.collect { it[0] } ... }. Nextflow's .collect() flattens nested lists, so rows was a flat list of Doubles and it[0] threw:

ERROR ~ Unknown method invocation `getAt` on Double type -- dia.nf line 294

Fix: .collect() -> .toList() (collects the per-run triples without flattening).

How it slipped through

CI only runs DIA-NN <= 2.2.0, which takes the else (assemble-log) branch; the new >= 2.5.0 branch was first executed by the Module 7 / DIA-NN 2.5.1 cluster validation, which caught it after the 6 PRELIMINARY tasks. The preliminary masses themselves were captured correctly (MS1 ~2.5 ppm); only the aggregation crashed.

The DIA-NN >= 2.5.0 mass-accuracy branch maps each PRELIMINARY log to a
[ms2,ms1,sw] triple, then aggregates. collect() FLATTENS nested lists, so the
downstream .map received a flat list of Doubles and 'it[0]' threw
'Unknown method invocation getAt on Double type' at runtime. toList() collects
the per-run triples without flattening. Caught by the Module 7 / DIA-NN 2.5.1
cluster validation (CI only exercises <2.5.0, which takes the other branch).
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9ff93d0d-c8d3-42ca-9f03-ee2a11b6960d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dia-mass-acc-tolist

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 9, 2026 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 71e1836

+| ✅ 108 tests passed       |+
#| ❔  18 tests were ignored |#
#| ❔   1 tests had warnings |#
!| ❗   4 tests had warnings |!
Details

❗ Test warnings:

  • files_exist - File not found: conf/igenomes.config
  • files_exist - File not found: conf/igenomes_ignored.config
  • files_exist - File not found: .github/workflows/awstest.yml
  • files_exist - File not found: .github/workflows/awsfulltest.yml

❔ Tests ignored:

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.0.2
  • Run at 2026-06-09 08:08:41

@ypriverol
ypriverol merged commit 71d1bac into dev Jun 9, 2026
11 checks passed
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.

1 participant