Learn R Programming

nontarget (version 1.9)

ms.filter: Flexible interactive filtering of components and/or peaks via polygon selection.

Description

Mark peaks and components in plots of retention time, m/z, mass defect or peak intensity. Select components or peaks by drawing a polygon.

Usage

ms.filter(component, x = "mz", y = "dm", xlim = FALSE, ylim = FALSE, rm.comp = FALSE, plot.comp = TRUE, rm.noncomp = TRUE, select.polygon = "inside", res = 100, filter.for = "raw")

Arguments

component
List of type comp generated by combine.
x
Scale of x-axis, any of "mz" (m/z), "dm" (mass defect), "rt" (retention time) or "int" (intensity).
y
Scale of y-axis, any of "mz" (m/z), "dm" (mass defect), "rt" (retention time) or "int" (intensity).
xlim
xlim=c(upper bound,lower bound), default = FALSE.
ylim
ylim=c(upper bound,lower bound), default = FALSE.
rm.comp
Select (i.e. remove) peaks assigned to components by combine?
plot.comp
Highlight peaks part of a component (red)?
rm.noncomp
Select (i.e. remove) peaks not assigned to components by combine?
select.polygon
Select peaks and/or components to be excluded "inside" or "outside" of the polygon drawn?
res
Resolution of polygon selection; increase if problems with selection by complicated polygons or along polygon boarder occur. Otherwise, ignore.
filter.for
What should be filtered and subsequently returned as value by the polygon selection? Any of "raw" (raw data, i.e. peak list), "pattern" (isotope pattern peak relations, i.e. subset of first entry in list of type pattern generated by pattern.search) or "adduct" (adduct relations, i.e. subset of first entry in list of type adduct generated by adduct.search)

Value

See filter.for argument. Either raw data (i.e. peak list), isotope pattern peak relations, (i.e. subset of first entry in list of type pattern generated by pattern.search) or adduct relations (i.e. subset of first entry in list of type adduct generated by adduct.search).

Details

Selection refers to those peaks and/or components to be excluded. If not all peaks in the data set are assigned to components, they are still plotted and can thus e.g. be separated from those assigned to components by setting rm.comp vs. rm.noncomp.

See Also

plotcomp combine