patRoon
patRoon copied to clipboard
Filtering MS/MS Peaks with Characteristic Fragment Ions
Hello, I would like to ask if patRoon can filter MS/MS peaks containing one or more characteristic fragment ions (CFIs).
For example, I am analyzing organophosphate esters, and the MS/MS peaks of these compounds often include specific fragment ions like C18H16O4P+, C12H12O4P+, C6H8O4P+, H4O4P+, and H2O3P+. I now only want to retain mslists that contain one or more of the characteristic fragment ions, but I don't know how to achieve this.
I would be grateful if you could advise.
Hi @Jasmin-Zeng ,
Sorry for my late reply.
This is definitely possible. There are various ways, but probably the easiest is to use the delete()
function, for instance:
# function to compare mzs with some tolerance
equalMZ <- function(mz1, mz2) abs(mz1 - mz2) < 0.005
# delete all MS/MS spectra without at least one characteristic fragment
mslistsF <- delete(mslists, j = function(pl, grp, ana, type)
{
if (type != "MSMS")
return(FALSE) # only consider MS/MS peak lists
return(!any(sapply(c(94.05239, 107.06016, 300.1234), equalMZ, pl$mz))) # delete if none of these characteristic m/z are present
})
Note that in this example you will need to calculate the exact m/z values for your fragments.
Feel free to ask more details if needed.
Thanks, Rick
Thank you for your reply, I will test it and get back to you with the results then.
Hi @rickhelmus , Thank you for your guidance. I successfully integrated the feature of CFIs into my code, and it's functioning well now.
However, I have another question. I used MS-Dial for deconvolution of data collected in DIA mode and exported the results in .msp format, where precursor ions are well-matched with their corresponding fragment ions.
My question is: can this .msp file be imported into patRoon to generate MSPeakLists, thereby facilitating the use of patRoon's workflow for formula and compound annotation? I've attached the .msp file for your reference. Msp_DIA_300_400.zip
Thank you for your assistance.
Hi @Jasmin-Zeng ,
Great!
Unfortunately, importing peak lists is not yet supported (but planned for the next major release). However, with a bit of creativity and coding, perhaps you could perform the following:
- Generate the MS peak lists with patRoon, setting
precursorMzWindow
toNULL
so that DIA spectra are handled properly. - Import the MSP files with
loadMSLibrary()
- Use the
delete()
function to clear-out any mass peaks that are not in the imported MSP data.
Thanks, Rick
Ok, I will try it as you suggested, thank you very much.