Skip to content

Pass correct flag to ProteinQuantifier - #581

Merged
ypriverol merged 4 commits into
bigbio:devfrom
johnne:devel
Sep 8, 2025
Merged

ypriverol merged 4 commits into
bigbio:devfrom
johnne:devel

Conversation

@johnne

@johnne johnne commented Sep 8, 2025 •

Copy link
Copy Markdown
Contributor

User description

This PR modifies how the fix_peptides parameter is passed to ProteinQuantifier.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the bigbio/quantms branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

PR Type

Bug fix


Description

  • Fix incorrect flag format for fix_peptides parameter in ProteinQuantifier

  • Change from -fix_peptides to -consensus:fix_peptides


Diagram Walkthrough

flowchart LR
  A["ProteinQuantifier Process"] --> B["Parameter Flag Fix"]
  B --> C["Correct Consensus Flag Format"]
Loading

File Walkthrough

Relevant files
Bug fix
main.nf
Fix parameter flag format for consensus                                   

modules/local/openms/protein_quantifier/main.nf

  • Update fix_peptides parameter flag from -fix_peptides to
    -consensus:fix_peptides
  • Maintain conditional logic for parameter application
+1/-1     

@coderabbitai

coderabbitai Bot commented Sep 8, 2025 •

Copy link
Copy Markdown
Contributor

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.

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

Walkthrough

Updated the ProteinQuantifier process to pass "-consensus:fix_peptides" instead of "-fix_peptides" when params.fix_peptides is true. No other arguments or control flow were changed.

Changes

Cohort / File(s) Summary
ProteinQuantifier CLI flag update
modules/local/openms/protein_quantifier/main.nf
Replaced CLI flag "-fix_peptides" with "-consensus:fix_peptides" under the PROTEIN_QUANTIFIER process when params.fix_peptides is enabled; other options unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

Poem

I twitch my nose at flags so neat,
A colon hops where dashes meet.
Consensus paths now softly glide,
Fixing peptides, aligned in stride.
In fields of code I thump, elate—
Small hops that make the pipelines great. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 Sep 8, 2025

Copy link
Copy Markdown

This PR is against the master branch ❌

  • Do not close this PR
  • Click Edit and change the base to dev
  • This CI test will remain failed until you push a new commit

Hi @johnne,

It looks like this pull-request is has been made against the johnne/quantms master branch.
The master branch on nf-core repositories should always contain code from the latest release.
Because of this, PRs to master are only allowed if they come from the johnne/quantms dev branch.

You do not need to close this PR, you can change the target branch to dev by clicking the "Edit" button at the top of this page.
Note that even after this, the test will continue to show as failing until you push a new commit.

Thanks again for your contribution!

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Flag Propagation

Verify that the updated variable fix_peptides is actually used in the command block; if it isn’t interpolated into the executed command, the flag change will have no effect.

fix_peptides = params.fix_peptides ? "-consensus:fix_peptides" : ""
normalize = params.normalize ? "-consensus:normalize" : ""
export_mztab = params.export_mztab ? "-mztab ${pro_quant_exp.baseName}_openms.mzTab" : ""

"""

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
modules/local/openms/protein_quantifier/main.nf (1)

29-45: Quote file paths to be robust to spaces.

Safer to quote path expansions to avoid breakage when filenames contain spaces.

-        -in ${epi_filt_resolve} \
-        -design ${pro_quant_exp} \
-        -out ${pro_quant_exp.baseName}_protein_openms.csv \
-        ${export_mztab} \
-        -peptide_out ${pro_quant_exp.baseName}_peptide_openms.csv \
+        -in "${epi_filt_resolve}" \
+        -design "${pro_quant_exp}" \
+        -out "${pro_quant_exp.baseName}_protein_openms.csv" \
+        ${export_mztab:+-mztab "${pro_quant_exp.baseName}_openms.mzTab"} \
+        -peptide_out "${pro_quant_exp.baseName}_peptide_openms.csv" \
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e516ddc and ed124d7.

📒 Files selected for processing (1)
  • modules/local/openms/protein_quantifier/main.nf (1 hunks)
🔇 Additional comments (3)
modules/local/openms/protein_quantifier/main.nf (3)

25-25: Correct flag: use -consensus:fix_peptides (matches OpenMS CLI).

OpenMS exposes this boolean under the consensus namespace; there is no top-level -fix_peptides flag. Change aligns with docs. (openms.de, openms.org)


24-27: Confirm semantics with top:N/include_all.

fix_peptides interacts with top:N and -top:include_all (e.g., top:0 + fix_peptides => “peptides present in every sample”). Please confirm current defaults produce the intended behavior for your datasets. (openms.de)


29-45: No remaining -fix_peptides references detected
Refined searches confirmed there are no literal uses of the deprecated -fix_peptides flag elsewhere in the codebase.

This comment was marked as outdated.

@ypriverol

ypriverol commented Sep 8, 2025 •

Copy link
Copy Markdown
Contributor

@johnne can you do the PR against dev branch? When you do it can you close this PR.

@ypriverol
ypriverol marked this pull request as draft September 8, 2025 08:32
@jpfeuffer

Copy link
Copy Markdown
Collaborator

Thank you very much! You are absolutely correct. One question: why did you need to comment out the container for sdrf-parsing?

@jpfeuffer
jpfeuffer changed the base branch from master to dev September 8, 2025 08:57
@johnne

johnne commented Sep 8, 2025

Copy link
Copy Markdown
Contributor Author

@jpfeuffer

Commenting out the sdrf-pipelines is not needed for this specifically. My intention was to make that change in another branch and use it for internal purposes only and I accidentally pushed it to devel instead. Commenting it out was to use a personal fork that fixed another issue with sdrf-pipelines (See bigbio/sdrf-pipelines#237)

@johnne
johnne marked this pull request as ready for review September 8, 2025 10:27
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Flag Consistency

Verify that other related flags for ProteinQuantifier still use the correct namespaces (e.g., '-consensus:' vs '-top:') to ensure uniform CLI semantics and prevent mixed-scope options.

include_all = params.include_all ? "-top:include_all" : ""
fix_peptides = params.fix_peptides ? "-consensus:fix_peptides" : ""
normalize = params.normalize ? "-consensus:normalize" : ""
export_mztab = params.export_mztab ? "-mztab ${pro_quant_exp.baseName}_openms.mzTab" : ""

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@ypriverol
ypriverol requested a review from Copilot September 8, 2025 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an incorrect parameter flag format for the fix_peptides parameter in the ProteinQuantifier module. The change corrects the flag from -fix_peptides to -consensus:fix_peptides to match the expected OpenMS tool parameter format.

  • Update parameter flag format to use proper OpenMS consensus namespace

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ypriverol

Copy link
Copy Markdown
Contributor

Thanks @johnne for changing the PR to dev. Let's wait for the tests to happen.

@ypriverol

Copy link
Copy Markdown
Contributor

Looks like everything is good, then I will go and merge. Thanks @johnne for your contribution, and I hope this one is a first in multiple ones, welcome to #quantms project.

@ypriverol
ypriverol merged commit 2444b25 into bigbio:dev Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants