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

More Information about the config file extension #125

Closed Luxxii closed 3 years ago

Luxxii commented 3 years ago

Hi everyone!

I recently tried ms2pip 3.6.3 which i have installed via pip and want to provide some thoughts:

While running ms2pip --help the argument -m is present (in 3e865c1 ) which is not described in the documentation. At least, i did not found any information about it. It would be great to keep this in sync.


But here to the actual Issue: If a configuration file with the name config.ms2pip is used, ms2pip will throw an exception by the following call:

ms2pip -c config.ms2pip <file>.PEPREC
...
ms2pip.config_parser.UnsupportedConfigFormatError: ms2pip

This does not provide any information of what went wrong and might confuse users (including myself). This is actually the case for all file extensions, as long as they are NOT named .toml, .txt or .config.

It is raised here: https://github.com/compomics/ms2pip_c/blob/3e865c1a7e8f29e5d1f4f7fecc23b540cfabf5d2/ms2pip/config_parser.py#L106-L111

It would be great to inform the user that only specific file extensions are allowed, so implementing:

https://github.com/compomics/ms2pip_c/blob/3e865c1a7e8f29e5d1f4f7fecc23b540cfabf5d2/ms2pip/config_parser.py#L6-L7

as well as adding information in:

https://github.com/compomics/ms2pip_c/blob/3e865c1a7e8f29e5d1f4f7fecc23b540cfabf5d2/ms2pip/__main__.py#L36-L43

should be enough.


Interestingly the .PEPREC file extension is not needed by ms2pip

Greetings!

RalfG commented 3 years ago

Hi @Luxxii,

Thanks for the suggestions! The -m option is still a feature in development. But you are right. I have opened an issue around this (#128).

Your other suggestions will be implemented in #129.

Best, Ralf