Skip to content

Minor update - #31

Merged
ypriverol merged 1 commit into
bigbio:fix/suppress-prot-inf-warningfrom
yueqixuan:fix/suppress-prot-inf-warning
Apr 3, 2026
Merged

ypriverol merged 1 commit into
bigbio:fix/suppress-prot-inf-warningfrom
yueqixuan:fix/suppress-prot-inf-warning

Conversation

@yueqixuan

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Apr 3, 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: a59d409d-09dc-4e12-a396-6a04b918f75b

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

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.

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Add mass accuracy parameters to DIA test configuration

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add mass accuracy configuration parameters to test config
• Set mass_acc_automatic to false for manual control
• Configure mass_acc_ms1 and mass_acc_ms2 to 10 ppm
Diagram
flowchart LR
  config["test_dia_dotd.config"]
  params["DIA Parameters"]
  mass["Mass Accuracy Settings"]
  config -- "adds" --> params
  params -- "includes" --> mass
Loading

Grey Divider

File Changes

1. conf/tests/test_dia_dotd.config ⚙️ Configuration changes +3/-0

Add mass accuracy configuration parameters

• Added mass_acc_automatic = false parameter
• Added mass_acc_ms1 = 10 parameter for MS1 mass accuracy
• Added mass_acc_ms2 = 10 parameter for MS2 mass accuracy
• Parameters configure mass accuracy settings for DIA analysis

conf/tests/test_dia_dotd.config


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 3, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX Issues (0)

Grey Divider


Remediation recommended

1. Preanalysis ignores mass_acc_ms* 🐞 Bug ≡ Correctness
Description
The test_dia_dotd profile sets mass_acc_automatic=false and mass_acc_ms1/ms2=10, but
PRELIMINARY_ANALYSIS never uses params.mass_acc_ms1/ms2 when mass_acc_automatic is false, so it
can still fall back to DIA-NN auto mass accuracy while also suppressing the Bruker auto-calibration
warning. This makes the new test config potentially misleading and can change calibration behavior
without any warning.
Code

conf/tests/test_dia_dotd.config[R43-45]

+    mass_acc_automatic = false
+    mass_acc_ms1 = 10
+    mass_acc_ms2 = 10
Evidence
In PRELIMINARY_ANALYSIS, the mass accuracy CLI flags are either omitted (automatic) or derived from
SDRF meta tolerances; params.mass_acc_ms1/ms2 are never used in that process, and the Bruker
warning is gated only by params.mass_acc_automatic rather than the effective behavior (mass_acc
being empty implies auto). Therefore setting mass_acc_automatic=false in the test profile can
suppress the warning while still producing auto-calibration behavior if SDRF tolerances are
missing/non-ppm.

conf/tests/test_dia_dotd.config[22-46]
modules/local/diann/preliminary_analysis/main.nf[48-62]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`conf/tests/test_dia_dotd.config` sets `mass_acc_automatic=false` and `mass_acc_ms1/ms2=10`, but `PRELIMINARY_ANALYSIS` does not use `params.mass_acc_ms1/ms2` at all. As a result, PRELIMINARY_ANALYSIS may still run with automatic mass accuracy (empty `mass_acc`), while the Bruker `.d` warning is suppressed because it checks only `params.mass_acc_automatic`.

### Issue Context
The warning in PRELIMINARY_ANALYSIS recommends `--mass_acc_automatic false --mass_acc_ms1 10 --mass_acc_ms2 10`, but those values currently only influence later stages/fallbacks, not PRELIMINARY_ANALYSIS.

### Fix Focus Areas
- modules/local/diann/preliminary_analysis/main.nf[48-62]
- conf/tests/test_dia_dotd.config[40-46]

### Suggested fix
Update PRELIMINARY_ANALYSIS mass accuracy selection so that when `params.mass_acc_automatic == false` it uses (in priority order):
1) SDRF ppm tolerances if present
2) else `params.mass_acc_ms2` / `params.mass_acc_ms1`
Also consider gating the Bruker `.d` warning on the *effective* behavior (e.g., whether `mass_acc` is empty) rather than only `params.mass_acc_automatic`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@yueqixuan
yueqixuan requested a review from ypriverol April 3, 2026 08:04
@ypriverol
ypriverol merged commit 4a36fa5 into bigbio:fix/suppress-prot-inf-warning Apr 3, 2026
8 checks passed
@yueqixuan
yueqixuan deleted the fix/suppress-prot-inf-warning branch April 3, 2026 22:33
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.

2 participants