extracting specific peptide spectra from mgf files

21 views
Skip to first unread message

Luke Higgins

unread,
Mar 16, 2023, 3:41:46 PM3/16/23
to Pyteomics
Dear pyteomics team,

I'm interested in extracting specific peptide spectra for quality control/inspection purposes. I am currently interested in acetylated peptides, and have been trying to review mascot output using pyteomics to enable a programmatic way of extracting modified peptides of interest highlighted during my analysis (e.g. differentially abundant between conditions).

I am able to read my mgf file using mgf.MGF(), and from iterating through this it seems like I get a dictionary of dictionaries. My question is, how can I extract peptides of interest which are highlighted during my separate analysis? At the lab I have joined we use Mascot Distiller to generate mgf files, and then identify modifications using Mascot's database search resulting in a DAT file.

Could you provide any advice on how I could parse the mgf and DAT files so that I can link the spectra and modified peptide id for further inspection? I would be interested in inspecting certain peptides and comparing these with their theoretical spectra, similar to the mirror plot example shown in the pyteomics documentation.

Any help would be appreciated,

Many thanks

Luke 

Lev Levitsky

unread,
Mar 17, 2023, 7:12:21 PM3/17/23
to pyte...@googlegroups.com, Luke Higgins
Hi Luke,

As for extracting specific spectra from MGF, the way to go is using mgf.IndexedMGF() instead of mgf.MGF(). The indexed version allows you to retrieve spectra by their titles, as if from a dictionary. See more in Indexed Parsers documentation and mgf module documentation.
The rest of the problem would be to get the spectrum titles that you need from the DAT file. I don't have any experience with those files, but they seem to be text files and as such you can parse them in Python. Alternatively, you can try converting your DAT files to another format (like pepXML or mzIdentML) and parse those using Pyteomics.

I hope this helps.

Best regards,
Lev

--
You received this message because you are subscribed to the Google Groups "Pyteomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyteomics/10461f27-8168-4194-bc53-0f306eaf8cf7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages