levitsky / pyteomics

Pyteomics is a collection of lightweight and handy tools for Python that help to handle various sorts of proteomics data. Pyteomics provides a growing set of modules to facilitate the most common tasks in proteomics data analysis.
http://pyteomics.readthedocs.io
Apache License 2.0
105 stars 34 forks source link

Fix generic modification resolver #69

Closed mobiusklein closed 2 years ago

mobiusklein commented 2 years ago

Fixes #68

mobiusklein commented 2 years ago

The reason why that failed on Py2 is that the dict ordering is different than on Py3, and TMT6plex is a registered synonym for every TMT-labeled residue and reporter ion in PSI-MOD, which means that it is legal (semantically) to resolve to any of them. Therefore, MOD:TMT6plex is unsafe to use as its behavior is non-deterministic on Py2.

I changed that test to use an explicit ID to avoid this type of error in the tests.