Closed PDiracDelta closed 3 years ago
I think #27 will address this. Could you give it a try?
I think #27 will address this. Could you give it a try?
Thanks for the quick response. Not entirely solved yet, I'm afraid. The same code now returns: Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/REDACTED/.conda/envs/qcquan/lib/python3.6/site-packages/pyteomics/mztab.py", line 641, in __init__
self._determine_schema_version()
File "/REDACTED/.conda/envs/qcquan/lib/python3.6/site-packages/pyteomics/mztab.py", line 747, in _determine_schema_version
version_parsed, variant = re.search(r"(?P<schema_version>\d+(?:\.\d+(?:\.\d+)?)?)(?:-(?P<schema_variant>[MP]))?", str(self.version)).groups()
File "/REDACTED/.conda/envs/qcquan/lib/python3.6/site-packages/pyteomics/mztab.py", line 84, in __get__
if value is None and self.variant_required and obj.variant in self.variant_required:
AttributeError: 'MzTab' object has no attribute 'variant'
Ah right. variant
must be set before it may be read by the validation logic. I've updated that PR with new code to ensure that, and added a test case that protects against this.
Ah right.
variant
must be set before it may be read by the validation logic. I've updated that PR with new code to ensure that, and added a test case that protects against this.
Thanks, this seems to work! (FYI: the pull request wasn't accepted yet - I copied it directly from the commit).
I suspect this is an old mztab file that does not have the mzTab-version information? Any chance this can be made backwards-compatible?