Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to specify MS2PIP model directory #322

Merged
merged 4 commits into from
May 28, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### `Added`

- Added MS²Rescore module with the underlying python CLI [#293](https://github.com/nf-core/mhcquant/pull/293)
- Added new flag `ms2pip_model_dir`, which allows specifying a cache directory for ms2pip models [#322](https://github.com/nf-core/mhcquant/pull/322)

### `Fixed`

Expand Down
2 changes: 2 additions & 0 deletions bin/ms2rescore_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def parse_cli_arguments_to_config(**kwargs):
config["ms2rescore"]["feature_generators"]["ms2pip"] = {
"model": kwargs["ms2pip_model"],
"ms2_tolerance": kwargs["ms2_tolerance"],
"model_dir": kwargs["ms2pip_model_dir"],
}
if "deeplc" in feature_generators:
config["ms2rescore"]["feature_generators"]["deeplc"] = {
Expand Down Expand Up @@ -144,6 +145,7 @@ def filter_out_artifact_psms(
default="",
)
@click.option("-pipm", "--ms2pip_model", help="MS²PIP model (default: `Immuno-HCD`)", type=str, default="Immuno-HCD")
@click.option("-pipmdir", "--ms2pip_model_dir", help="Path to directory, which holds pre-downloaded MS²PIP models", type=str, default=None)
@click.option(
"-ms2tol", "--ms2_tolerance", help="Fragment mass tolerance [Da](default: `0.02`)", type=float, default=0.02
)
Expand Down
1 change: 1 addition & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ process {
ext.args = [
"--ms2_tolerance ${2 * params.fragment_mass_tolerance}",
"--ms2pip_model ${params.ms2pip_model}",
"--ms2pip_model_dir ${params.ms2pip_model_dir}",
"--rescoring_engine ${params.rescoring_engine}",
params.feature_generators.trim() ? "--feature_generators ${params.feature_generators}" : ''
].join(' ').trim()
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ params {
rescoring_engine = 'percolator'
feature_generators = 'deeplc,ms2pip'
ms2pip_model = 'Immuno-HCD'
ms2pip_model_dir = null
deeplc_calibration_set_size = 0.15

// Percolator settings
Expand Down
12 changes: 10 additions & 2 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
"enum": [
"Immuno-HCD",
"timsTOF",
"timsTOF2023",
"CID",
"CIDch2",
"CID-TMT",
Expand All @@ -285,14 +286,21 @@
"iTRAQ",
"iTRAQphospho"
],
"description": "Specify the ms2pip model that should be used for rescoring. Checkout the ms2pip documentation for available models."
"description": "Specify the MS²PIP model that should be used for rescoring. Checkout the MS²PIP documentation for available models."
},
"ms2pip_model_dir": {
"type": "string",
"format": "directory-path",
"fa_icon": "fas fa-file-code",
"hidden": true,
"description": "Specify a local directory holding at least the MS²PIP models specified in `ms2pip_model`."
},
"deeplc_calibration_set_size": {
"type": "number",
"fa_icon": "fas fa-head-side-gear",
"hidden": true,
"default": 0.15,
"description": "Specify the number or percentage of PSMs that should be used for calibration of the deeplc model."
"description": "Specify the number or percentage of PSMs that should be used for calibration of the DeepLC model."
},
"fdr_level": {
"type": "string",
Expand Down
Loading