Skip to content

feat: expose Biosaur2 as alternative feature seeding algorithm for LFQ#694

Merged
ypriverol merged 1 commit intobigbio:devfrom
ypriverol:feat/biosaur2-seeding
Apr 4, 2026
Merged

feat: expose Biosaur2 as alternative feature seeding algorithm for LFQ#694
ypriverol merged 1 commit intobigbio:devfrom
ypriverol:feat/biosaur2-seeding

Conversation

@ypriverol
Copy link
Copy Markdown
Member

Summary

Add lfq_seeding_algorithm parameter to select the feature detection seeding algorithm in ProteomicsLFQ:

  • multiplex (default) — FeatureFinderMultiplex, current behavior
  • biosaur2 — Biosaur2 algorithm, recently added to OpenMS (#8385)

What is Biosaur2?

A C++ reimplementation of the Biosaur2 feature detection algorithm (Abdrakhimov et al., RCMS 2022). It detects peptide features by building RT traces ("hills"), splitting at valleys, and assembling isotopic patterns with cosine scoring.

ProteomicsLFQ already tunes the Biosaur2 defaults internally (mini=500, minlh=3), so no additional parameters need to be exposed.

Changes

File Change
modules/local/openms/proteomicslfq/main.nf Pass -Seeding:algorithm ${params.lfq_seeding_algorithm}
nextflow.config Add lfq_seeding_algorithm = 'multiplex'
nextflow_schema.json Document the parameter

Test plan

  • Default (multiplex) produces identical results to current version
  • lfq_seeding_algorithm = 'biosaur2' runs successfully on a standard LFQ dataset

🤖 Generated with Claude Code

Add `lfq_seeding_algorithm` parameter (default 'multiplex') to select
the feature detection seeding algorithm in ProteomicsLFQ. The 'biosaur2'
option uses the Biosaur2 algorithm recently added to OpenMS (PR #8385),
which provides hill-based trace linking with built-in mass calibration.

No Biosaur2-specific parameters are exposed since ProteomicsLFQ already
tunes the defaults internally (mini=500, minlh=3, pasefminlh=2).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 4, 2026

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: 95484349-a7a3-43d8-bb69-ee2eccb2095d

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
Contributor

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Review Summary by Qodo

Expose Biosaur2 as alternative LFQ seeding algorithm

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add lfq_seeding_algorithm parameter to ProteomicsLFQ
• Support Biosaur2 as alternative feature detection algorithm
• Default to 'multiplex' for backward compatibility
• Document parameter in schema with enum validation
Diagram
flowchart LR
  A["lfq_seeding_algorithm parameter"] --> B["nextflow.config"]
  A --> C["nextflow_schema.json"]
  A --> D["PROTEOMICSLFQ process"]
  B --> E["Default: multiplex"]
  C --> F["Enum: multiplex, biosaur2"]
  D --> G["-Seeding:algorithm flag"]
Loading

Grey Divider

File Changes

1. modules/local/openms/proteomicslfq/main.nf ✨ Enhancement +1/-0

Pass seeding algorithm parameter to ProteomicsLFQ

• Add -Seeding:algorithm ${params.lfq_seeding_algorithm} flag to ProteomicsLFQ command
• Positioned before -Seeding:intThreshold parameter
• Enables runtime selection of feature detection algorithm

modules/local/openms/proteomicslfq/main.nf


2. nextflow.config ⚙️ Configuration changes +1/-0

Add seeding algorithm configuration parameter

• Add lfq_seeding_algorithm = 'multiplex' parameter with default value
• Include inline comment explaining algorithm options
• Positioned in ProteomicsLFQ flags section

nextflow.config


3. nextflow_schema.json 📝 Documentation +7/-0

Document seeding algorithm parameter in schema

• Add lfq_seeding_algorithm schema definition to protein_quantification_lfq section
• Define as string type with enum constraint ['multiplex', 'biosaur2']
• Set default to 'multiplex' with descriptive help text
• Assign seedling icon for UI representation

nextflow_schema.json


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review bot commented Apr 4, 2026

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Missing seeding algorithm validation 🐞 Bug ☼ Reliability
Description
PROTEOMICSLFQ injects params.lfq_seeding_algorithm directly into the ProteomicsLFQ CLI without
runtime validation (or quoting), so an invalid/empty value provided via CLI/custom config can cause
the process to fail at runtime. The enum in nextflow_schema.json and the default in
nextflow.config do not enforce correctness during execution.
Code

modules/local/openms/proteomicslfq/main.nf[51]

+        -Seeding:algorithm ${params.lfq_seeding_algorithm} \\
Evidence
The module passes the parameter straight into the shell command (`-Seeding:algorithm
${params.lfq_seeding_algorithm}`), while the schema enum is only documentation/UI and the only
runtime safeguard is a default value in nextflow.config. The repo already uses explicit
error(...) checks for invalid params elsewhere, indicating a pattern you can reuse to fail fast
with a clear message.

modules/local/openms/proteomicslfq/main.nf[38-55]
nextflow_schema.json[1054-1073]
nextflow.config[184-191]
workflows/quantms.nf[111-117]

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

## Issue description
`params.lfq_seeding_algorithm` is passed directly to the `ProteomicsLFQ` command line. Because Nextflow schema enums are not enforced at runtime, users can still override this parameter to unsupported/empty values, leading to runtime failures with unclear tool errors.

## Issue Context
- A default is set in `nextflow.config`, but CLI overrides and custom configs can still set invalid values.
- Add a fail-fast validation (using the existing project pattern of `error(...)`) before any LFQ execution.
- Optionally quote the CLI value in the module to avoid accidental splitting if whitespace ever appears.

## Fix Focus Areas
- modules/local/openms/proteomicslfq/main.nf[38-55]
- workflows/quantms.nf[111-117]
- workflows/lfq.nf[1-120] (or wherever LFQ params are best validated)

ⓘ 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

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

"enum": ["feature_intensity", "spectral_counting"],
"fa_icon": "fas fa-list-ol"
},
"lfq_seeding_algorithm": {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use some help_text on what the differences are.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe with reference to the paper or openms tool documentation.

@ypriverol ypriverol merged commit 15bff40 into bigbio:dev Apr 4, 2026
91 of 93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants