Filters mass spectrometry data using a set of criteria, described in
Details. Returns an object of classes
filterMS(msObj, region, border = "all", bord_ratio = 0.05, min_inten = 1000, max_chg = 7L)
An object class
A vector either of mode character or mode numeric. If numeric
then the entries should provide the indices for the region of interest in
the mass spectrometry data provided as the argument for
Either a character string
A single nonnegative numeric value. A value of 0 will not admit any compounds, while a value greater than 1 will admit all compounds (see criterion 2).
A single numeric value. A value less than the minimum mass spectrometry value in the data will admit all compounds (see criterion 4).
A single numeric value specifying the maximum charge which a compound may exhibit (see criterion 5)
Attempts to filter out candidate compounds via subject-matter knowledge, with the goal of removing spurious noise from downstream models. The criteria for the downstream inclusion of a candidate compound is listed below.
The m/z intensity maximum must fall inside the range of the bioactivity region of interest
The ratio of the m/z intensity of a species in the areas bordering
the region of interest and the species maximum intensity must be less
bord_ratio. When there is no bordering area then it is
taken to mean that all observations satisfy this criterion.
The immediately right adjacent fraction to its maximum intensity fraction for a species must have a non-zero abundance. In the case of ties for the maximum, it is the fraction immediately to the right of the rightmost maximum fraction which cannot have zero abundance. When the fraction with maximum intensity is the rightmost fraction in the data for an observation, then it is taken to mean that the observation satisfies this criterion.
At least 1 fraction in the region of interest must have intensity
Compound charge state must be less than or equal to
Returns an object of class
filterMS which inherits from
msDat. This object is a
list with elements described
below. The class is equipped with a
An object of class
msDat such that
the encapsulated mass spectrometry data corresponds to each of the
candidate compounds that satisfed each of the criteria. If no
criteria are satisfied then
NULL is returned.
A list containing
data.frames, one for
each criterion. Each row (if any) in one of the
data.frames contains the mass-to-charge and charge
information for a candidate compound that satisfies the criterion
represented by the
data.frame; all of the compounds that
satisfied the criterion are included in the data. The
data.frames are named
corresponding to criterion 1, ..., criterion 5.
A list containing information pertaining to the filtering process; for use by the summary function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# Load mass spectrometry data data(mass_spec) # Convert mass_spec from a data.frame to an msDat object ms <- msDat(mass_spec = mass_spec, mtoz = "m/z", charge = "Charge", ms_inten = c(paste0("_", 11:43), "_47")) # Filter out potential candidate compounds filter_out <- filterMS(msObj = ms, region = paste0("VO_", 17:25), border = "all", bord_ratio = 0.01, min_inten = 1000, max_chg = 7) # print, summary function filter_out summary(filter_out) # Extract filtered mass spectrometry data as a matrix or msDat object filter_matr <- extractMS(msObj = filter_out, type = "matrix") filter_msDat <- extractMS(msObj = filter_out, type = "matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.