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
20 changes: 13 additions & 7 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 ?
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.11' :
'ghcr.io/bigbio/quantms-rescoring:0.0.11' }"
'oras://ghcr.io/bigbio/quantms-rescoring-sif:0.0.12' :
'ghcr.io/bigbio/quantms-rescoring:0.0.12' }"

// 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 @@ -40,16 +40,22 @@ process MSRESCORE_FEATURES {
decoy_pattern = "${params.decoy_string}\$"
}

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

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

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

"""
Expand All @@ -60,9 +66,9 @@ process MSRESCORE_FEATURES {
--output ${idxml.baseName}_ms2rescore.idXML \\
--ms2_model_dir ${params.ms2_model_dir} \\
--processes $task.cpus \\
--find_best_model \\
${find_best_model} \\
${force_model} \\
${mask_modloss} \\
${consider_modloss} \\
$args \\
2>&1 | tee ${idxml.baseName}_ms2rescore.log

Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ params {
feature_generators = 'deeplc,ms2pip'
calibration_set_size = 0.15
ms2rescore_fragment_tolerance = 0.05 // Unit Da
find_best_model = true
force_model = false
mask_modloss = true
consider_modloss = false

// SNR features flags
add_snr_feature_percolator = false
Expand Down
8 changes: 7 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,15 @@
"default": false,
"fa_icon": "far fa-check-square"
},
"mask_modloss": {
"consider_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": false,
"fa_icon": "far fa-check-square"
},
"find_best_model": {
"type": "boolean",
"description": "If find best MS2 model.",
"default": true,
"fa_icon": "far fa-check-square"
},
Expand Down