Description Usage Arguments Details Value Author(s) Examples
For the defined scans, this function identifies consensus masses based on a minimal signal intensity cut-off. Then a data.frame is returned with EICs in columns for each identified mass.
1 |
xraw |
xcmsRaw object or list of xcmsRaw objects |
region |
rows from a peak table where the feature of interest was detected (optional) |
precursors |
the precursors that the mass spec targeted |
rtrange |
range of scans to use |
collisionEnergy |
the collision energy of the scans to use |
ppm |
ppm error mass variability between scans |
minSignal |
smallest intensity that could initiate a mass to include as column |
if precursors, rtrange, or collsionEnergy are left out or NULL, all values present in xraw are used
ms2_mat |
a data.frame containing a row for each scan, with: xcmsRaw: index of xcmsRaw file scan: scan number rt: retention time of scan ce: collision energy of scan prec: precursor that was targeted and a column for every mass. |
Igor Nikolskiy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (xraw, region = NULL, precursors = NULL, rtrange = NULL,
collisionEnergy = NULL, ppm = 30, minSignal = 100)
{
if (!is.null(region)) {
rtrange = c(min(region$rtmin) - 5, max(region$rtmax) +
5)
}
if (class(xraw) == "xcmsRaw") {
xraw = c(xraw)
}
scans = lapply(xraw, selectScans, precursors = precursors,
rtrange = rtrange, collisionEnergy = collisionEnergy)
combinedScans = combineScans(xraw, scans, minSignal)
if (nrow(combinedScans) > 2) {
cons_masses = getConsensusMasses(combinedScans, ppm = ppm)
ms2_mat = createMatrix(xraw, scans, cons_masses, ppm = ppm)
return(ms2_mat)
}
else {
cat("ms2 has no masses with intensity above: ", minSignal,
"\n")
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.