pymzml / pymzML

pymzML - an interface between Python and mzML Mass spectrometry Files
https://pymzml.readthedocs.io/en/latest/
MIT License
158 stars 91 forks source link

Refactor pymzml.spec.Spectrum #333

Closed ap-- closed 9 months ago

ap-- commented 10 months ago

Is your feature request related to a problem? Please describe.

Currently instantiating a pymzml.spec.Spectrum instance on its own is not straight forward, because you need to provide a Reader instance as the calling_instance after instantiation of the Spectrum class.

Describe the solution you'd like I'd like to refactor the Spectrum and Chromatogram classes to take an obo_version keyword argument and allow providing the obo_translator instance at a later stage. I'd also like to add a classmethod to OboTranslator that allows to return already cached OboTranslator instances.

Notes

Let me know if there is interest for a PR that would implement the above. If yes, I'll contribute these changes soon.

Cheers, Andreas 😃

fu commented 10 months ago

Hi Andreas that sounds like a good idea. If the rest of the examples / patterns are still workable and if the package just become more general and is more natural to use I am all for it!

ap-- commented 10 months ago

Sounds good. I'll open a PR soon!