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

How to convert the modified scans into an mzXML file? #72

Closed Mnago closed 2 years ago

Mnago commented 2 years ago

Hi,

from pyteomics import mzxml reader=mzxml.read(mzXML_file) scans=[scan for scan in reader] We used pyteomics to get all scans information from the mzXML file which was converted by proteowizard. Then, we do some modifications to those scans and export them into a .csv file. Is there any function to convert the modified scans into an mzXML file?

Best regards,

Winnie

levitsky commented 2 years ago

Hi! There is no such function in Pyteomics. What could be helpful to you is @mobiusklein's psims, which provides an API to write mzML. Perhaps you can convert that to mzXML then. If you don't care about metadata at all, you could probably use pyteomics.mgf.write and then convert MGF to mzXML.