compomics / ms2pip

MS²PIP: Fast and accurate peptide spectrum prediction for multiple fragmentation methods, instruments, and labeling techniques.
https://ms2pip.readthedocs.io
Apache License 2.0
35 stars 18 forks source link

Define cache dir for xgboost models #218

Closed jonasscheid closed 3 months ago

jonasscheid commented 3 months ago

This feature request came up in https://github.com/nf-core/mhcquant/issues/317

Currently, the xgboost models are always downloaded to $HOME/.ms2pip. In some cases that could lead to permission issues, but the major advantage here would be in containerized settings, where containers are built from their image every time leading to downloading the xgboost models over and over again.

Would be great to have an option to specify a cache directory, where models can be reused.

RalfG commented 3 months ago

Hi Jonas,

In MS²PIP 4.0, a model-dir option is available (e.g. for correlate), exactly for this purpose. Can you check if that does what you had in mind?

Best, Ralf

jonasscheid commented 3 months ago

Great! That is exactly what I was looking for 🙌🏼 And it worked! Thanks for the pointer Ralf 😎