frag4feature,purityA-method {msPurity} | R Documentation |
Assign fragmentation spectra (MS/MS) scored via msPurity package to features from an XCMS set object.
Allows the user to filter out spectra below a certain threshold for purity.
## S4 method for signature 'purityA' frag4feature(pa, xset, ppm = 5, plim = 0, intense = TRUE, convert2RawRT = TRUE, create_db = FALSE, out_dir = ".", db_name = NA, grp_peaklist = NA)
pa |
object; purityA object |
xset |
object; XCMS object derived from the same files as the puritydf |
ppm |
numeric; ppm tolerance between precursor mz and feature mz |
plim |
numeric; min purity of precursor to be included |
intense |
boolean; If the most intense precursor or the centered precursor is used |
convert2RawRT |
boolean; If retention time correction has been used in XCMS set this to TRUE |
create_db |
boolean; SQLite database will be created of the results |
out_dir |
character; Path where database will be created |
db_name |
character; If create_db is TRUE, a custom database name can be used, default is a time stamp |
grp_peaklist |
dataframe [optional]; Can use any peak dataframe to add to databse. Still needs to be derived from the xset object though |
purityA object with slots for fragmentation-XCMS links
msmsPths <- list.files(system.file("extdata", "lcms", "mzML", package="msPurityData"), full.names = TRUE, pattern = "MSMS") xset <- xcms::xcmsSet(msmsPths, nSlaves = 1) xset <- xcms::group(xset) xset <- xcms::retcor(xset) xset <- xcms::group(xset) pa <- purityA(msmsPths, interpol = "linear") pa <- frag4feature(pa, xset)