Skip to content

Commit

Permalink
adding ms2pip model cache dir option
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasscheid committed May 12, 2024
1 parent 7e2f5c3 commit ccd0c70
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
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 @@ -254,6 +254,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 @@ -73,6 +73,7 @@ params {
rescoring_engine = 'percolator'
feature_generators = 'deeplc,ms2pip'
ms2pip_model = 'Immuno-HCD'
ms2pip_model_dir = null
deeplc_calibration_set_size = 0.15

// MultiQC options
Expand Down
7 changes: 7 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@
"default": "Immuno-HCD",
"description": "Specify the ms2pip model that should be used for rescoring. Checkout the ms2pip documentation for available models."
},
"ms2pip_model_dir": {
"type": "string",
"format": "directory-path",
"fa_icon": "fas fa-file-code",
"hidden": true,
"description": "Specify the ms2pip model that should be used for rescoring. Checkout the ms2pip documentation for available models."
},
"deeplc_calibration_set_size": {
"type": "number",
"fa_icon": "fas fa-file-code",
Expand Down

0 comments on commit ccd0c70

Please sign in to comment.