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

MS2PIP_Server.py removes all modified peptides #142

Closed JB91451 closed 2 years ago

JB91451 commented 3 years ago

Dear all,

as I have a larger batch of predictions, I wanted to use the MS2PIP_Server.py script (https://github.com/compomics/ms2pip_c/wiki/MS2PIP-Server-API). The idea is to forward the predictions into our pipeline to build spectraST libraries. Thus the python script would be a good solution.

The script works well for unmodified peptides. However, peptides with any modification are removed. I already adjusted ptm_list according to my modifications column but that did not fix the issue:

ptm_list = ['OxidationM,15.994915,M',
    'Carbamidomethyl,57.021464,C',
...
]

When I use the exact same input file and those modifications (just without the quotation marks) through the webpage, spectra are predicted for all entries.

Does anyone has an idea, how to solve this?

Best regards, Juergen


Please see below an example file with 15 spectra of which predictions are returned only for 10 unmodified peptides with the python script but prediction is complete when using this file from the webpage.

CDiff630_derm_Test.tsv.txt

JB91451 commented 3 years ago

Just as an additional information: It seems that all modified peptides are filtered before starting the prediction, as there is an error message saying: "need at least one array to concatenate" when I submit only the rows containing modified peptides.

paretje commented 3 years ago

The example code on the wiki was outdated. It has now been updated. Can you confirm that using the new example code fixes your issue?

JB91451 commented 3 years ago

Hi Kevin,

I tested the new code today, but unfortunately now it does not execute at all. As far as I can see, the issue seems to be the server url, as the response['content'] variable contains the following text:

b'<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1>\n<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p></body></html>'

Therefore there is no task-id and no defined server error and the error message is simply: "Something went wrong"

Best, Juergen

RalfG commented 3 years ago

Hi Juergen,

We are indeed experiencing some issues on your v2 API. While we are working on fixing the issue, you could temporarily use v1: https://iomics.ugent.be/ms2pip/api/v1 The only functional difference is that DeepLC retention time prediction is not supported through v1.

Best, Ralf

JB91451 commented 3 years ago

Hi Ralf,

unfortunately the v1 server does not work for me as well. When I use it, I get the following error message:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\TruncatedPath\venv\lib\site-packages\requests\models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Programs\Python_3_8_4\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Programs\Python_3_8_4\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Programs\Python_3_8_4\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It would be totally fine for me to use this one, as I currently not use the DeepLC RT prediction.

Best regards, Juergen

paretje commented 3 years ago

Both API v1 and v2 should be fixed now.

JB91451 commented 3 years ago

Hi Kevin,

Thank you very much. I just tried it with my test data and now it seems to work for me. I will have a more detailed look during the next week.

Best, Juergen