Entering edit mode
6.9 years ago
qudrat
▴
100
Hello, Can somebody tell me how to find total number of spectra in an mzml file? How to know the number of unassigned spectra remained in a file after tandem run was over?
Not sure if bioinformatics.
I'd say it is bioinformatics. Proteomics, not the genetics and transcriptomics we're most familiar with here.
Ah, I see. Thank you!
There appears to be an option: https://pythonhosted.org/pyteomics/api/mzml.html
I'm surprised that whoever performed the mass spectrometry has not guided you further (?). Can it be that you should be contacting them and not us?
pyteomics
will give you access to the information about each spectrum, though it might be difficult to access the total number of spectra acquired directly. Of course,sum(1 for scan in mzml.read("path/to/file.mzML"))
will work for that. The unassigned question could be solved using themzid
,pepxml
orxtandem
parsers, but you have to have the search results in the right format.