getMtime: Get the migration time of a known compound

View source: R/getMt.R

getMtimeR Documentation

Get the migration time of a known compound

Description

The function getMtime searches the migration time (mt) of a known compound within a specified mz and mt range (mz and mt).

Usage

getMtime(
  x,
  mz = numeric(),
  mt = numeric(),
  param = MatchedFilterParam(binSize = 1, snthresh = 50)
)

Arguments

x

OnDiskMSnExp object, containing CE-MS(/MS) data from a single file (e.g. filtered by filterFile()). The migration time (mt) is provided in sec. The CE-MS data contain known compounds mz, of which the exact migration time is going to be determined.

mz

numeric, with upper and lower limit, (length(mz) = 2), representing the mz range of the compound of which the migration time is going to be determined. The range should be as narrow as possible but depends on the mass accuracy of the mass spectrometer that has been used to acquire the data.

mt

numeric, with upper and lower limit, (length(mt) = 2), limiting the migration tame range of the compound. Use a narrow mt range, to to avoid that other components with the same mz and different mt are being picked.

param

method, from xcms that defined how peaks will be picked. The default is MatchedFilterParam(binSize = 1, snthresh = 100)

Details

getMtime uses CE-MS data stored in OnDiskMSnExp objects to search for the migration time of selected compounds as for example EOF markers in order to perform effective mobility scale transformation. The OnDiskMSnExp object is filtered using the defined mz-range mz, and the mt-range mt, where the compound is expected to migrate. The migration time is determined by applying the peak picking algorithm from xcms.

Value

data.frame with two columns "rtime" storing the migration time in sec, and "fileIdx" storing the file index and the number of rows corresponding to the number of input files.

Author(s)

Liesa Salzer

Examples

fl <- system.file("CE-MS/CEMS_10ppm.mzML",
    package = "msdata"
)
raw_data <- readMSData(
    files = fl,
    mode = "onDisk"
)
# [M+H]+ of paracetamol: mz = 152.071154
mz_paracetamol <- c(152.071154 - 0.005, 152.071154 + 0.005)
mt_paracetamol <- c(600, 900)
getMtime(raw_data, mz = mz_paracetamol, mt = mt_paracetamol)

LiesaSalzer/mobilityTransformationR documentation built on April 3, 2022, 5:58 p.m.