Skip to content

removed features extract and idscoreswitcher - #554

Merged
ypriverol merged 11 commits into
bigbio:devfrom
daichengxin:dev
May 28, 2025
Merged

ypriverol merged 11 commits into
bigbio:devfrom
daichengxin:dev

Conversation

@daichengxin

Copy link
Copy Markdown
Collaborator

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).

@coderabbitai

coderabbitai Bot commented May 28, 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.


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 removes deprecated features and associated modules, streamlining the workflows by eliminating the extract_psm_features and id_score_switcher components while updating downstream processes accordingly.

  • Removed the extract_psm_features process and its usage in multiple subworkflows.
  • Replaced id_score_switcher calls with direct processing via ID_FILTER, introducing the use of dynamic score type values.
  • Adjusted related module interfaces and input tuples to reflect these removals.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
subworkflows/local/psm_rescoring/main.nf Removed extract_psm_features include and branching; updated PSM_CLEAN call accordingly.
subworkflows/local/psm_fdr_control/main.nf Eliminated id_score_switcher usage; transitioned to using ID_FILTER with a score type argument.
subworkflows/local/protein_inference/main.nf Updated ID_FILTER call to include protein score filtering.
subworkflows/local/phospho_scoring/main.nf Modified branching based on search engines and updated channel input for phospho scoring.
subworkflows/local/dda_id/main.nf Removed extract_psm_features dependency; added conditional phospho localization handling.
modules/local/openms/percolator/main.nf Removed the constant output “MS:1001491” from the output tuple.
modules/local/openms/id_filter/main.nf Updated input tuple to include a score_type argument and modified the process script accordingly.
modules/local/openms/extract_psm_features/{meta.yml, main.nf} Removed entirely as part of the feature extraction removal.
modules/local/openms/consensusid/main.nf Adjusted input tuple to drop an unused parameter.
Comments suppressed due to low confidence (2)

subworkflows/local/phospho_scoring/main.nf:16

  • Verify whether the extra escaped quotes in the string literal for Channel.value are intentional, as they may lead to an incorrect score type being passed.
ID_SCORE_SWITCHER(ch_id_files.combine(Channel.value("\"Posterior Error Probability_score\"")))

modules/local/openms/percolator/main.nf:14

  • Confirm that the removal of the constant value 'MS:1001491' from the output tuple does not affect downstream consumers that might rely on it.
tuple val(meta), path("*_perc.idXML"), emit: id_files_perc

@jpfeuffer

Copy link
Copy Markdown
Collaborator

Can you check if we can remove sage clean?
@timosachsenberg @ypriverol when was the fix introduced and which version is quantms using now?

@daichengxin

Copy link
Copy Markdown
Collaborator Author

Thanks @jpfeuffer. We use ghcr.io/bigbio/openms-tools-thirdparty:2025.04.14 container now. The fix was merged into openms dev branch in 10 Apr. So we can removed psm clean step, right?

@ypriverol
ypriverol requested a review from Copilot May 28, 2025 20:21

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 removes the legacy EXTRACT_PSM_FEATURES and ID_SCORE_SWITCHER modules, introduces a new psm_clean flag, and updates downstream workflows and processes to use PSM_CLEAN, ID_FILTER, and updated input/output signatures throughout.

  • Introduce psm_clean parameter and adjust PSM rescoring flow to use PSM_CLEAN when set
  • Replace single-engine FDR switching with ID_FILTER, update protein-level and phospho-scoring branches
  • Remove hardcoded CV term in Percolator output, add -FDR:PSM option, and clean up module configurations

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
subworkflows/local/psm_rescoring/main.nf Drop EXTRACT_PSM_FEATURES branch, add psm_clean conditional and default passthrough
subworkflows/local/psm_fdr_control/main.nf Remove ID_SCORE_SWITCHER, use ID_FILTER for single-engine control
subworkflows/local/protein_inference/main.nf Add Channel.value("-score:type_protein q-value") to ID_FILTER call
subworkflows/local/phospho_scoring/main.nf Refactor ID_SCORE_SWITCHER usage inside multi-engine guard, inline quoting tweak
subworkflows/local/dda_id/main.nf Simplify PSM feature extraction, add optional PHOSPHO_SCORING branch
nextflow_schema.json Add new boolean psm_clean parameter to schema
nextflow.config Introduce default psm_clean parameter
modules/local/openms/percolator/main.nf Remove val("MS:1001491") from PERCOLATOR output tuple
modules/local/openms/id_filter/main.nf Update ID_FILTER to accept val(score_type) in inputs
modules/local/openms/false_discovery_rate/main.nf Add -FDR:PSM ${params.run_fdr_cutoff} to process arguments
modules/local/openms/consensusid/main.nf Drop unused qval_score input from CONSENSUSID
conf/modules/modules.config Update withName patterns for FDR and ID_SCORE_SWITCHER processes
Comments suppressed due to low confidence (2)

subworkflows/local/phospho_scoring/main.nf:16

  • The string passed to Channel.value includes escaped quotes, resulting in the literal "Posterior Error Probability_score" rather than the intended score type. Remove the extra quotes so the value is Posterior Error Probability_score.
ID_SCORE_SWITCHER(ch_id_files.combine(Channel.value("\"Posterior Error Probability_score\"")))

modules/local/openms/percolator/main.nf:14

  • The PERCOLATOR process output tuple was changed from three elements to two by removing val("MS:1001491"). Downstream steps expecting the CV term will break. Please update downstream tuple unpacking or restore the missing CV value if still required.
tuple val(meta), path("*_perc.idXML"), emit: id_files_perc

ch_id_files_feats = PSM_CLEAN.out.idxml
ch_software_versions = ch_software_versions.mix(PSM_CLEAN.out.versions)
} else {
ch_id_files_feats = ch_id_files

Copilot AI May 28, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] In the fallback branch where neither ms2rescore nor psm_clean is true, ch_software_versions is not updated. If version tracking is needed here, consider mixing in the original ID/XML producer’s versions or explicitly documenting that no new versions apply.

Suggested change
ch_id_files_feats = ch_id_files
ch_id_files_feats = ch_id_files
ch_software_versions = ch_software_versions.mix(ch_file_preparation_results.versions)

Copilot uses AI. Check for mistakes.
}

withName: '.*:DDA_ID:ID_SCORE_SWITCHER' {
withName: '.*:DDA_ID:PHOSPHO_SCORING:ID_SCORE_SWITCHER' {

Copilot AI May 28, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The regex pattern for ID_SCORE_SWITCHER is scoped only to the DDA_ID:PHOSPHO_SCORING context, which may not cover other invocation paths. Consider generalizing this pattern or adding additional blocks for other workflows if needed.

Copilot uses AI. Check for mistakes.
@ypriverol
ypriverol merged commit 7bd1997 into bigbio:dev May 28, 2025
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.

4 participants