filterPeaks: Filter peak list of MSI data

Description Usage Arguments Value

View source: R/filterPeaks.R

Description

Perform peak filtering of MSI dataset by one of three methods. "topX" retains the top X peaks by intensity. "XofTop" retains all peaks above fraction X of the highest peak. "XofTotal" retains the top peaks (by intensity) that cumulatively account for 1-X of the total intensity. For "topX", the value of parameter X should be an integer >= 1, whereas for the latter two, X should be between 0 and 1.

Usage

1
2
filterPeaks(d, how = c("topX", "XofTop", "XofTotal"), x = NULL,
  index = NULL)

Arguments

d

either an msimat object, or a data.frame with three columns: peaks, counts, and intensities representing the mass spectrum of the MSI data.

how

character; Method to use for filtering (see above)

x

numeric; Parameter for the filtering method.

index

logical; If input is a dataframe, and index=TRUE, then return will be a vector of indices rather than a data frame.

Value

Either a data.frame or msimat object, representing subset of the input data, or a vector of indices if index=TRUE and the input is a data.frame.


kbseah/mass2adduct documentation built on June 9, 2021, 9:20 p.m.