How to write mzIdentMLs

43 views
Skip to first unread message

Maximilian Strauß

unread,
Jul 6, 2022, 11:41:28 AM7/6/22
to ProteomicsQA
Dear all,
Is anyone familiar with how to write mzIdentMLs-files and could give me a head-start on what to consider? Ideally, if someone knows a Python library that can do this?
I checked pyteomics, but I only saw read functionality. Any suggestions would be appreciated. 

Thanks a lot!

Dorfer Viktoria

unread,
Jul 6, 2022, 1:24:24 PM7/6/22
to Maximilian Strauß, ProteomicsQA
yes! We have implemented that functionality for our MS Amanda results. It is in C# not python but we can definitely discuss that and I can share some code!

best,
viktoria

Am 06.07.2022 um 17:41 schrieb Maximilian Strauß <straussm...@gmail.com>:


--
You received this message because you are subscribed to the Google Groups "ProteomicsQA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proteomicsqa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/proteomicsqa/202c2813-b304-4937-9a29-e36d9eb00d9fn%40googlegroups.com.

Timo Sachsenberg

unread,
Jul 6, 2022, 2:07:41 PM7/6/22
to proteo...@googlegroups.com

Hi,

I think you could use pyOpenMS.

Here is how to build the id data and store it (in the example as idXML file): https://pyopenms.readthedocs.io/en/latest/datastructures_id.html

but we also allow storing in MzIdentML files using the MzIdentMLFile class.

So replacing the last line should work.

Best,

Timo

Maximilian Strauß

unread,
Jul 8, 2022, 6:09:55 AM7/8/22
to ProteomicsQA
Hi,
Thanks for the replies. I had a look at the pyopenms documentation; replacing the idXML with MzIdentMLFile worked.

Best,
Max
@Timo: I found it a bit difficult to understand what's stored in each object. I could imagine that setting the __str__ method to print the contents would help explore what is inside. I wanted to check the source code to see if I could maybe make a PR for this. However, I only found this repo https://github.com/uweschmitt/pyOpenMS, which seems outdated, and https://github.com/OpenMS/pyopenms-docs seems to be only the docs. Is there any open source repo available? On another note, the code examples in the document you shared are a mix of showing line numbers and not showing them. Copying the ones w/o line numbers worked nicely, and I could directly paste them into an editor; for the ones w/ line numbers, the line numbers were copied as well and needed manual removal. 

Ralf G

unread,
Jan 24, 2023, 12:22:28 PM1/24/23
to ProteomicsQA
Hi Max,

Another option would be the psims Python package by Joshua Klein: https://github.com/mobiusklein/psims
Josh has recently expanded the docs a bit, but I'm sure he's happy to answer any questions you might have.

Best, 
Ralf

david.b...@ipbs.fr

unread,
Jan 25, 2023, 2:27:51 AM1/25/23
to ProteomicsQA
Hi Max,

If this feature is still useful to you, please open an issue in this repo https://github.com/rusteomics/mzio to describe your own needs.
We would like to implement some IO functionalities in Rust and Python (using the pyo3 binding library).
It would be great to specify a common and useful API from scratch instead of doing something wrong.

Best,

David

Reply all
Reply to author
Forward
0 new messages