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

Fixed version parsing #24

Closed donnyyy777 closed 3 years ago

donnyyy777 commented 3 years ago

Accepts version numbers that do not necessarily contain 3 numbers (x.x.x) - can read versions that contain 1 or 2 numbers (x) or (x.x)

donnyyy777 commented 3 years ago

Hi,

I was trying to use the MzTab parser on an MzTab file, but found out that it threw errors because of a call to search for a version number in the form of x.x.x when the file I was working with had a version number in the form x.x (2 numbers instead of 3). I edited that part such that it wouldn't throw errors if the version number didn't necessarily contain 3 numbers. I made sure to maintain the check that the variant was either "M" or "P".

mobiusklein commented 3 years ago

Looks good to me. I don't see any more issues. Was the file you were trying to parse an mzTab 1.0 file?