Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/modules/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ process {
// MS2RESCORE
withName: 'MSRESCORE_FEATURES' {
ext.args = [
"--ms2pip_model ${params.ms2pip_model}",
"--ms2_model ${params.ms2_model}",
"--calibration_set_size ${params.calibration_set_size}",
params.feature_generators.trim() ? "--feature_generators ${params.feature_generators}" : ''
].join(' ').trim()
Expand Down
13 changes: 10 additions & 3 deletions modules/local/utils/msrescore_features/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ process MSRESCORE_FEATURES {
label 'process_high'

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/quantms-rescoring:0.0.10--pyhdfd78af_0' :
'biocontainers/quantms-rescoring:0.0.10--pyhdfd78af_0' }"
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.11' :
'ghcr.io/bigbio/quantms-rescoring:0.0.11' }"

// userEmulation settings when docker is specified
containerOptions = (workflow.containerEngine == 'docker') ? '-u $(id -u) -e "HOME=${HOME}" -v /etc/passwd:/etc/passwd:ro -v /etc/shadow:/etc/shadow:ro -v /etc/group:/etc/group:ro -v $HOME:$HOME' : ''
Expand Down Expand Up @@ -46,16 +46,23 @@ process MSRESCORE_FEATURES {
force_model = ""
}

if (params.mask_modloss) {
mask_modloss = "--mask_modloss"
} else {
mask_modloss = ""
}

"""
rescoring msrescore2feature \\
--idxml $idxml \\
--mzml $mzml \\
--ms2_tolerance $ms2_tolerance \\
--output ${idxml.baseName}_ms2rescore.idXML \\
--ms2pip_model_dir ${params.ms2pip_model_dir} \\
--ms2_model_dir ${params.ms2_model_dir} \\
--processes $task.cpus \\
--find_best_model \\
${force_model} \\
${mask_modloss} \\
$args \\
2>&1 | tee ${idxml.baseName}_ms2rescore.log

Expand Down
5 changes: 3 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,14 @@ params {

// MSRESCORE flags
ms2rescore = false
ms2pip_model_dir = null
ms2_model_dir = null
rescore_range = 'independent_run'
ms2pip_model = 'HCD2021'
ms2_model = 'HCD2021'
feature_generators = 'deeplc,ms2pip'
calibration_set_size = 0.15
ms2rescore_fragment_tolerance = 0.05 // Unit Da
force_model = false
mask_modloss = true

// SNR features flags
add_snr_feature_percolator = false
Expand Down
12 changes: 9 additions & 3 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,15 @@
"default": "independent_run",
"enum": ["independent_run", "by_sample", "by_project"]
},
"ms2pip_model": {
"ms2_model": {
"type": "string",
"description": "Which deep learning model to generate feature.",
"fa_icon": "fas fa-font",
"default": "HCD2021"
},
"ms2pip_model_dir": {
"ms2_model_dir": {
"type": "string",
"description": "The path of ms2pip model files. Providing model file to avoid repeated download and slow internet connection",
"description": "The path of ms2 prediction model files. Providing model file to avoid repeated download and slow internet connection",
"fa_icon": "fas fa-font"
},
"feature_generators": {
Expand All @@ -547,6 +547,12 @@
"default": false,
"fa_icon": "far fa-check-square"
},
"mask_modloss": {
"type": "boolean",
"description": "If modloss ions are masked to zeros in the ms2 model. modloss ions are mostly useful for phospho MS2 prediction model.",
"default": true,
"fa_icon": "far fa-check-square"
},
"run_fdr_cutoff": {
"type": "number",
"description": "FDR cutoff on PSM level (or peptide level; see Percolator options) *per run* before going into feature finding, map alignment and inference. This can be seen as a pre-filter. See ",
Expand Down
Loading