From cc3f8958da3217f8329d57d2ee8c8c1c82c9fd32 Mon Sep 17 00:00:00 2001 From: Wei Zhongchun <152124864+weizhongchun@users.noreply.github.com> Date: Tue, 30 Dec 2025 16:28:53 +0800 Subject: [PATCH 1/6] using the bigbio onsite module --- conf/dev.config | 2 +- modules.json | 5 + modules/bigbio/onsite/environment.yml | 7 ++ modules/bigbio/onsite/main.nf | 123 ++++++++++++++++++++ modules/bigbio/onsite/meta.yml | 56 +++++++++ modules/bigbio/onsite/tests/main.nf.test | 112 ++++++++++++++++++ modules/bigbio/onsite/tests/nextflow.config | 3 + modules/local/openms/onsite/main.nf | 118 ------------------- modules/local/openms/onsite/meta.yml | 45 ------- subworkflows/local/phospho_scoring/main.nf | 2 +- 10 files changed, 308 insertions(+), 165 deletions(-) create mode 100644 modules/bigbio/onsite/environment.yml create mode 100644 modules/bigbio/onsite/main.nf create mode 100644 modules/bigbio/onsite/meta.yml create mode 100644 modules/bigbio/onsite/tests/main.nf.test create mode 100644 modules/bigbio/onsite/tests/nextflow.config delete mode 100644 modules/local/openms/onsite/main.nf delete mode 100644 modules/local/openms/onsite/meta.yml diff --git a/conf/dev.config b/conf/dev.config index 32068544..cafcbe19 100644 --- a/conf/dev.config +++ b/conf/dev.config @@ -24,6 +24,6 @@ process { // ONSITE uses its own container (not OpenMS thirdparty) withName: '.*:PHOSPHO_SCORING:ONSITE' { - container = {"${ ( workflow.containerEngine == 'singularity' || workflow.containerEngine == 'apptainer' ) && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/pyonsite:0.0.1--pyhdfd78af_0' : 'quay.io/biocontainers/pyonsite:0.0.1--pyhdfd78af_0' }"} + container = {"${ ( workflow.containerEngine == 'singularity' || workflow.containerEngine == 'apptainer' ) && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/pyonsite:0.0.2--pyhdfd78af_0' : 'quay.io/biocontainers/pyonsite:0.0.2--pyhdfd78af_0' }"} } } diff --git a/modules.json b/modules.json index 046be9cb..fe67c11c 100644 --- a/modules.json +++ b/modules.json @@ -40,6 +40,11 @@ "https://github.com/bigbio/nf-modules.git": { "modules": { "bigbio": { + "onsite": { + "branch": "main", + "git_sha": "0c3e1d26f1fe547888ee4b7c57120e1703f53eff", + "installed_by": ["modules"] + }, "thermorawfileparser": { "branch": "main", "git_sha": "a1a4a11ff508b2b5c23c9fb21c51c3327b748d4d", diff --git a/modules/bigbio/onsite/environment.yml b/modules/bigbio/onsite/environment.yml new file mode 100644 index 00000000..f1d5c788 --- /dev/null +++ b/modules/bigbio/onsite/environment.yml @@ -0,0 +1,7 @@ +name: onsite +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::pyonsite=0.0.2 diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf new file mode 100644 index 00000000..ee6cff1c --- /dev/null +++ b/modules/bigbio/onsite/main.nf @@ -0,0 +1,123 @@ +process ONSITE { + tag "$meta.mzml_id" + label 'process_medium' + label 'onsite' + + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/pyonsite:0.0.2--pyhdfd78af_0' : + 'quay.io/biocontainers/pyonsite:0.0.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path(mzml_file), path(id_file) + + output: + tuple val(meta), path("${id_file.baseName}_*.idXML"), emit: ptm_in_id_onsite + path "versions.yml", emit: versions + path "*.log", emit: log + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.mzml_id}" + + // Algorithm selection: ascore (default), phosphors, or lucxor + def algorithm = params.onsite_algorithm ?: 'ascore' + + // Common parameters for all algorithms + def fragment_tolerance = params.onsite_fragment_tolerance ?: '0.05' + + // Set default value for add_decoys (can be overridden by setting params.onsite_add_decoys = false) + def onsite_add_decoys = params.containsKey('onsite_add_decoys') ? params.onsite_add_decoys : true + + // Algorithm-specific parameters + def fragment_unit = '' + def add_decoys = onsite_add_decoys ? '--add-decoys' : '' + def debug = params.onsite_debug ? '--debug' : '' + + // Build algorithm-specific command + def algorithm_cmd = '' + + if (algorithm == 'ascore') { + // AScore: uses -in, -id, -out, --fragment-mass-unit + fragment_unit = params.onsite_fragment_unit ?: 'Da' + algorithm_cmd = """ + onsite ascore \\ + -in ${mzml_file} \\ + -id ${id_file} \\ + -out ${id_file.baseName}_ascore.idXML \\ + --fragment-mass-tolerance ${fragment_tolerance} \\ + --fragment-mass-unit ${fragment_unit} \\ + ${add_decoys} \\ + ${debug} \\ + ${args} + """ + } else if (algorithm == 'phosphors') { + // PhosphoRS: uses -in, -id, -out, --fragment-mass-unit + fragment_unit = params.onsite_fragment_unit ?: 'Da' + algorithm_cmd = """ + onsite phosphors \\ + -in ${mzml_file} \\ + -id ${id_file} \\ + -out ${id_file.baseName}_phosphors.idXML \\ + --fragment-mass-tolerance ${fragment_tolerance} \\ + --fragment-mass-unit ${fragment_unit} \\ + ${add_decoys} \\ + ${debug} \\ + ${args} + """ + } else if (algorithm == 'lucxor') { + // LucXor: uses -in, -id, -out, --fragment-error-units (note: error-units not mass-unit) + fragment_unit = params.onsite_fragment_error_units ?: 'Da' + def fragment_method = params.onsite_fragment_method ?: 'CID' + def min_mz = params.onsite_min_mz ?: '150.0' + def max_charge = params.onsite_max_charge_state ?: '5' + def max_peptide_len = params.onsite_max_peptide_length ?: '40' + def max_num_perm = params.onsite_max_num_perm ?: '16384' + def modeling_threshold = params.onsite_modeling_score_threshold ?: '0.95' + def scoring_threshold = params.onsite_scoring_threshold ?: '0.0' + def min_num_psms = params.onsite_min_num_psms_model ?: '50' + def rt_tolerance = params.onsite_rt_tolerance ?: '0.01' + + // Optional target modifications - default for LucXor includes decoy + def target_mods = params.onsite_target_modifications ? "--target-modifications ${params.onsite_target_modifications}" : "--target-modifications 'Phospho(S),Phospho(T),Phospho(Y),PhosphoDecoy(A)'" + def neutral_losses = params.onsite_neutral_losses ? "--neutral-losses ${params.onsite_neutral_losses}" : "--neutral-losses 'sty -H3PO4 -97.97690'" + def decoy_mass = params.onsite_decoy_mass ? "--decoy-mass ${params.onsite_decoy_mass}" : "--decoy-mass 79.966331" + def decoy_losses = params.onsite_decoy_neutral_losses ? "--decoy-neutral-losses ${params.onsite_decoy_neutral_losses}" : "--decoy-neutral-losses 'X -H3PO4 -97.97690'" + + algorithm_cmd = """ + onsite lucxor \\ + -in ${mzml_file} \\ + -id ${id_file} \\ + -out ${id_file.baseName}_lucxor.idXML \\ + --fragment-method ${fragment_method} \\ + --fragment-mass-tolerance ${fragment_tolerance} \\ + --fragment-error-units ${fragment_unit} \\ + --min-mz ${min_mz} \\ + ${target_mods} \\ + ${neutral_losses} \\ + ${decoy_mass} \\ + ${decoy_losses} \\ + --max-charge-state ${max_charge} \\ + --max-peptide-length ${max_peptide_len} \\ + --max-num-perm ${max_num_perm} \\ + --modeling-score-threshold ${modeling_threshold} \\ + --scoring-threshold ${scoring_threshold} \\ + --min-num-psms-model ${min_num_psms} \\ + --rt-tolerance ${rt_tolerance} \\ + ${debug} \\ + ${args} + """ + } else { + error "Unknown onsite algorithm: ${algorithm}. Supported algorithms: ascore, phosphors, lucxor" + } + + """ + ${algorithm_cmd} \\ + 2>&1 | tee ${id_file.baseName}_${algorithm}.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + onsite: \$(onsite --version 2>&1 | grep -oP 'version \\K[0-9.]+' || echo "unknown") + algorithm: ${algorithm} + END_VERSIONS + """ +} diff --git a/modules/bigbio/onsite/meta.yml b/modules/bigbio/onsite/meta.yml new file mode 100644 index 00000000..c5b998be --- /dev/null +++ b/modules/bigbio/onsite/meta.yml @@ -0,0 +1,56 @@ +name: onsite +description: Post-translational modification (PTM) localization using onsite algorithms (AScore, PhosphoRS, LucXor) +keywords: + - onsite + - PTM + - phosphorylation + - AScore + - PhosphoRS + - LucXor + - modification + - localization +tools: + - onsite: + description: | + Comprehensive Python package for mass spectrometry post-translational modification (PTM) localization. + Provides algorithms for confident phosphorylation site localization and scoring, including + implementations of AScore, PhosphoRS, and LucXor (LuciPHOr2). + homepage: https://github.com/bigbio/onsite + documentation: https://github.com/bigbio/onsite/blob/main/README.md + tool_dev_url: https://github.com/bigbio/onsite + doi: "" + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', mzml_id:'sample1' ] + - mzml_file: + type: file + description: Input spectrum file in mzML format + pattern: "*.mzML" + - id_file: + type: file + description: Protein/peptide identifications file in idXML format + pattern: "*.idXML" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', mzml_id:'sample1' ] + - ptm_in_id_onsite: + type: file + description: Protein/peptide identifications file with PTM localization scores + pattern: "*_{ascore,phosphors,lucxor}.idXML" + - log: + type: file + description: Log file from onsite execution + pattern: "*.log" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@ypriverol" + - "@weizhongchun" diff --git a/modules/bigbio/onsite/tests/main.nf.test b/modules/bigbio/onsite/tests/main.nf.test new file mode 100644 index 00000000..8e452063 --- /dev/null +++ b/modules/bigbio/onsite/tests/main.nf.test @@ -0,0 +1,112 @@ +nextflow_process { + + name "Test Process ONSITE" + script "../main.nf" + process "ONSITE" + tag "modules" + tag "modules_onsite" + tag "onsite" + + test("Should run AScore algorithm") { + + when { + process { + """ + input[0] = [ + [ id: 'test', mzml_id: 'test_sample' ], + file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), + file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + ] + """ + } + params { + onsite_algorithm = 'ascore' + } + } + + then { + assert process.success + assert snapshot(process.out.versions).match("versions_ascore") + assert process.out.ptm_in_id_onsite.size() == 1 + assert process.out.log.size() == 1 + // Check output file has correct naming + assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_ascore.idXML') + } + } + + test("Should run PhosphoRS algorithm") { + + when { + process { + """ + input[0] = [ + [ id: 'test', mzml_id: 'test_sample' ], + file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), + file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + ] + """ + } + params { + onsite_algorithm = 'phosphors' + } + } + + then { + assert process.success + assert snapshot(process.out.versions).match("versions_phosphors") + assert process.out.ptm_in_id_onsite.size() == 1 + assert process.out.log.size() == 1 + // Check output file has correct naming + assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_phosphors.idXML') + } + } + + test("Should run LucXor algorithm") { + + when { + process { + """ + input[0] = [ + [ id: 'test', mzml_id: 'test_sample' ], + file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), + file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + ] + """ + } + params { + onsite_algorithm = 'lucxor' + } + } + + then { + assert process.success + assert snapshot(process.out.versions).match("versions_lucxor") + assert process.out.ptm_in_id_onsite.size() == 1 + assert process.out.log.size() == 1 + // Check output file has correct naming + assert process.out.ptm_in_id_onsite[0][1].toString().endsWith('_lucxor.idXML') + } + } + + test("Should run stub mode") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'test', mzml_id: 'test_sample' ], + file(params.test_data['proteomics']['onsite']['mzml'], checkIfExists: true), + file(params.test_data['proteomics']['onsite']['idxml'], checkIfExists: true) + ] + """ + } + } + + then { + assert process.success + assert snapshot(process.out.versions).match("versions_stub") + } + } +} diff --git a/modules/bigbio/onsite/tests/nextflow.config b/modules/bigbio/onsite/tests/nextflow.config new file mode 100644 index 00000000..0293c16f --- /dev/null +++ b/modules/bigbio/onsite/tests/nextflow.config @@ -0,0 +1,3 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } +} diff --git a/modules/local/openms/onsite/main.nf b/modules/local/openms/onsite/main.nf deleted file mode 100644 index fbd5de0b..00000000 --- a/modules/local/openms/onsite/main.nf +++ /dev/null @@ -1,118 +0,0 @@ -process ONSITE { - tag "$meta.mzml_id" - label 'process_medium' - label 'openms' - - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pyonsite:0.0.2--pyhdfd78af_0' : - 'quay.io/biocontainers/pyonsite:0.0.2--pyhdfd78af_0' }" - - input: - tuple val(meta), path(mzml_file), path(id_file) - - output: - tuple val(meta), path("${id_file.baseName}_onsite_*.idXML"), emit: ptm_in_id_onsite - path "versions.yml", emit: versions - path "*.log", emit: log - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.mzml_id}" - - // Select algorithm (ascore, phosphors, or lucxor) - def algorithm = params.onsite_algorithm ?: 'lucxor' - - // Basic parameters - def fragment_tolerance = params.onsite_fragment_tolerance ?: 0.5 - def fragment_units = params.onsite_fragment_error_units ?: 'Da' - def threads = params.onsite_threads ?: task.cpus - def add_decoys = params.onsite_add_decoys ?: false - def min_psms = params.onsite_min_psms ?: 5 - def disable_split_by_charge = params.onsite_disable_split_by_charge ?: false - def compute_all_scores = params.onsite_compute_all_scores != null ? params.onsite_compute_all_scores : true - - // Algorithm-specific parameters - def fragment_method = params.onsite_fragment_method ?: meta.dissociationmethod - def neutral_losses = params.onsite_neutral_losses ? "--neutral-losses ${params.onsite_neutral_losses}" : "" - def decoy_mass = params.onsite_decoy_mass ? "--decoy-mass ${params.onsite_decoy_mass}" : "" - def decoy_losses = params.onsite_decoy_neutral_losses ? "--decoy-neutral-losses ${params.onsite_decoy_neutral_losses}" : "" - def min_psms_param = "--min-num-psms-model ${min_psms}" - - // Debug options - onsite only accepts --debug flag without value - def debug = params.onsite_debug ? "--debug" : "" - - // Build algorithm-specific parameter strings - def tolerance_param = "" - def method_param = "" - def algorithm_specific_params = "" - def decoy_param = "" - - if (algorithm == 'lucxor') { - // LucXor uses --fragment-error-units and --fragment-method - tolerance_param = "--fragment-error-units ${fragment_units}" - method_param = fragment_method ? "--fragment-method ${fragment_method}" : "" - algorithm_specific_params = "${neutral_losses} ${decoy_mass} ${decoy_losses} ${min_psms_param}" - - // Add LucXor-specific parameters - // Note: disable_split_by_charge is only supported by LucXor - if (disable_split_by_charge) { - algorithm_specific_params += " --disable-split-by-charge" - } - if (compute_all_scores) { - algorithm_specific_params += " --compute-all-scores" - } - - // LucXor uses --target-modifications - // Build target modifications list from params.mod_localization - if (params.mod_localization) { - def target_mods = params.mod_localization.tokenize(',').collect { it.trim() } - - // Add decoy modification if enabled - if (add_decoys) { - target_mods.add('PhosphoDecoy(A)') - } - - // Format as command line arguments - decoy_param = "--target-modifications '${target_mods.join(',')}'" - } else if (add_decoys) { - // If no mod_localization specified but decoys enabled, use default with decoy - decoy_param = "--target-modifications 'Phospho(S),Phospho(T),Phospho(Y),PhosphoDecoy(A)'" - } - } else { - // AScore and PhosphoRS use --fragment-mass-unit - tolerance_param = "--fragment-mass-unit ${fragment_units}" - method_param = "" - algorithm_specific_params = "" - - // Add compute_all_scores parameter for AScore and PhosphoRS - // Note: disable_split_by_charge is LucXor-specific and not used here - if (compute_all_scores) { - algorithm_specific_params += " --compute-all-scores" - } - - // AScore and PhosphoRS use --add-decoys flag - if (add_decoys) { - decoy_param = "--add-decoys" - } - } - - """ - onsite ${algorithm} \\ - -in ${mzml_file} \\ - -id ${id_file} \\ - -out ${id_file.baseName}_onsite_${algorithm}.idXML \\ - --fragment-mass-tolerance ${fragment_tolerance} \\ - ${tolerance_param} \\ - --threads ${threads} \\ - ${method_param} \\ - ${decoy_param} \\ - ${algorithm_specific_params} \\ - ${debug} \\ - 2>&1 | tee ${id_file.baseName}_onsite_${algorithm}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - onsite: \$(onsite --version 2>&1 | grep -oP 'version \\K[0-9.]+' || echo "0.0.1") - END_VERSIONS - """ -} diff --git a/modules/local/openms/onsite/meta.yml b/modules/local/openms/onsite/meta.yml deleted file mode 100644 index cb207df4..00000000 --- a/modules/local/openms/onsite/meta.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: onsite -description: PTM site localization using onsite (AScore, PhosphoRS, or LucXor). -keywords: - - onsite - - AScore - - PhosphoRS - - LucXor - - modification - - PTM -tools: - - onsite: - description: | - Mass spectrometry post-translational modification localization tool - homepage: https://github.com/bigbio/onsite - documentation: https://github.com/bigbio/onsite -input: - - meta: - type: map - description: Groovy Map containing sample information - - mzml_file: - type: file - description: Input spectrum file. - pattern: "*.mzML" - - id_file: - type: file - description: Protein/peptide identifications file - pattern: "*.idXML" -output: - - meta: - type: map - description: Groovy Map containing sample information - - out_id_ptmscores: - type: file - description: Protein/peptide identifications file with scored PTM sites - pattern: "*.idXML" - - log: - type: file - description: log file - pattern: "*.log" - - version: - type: file - description: File containing software version - pattern: "versions.yml" -authors: - - "@weizhongchun" diff --git a/subworkflows/local/phospho_scoring/main.nf b/subworkflows/local/phospho_scoring/main.nf index 6904ecac..26ac839c 100644 --- a/subworkflows/local/phospho_scoring/main.nf +++ b/subworkflows/local/phospho_scoring/main.nf @@ -3,7 +3,7 @@ // include { ID_SCORE_SWITCHER } from '../../../modules/local/openms/id_score_switcher/main' -include { ONSITE } from '../../../modules/local/openms/onsite/main' +include { ONSITE } from '../../../modules/bigbio/onsite/main' workflow PHOSPHO_SCORING { take: From 928a8358563a745fbcd5f9bdd616a258f67285f5 Mon Sep 17 00:00:00 2001 From: Wei Zhongchun <152124864+weizhongchun@users.noreply.github.com> Date: Tue, 30 Dec 2025 16:44:37 +0800 Subject: [PATCH 2/6] some changes --- modules/bigbio/onsite/main.nf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf index ee6cff1c..625efae5 100644 --- a/modules/bigbio/onsite/main.nf +++ b/modules/bigbio/onsite/main.nf @@ -74,7 +74,7 @@ process ONSITE { def max_num_perm = params.onsite_max_num_perm ?: '16384' def modeling_threshold = params.onsite_modeling_score_threshold ?: '0.95' def scoring_threshold = params.onsite_scoring_threshold ?: '0.0' - def min_num_psms = params.onsite_min_num_psms_model ?: '50' + def min_num_psms = params.onsite_min_num_psms_model ?: '5' def rt_tolerance = params.onsite_rt_tolerance ?: '0.01' // Optional target modifications - default for LucXor includes decoy @@ -103,8 +103,7 @@ process ONSITE { --scoring-threshold ${scoring_threshold} \\ --min-num-psms-model ${min_num_psms} \\ --rt-tolerance ${rt_tolerance} \\ - ${debug} \\ - ${args} + ${debug} """ } else { error "Unknown onsite algorithm: ${algorithm}. Supported algorithms: ascore, phosphors, lucxor" From d262eceb662274acaf441e6afcd3518446867760 Mon Sep 17 00:00:00 2001 From: Wei Zhongchun <152124864+weizhongchun@users.noreply.github.com> Date: Tue, 30 Dec 2025 16:48:58 +0800 Subject: [PATCH 3/6] pre-commit --- modules/bigbio/onsite/main.nf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf index 625efae5..44c47b4a 100644 --- a/modules/bigbio/onsite/main.nf +++ b/modules/bigbio/onsite/main.nf @@ -47,8 +47,7 @@ process ONSITE { --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-mass-unit ${fragment_unit} \\ ${add_decoys} \\ - ${debug} \\ - ${args} + ${debug} """ } else if (algorithm == 'phosphors') { // PhosphoRS: uses -in, -id, -out, --fragment-mass-unit @@ -61,8 +60,7 @@ process ONSITE { --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-mass-unit ${fragment_unit} \\ ${add_decoys} \\ - ${debug} \\ - ${args} + ${debug} """ } else if (algorithm == 'lucxor') { // LucXor: uses -in, -id, -out, --fragment-error-units (note: error-units not mass-unit) @@ -103,7 +101,7 @@ process ONSITE { --scoring-threshold ${scoring_threshold} \\ --min-num-psms-model ${min_num_psms} \\ --rt-tolerance ${rt_tolerance} \\ - ${debug} + ${debug} """ } else { error "Unknown onsite algorithm: ${algorithm}. Supported algorithms: ascore, phosphors, lucxor" From e69769c7e8273cfd7e0222a25a34a16b70480817 Mon Sep 17 00:00:00 2001 From: Wei Zhongchun <152124864+weizhongchun@users.noreply.github.com> Date: Tue, 30 Dec 2025 11:50:42 +0000 Subject: [PATCH 4/6] some changes --- modules.json | 2 +- modules/bigbio/onsite/main.nf | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules.json b/modules.json index fe67c11c..2fb817d2 100644 --- a/modules.json +++ b/modules.json @@ -42,7 +42,7 @@ "bigbio": { "onsite": { "branch": "main", - "git_sha": "0c3e1d26f1fe547888ee4b7c57120e1703f53eff", + "git_sha": "e4f16df2acb2c084a5043840212d0fb52f69fbbc", "installed_by": ["modules"] }, "thermorawfileparser": { diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf index 44c47b4a..1c8e8fc2 100644 --- a/modules/bigbio/onsite/main.nf +++ b/modules/bigbio/onsite/main.nf @@ -19,11 +19,12 @@ process ONSITE { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.mzml_id}" - // Algorithm selection: ascore (default), phosphors, or lucxor - def algorithm = params.onsite_algorithm ?: 'ascore' + // Algorithm selection: lucxor (default), ascore, or phosphors + def algorithm = params.onsite_algorithm ?: 'lucxor' // Common parameters for all algorithms def fragment_tolerance = params.onsite_fragment_tolerance ?: '0.05' + def compute_all_scores = params.onsite_compute_all_scores ? '--compute-all-scores' : '' // Set default value for add_decoys (can be overridden by setting params.onsite_add_decoys = false) def onsite_add_decoys = params.containsKey('onsite_add_decoys') ? params.onsite_add_decoys : true @@ -47,6 +48,7 @@ process ONSITE { --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-mass-unit ${fragment_unit} \\ ${add_decoys} \\ + ${compute_all_scores} \\ ${debug} """ } else if (algorithm == 'phosphors') { @@ -60,6 +62,7 @@ process ONSITE { --fragment-mass-tolerance ${fragment_tolerance} \\ --fragment-mass-unit ${fragment_unit} \\ ${add_decoys} \\ + ${compute_all_scores} \\ ${debug} """ } else if (algorithm == 'lucxor') { @@ -74,6 +77,7 @@ process ONSITE { def scoring_threshold = params.onsite_scoring_threshold ?: '0.0' def min_num_psms = params.onsite_min_num_psms_model ?: '5' def rt_tolerance = params.onsite_rt_tolerance ?: '0.01' + def disable_split_by_charge = params.onsite_disable_split_by_charge ? '--disable-split-by-charge' : '' // Optional target modifications - default for LucXor includes decoy def target_mods = params.onsite_target_modifications ? "--target-modifications ${params.onsite_target_modifications}" : "--target-modifications 'Phospho(S),Phospho(T),Phospho(Y),PhosphoDecoy(A)'" @@ -101,6 +105,8 @@ process ONSITE { --scoring-threshold ${scoring_threshold} \\ --min-num-psms-model ${min_num_psms} \\ --rt-tolerance ${rt_tolerance} \\ + ${disable_split_by_charge} \\ + ${compute_all_scores} \\ ${debug} """ } else { From a379a92e1eda5a262ad61a00cd354ff7f4ff4e91 Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Sun, 4 Jan 2026 17:50:36 +0000 Subject: [PATCH 5/6] Update modules/bigbio/onsite/main.nf Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- modules/bigbio/onsite/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf index 1c8e8fc2..19d00573 100644 --- a/modules/bigbio/onsite/main.nf +++ b/modules/bigbio/onsite/main.nf @@ -1,6 +1,7 @@ process ONSITE { tag "$meta.mzml_id" label 'process_medium' + label 'openms' label 'onsite' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From 0f9b061f39914a14bb9055aeb5388fbcf22426db Mon Sep 17 00:00:00 2001 From: Yasset Perez-Riverol Date: Sun, 4 Jan 2026 18:01:11 +0000 Subject: [PATCH 6/6] Remove 'openms' label from ONSITE process --- modules/bigbio/onsite/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/bigbio/onsite/main.nf b/modules/bigbio/onsite/main.nf index 19d00573..1c8e8fc2 100644 --- a/modules/bigbio/onsite/main.nf +++ b/modules/bigbio/onsite/main.nf @@ -1,7 +1,6 @@ process ONSITE { tag "$meta.mzml_id" label 'process_medium' - label 'openms' label 'onsite' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?