Skip to content

Handling DIANN parameters to get extended parameters to modules validated #660

Merged
ypriverol merged 25 commits intobigbio:devfrom
ypriverol:dev
Mar 1, 2026
Merged

Handling DIANN parameters to get extended parameters to modules validated #660
ypriverol merged 25 commits intobigbio:devfrom
ypriverol:dev

Conversation

@ypriverol
Copy link
Member

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
Copy link
Contributor

coderabbitai bot commented Feb 20, 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.

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances the DIA-NN workflow by adding support for custom command-line arguments via a new diann_extra_args parameter. The changes ensure that a single DIA-NN configuration file is shared across all DIA-NN processing steps, and introduce validation logic to prevent incompatible flags from being passed to specific DIA-NN steps.

Changes:

  • Added diann_extra_args parameter to allow users to pass custom DIA-NN arguments
  • Modified DIA workflow to convert the configuration channel to a value channel for reuse across multiple processes
  • Updated all DIA-NN modules (except INSILICO_LIBRARY_GENERATION) to receive and use the diann_config file for extracting modification flags
  • Implemented validation function to strip incompatible flags with warnings for each DIA-NN step

Reviewed changes

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

Show a summary per file
File Description
workflows/dia.nf Converts diann_cfg to value channel and passes it to all DIA-NN modules that need it
modules/local/diann/preliminary_analysis/main.nf Added diann_config input parameter and modification flag extraction logic
modules/local/diann/individual_analysis/main.nf Added diann_config input parameter and modification flag extraction logic
modules/local/diann/final_quantification/main.nf Added diann_config input parameter and modification flag extraction logic
modules/local/diann/assemble_empirical_library/main.nf Added diann_config input parameter and modification flag extraction logic
conf/modules/modules.config Added validateDiannExtraArgs function and updated ext.args for all DIA-NN steps to use it
nextflow.config Added diann_extra_args parameter with default null value
nextflow_schema.json Added schema definition for diann_extra_args parameter
ro-crate-metadata.json Added clarification about supported SDRF file extensions (.sdrf, .tsv, .csv)
.gitignore Added .claude/ directory to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jpfeuffer
Copy link
Collaborator

In theory not bad. Did you ask at nf-core how other people solved that so far?
I think this approach will not work if people overwrite ext.args in their config, so the usefulness is limited to the diann_extra parameter.

@ypriverol
Copy link
Member Author

In theory not bad. Did you ask at nf-core how other people solved that so far? I think this approach will not work if people overwrite ext.args in their config, so the usefulness is limited to the diann_extra parameter.

Im now in the nf-core channel discussing that.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 15 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ypriverol ypriverol changed the title Changes in DIANN parameters Handling DIANN parameters to get extended parameters to modules validated Feb 20, 2026
blocked.sort { a -> -a.length() }.each { flag ->
def flagPattern = '(?<=^|\\s)' + java.util.regex.Pattern.quote(flag) + '(?=\\s|\$)(\\s+(?!-{1,2}[a-zA-Z])\\S+)*'
if (args =~ flagPattern) {
log.warn "DIA-NN: '${flag}' is managed by the pipeline for INSILICO_LIBRARY_GENERATION and will be stripped."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add some hint on where the actual parameters that manage that can be found.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I still think this should be addressed. "Managed by the pipeline" wont help users if they are trying to change a parameter and get that warning.

@enryH
Copy link
Collaborator

enryH commented Feb 22, 2026

In theory not bad. Did you ask at nf-core how other people solved that so far? I think this approach will not work if people overwrite ext.args in their config, so the usefulness is limited to the diann_extra parameter.

Im now in the nf-core channel discussing that.

https://nfcore.slack.com/archives/CE6SDBX2A/p1771582947571129

@enryH
Copy link
Collaborator

enryH commented Feb 22, 2026

Is DIANN updated?

@ypriverol
Copy link
Member Author

This PR is related also with the new release of quantms refactoring going on: #663

Copy link

@Lukas-Neuhauser-HMS Lukas-Neuhauser-HMS left a comment

Choose a reason for hiding this comment

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

Hi @ypriverol,

I went through the PR. It neatly serves our needs. I have no further comments.

Also, cool that you addressed that diann_normalize was not passed to DIANN before and that performance_mode does now not block ext.args of PRELIMINARY_ANALYSIS anymore.

Thank you!
Lukas

@ypriverol
Copy link
Member Author

Thanks @Lukas-Neuhauser-HMS . Also for triggering more discussions in quantms #663 Please let us know if we have some more questions in those issues.

@ypriverol ypriverol requested a review from jpfeuffer February 25, 2026 09:30
Copy link
Collaborator

@jpfeuffer jpfeuffer left a comment

Choose a reason for hiding this comment

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

There is still an open comment about the relatively useless warnings.
And some concerning Github Copilot comments.

// MODULE: INDIVIDUAL_ANALYSIS
//
INDIVIDUAL_ANALYSIS(indiv_fin_analysis_in)
INDIVIDUAL_ANALYSIS(indiv_fin_analysis_in, ch_diann_cfg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do all DIA modules require the ch_diann_cfg parameter now, eg modifications?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch; let me double check this.

@enryH
Copy link
Collaborator

enryH commented Feb 26, 2026

I was reading a bit on ext.args, and just want to add it as a reference here: https://nf-co.re/docs/contributing/components/ext_args

@ypriverol ypriverol merged commit 9b4ea3a into bigbio:dev Mar 1, 2026
49 of 50 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

6 participants