searchAnalyte: Analyte detection in an MSI dataset

View source: R/searchAnalyte.R

searchAnalyteR Documentation

Analyte detection in an MSI dataset

Description

This function check if an analyte (given by m/z) is detectable in the MS data represented by a 'sparseIntensityMatrix' object.

Usage

searchAnalyte(
  m,
  fwhm,
  spData,
  wMethod = "Gaussian",
  spwin = NA,
  verifiedMasses = NA,
  confirmedOnly = FALSE,
  metaData = list()
)

Arguments

m

the mass to be queried (in Da).

fwhm

the fwhm at 'm'.

spData

an S3 object of type 'sparseIntensityMatrix' holding the sparse MSI data.

wMethod

wighting method; c("Gaussian", "sum", "max", "mean").

spwin

optional, an object of type 'owin'. If not given the function tries to generate the spatial window out of the coordinates of all points of the dataset stored in 'spData' (default behavior).

verifiedMasses

an optional numeric vector of m/z values that are (externally) verified to be real molecular entities with a certain confidence, ex. 'mz' column of a METASPACE annotation result.

confirmedOnly

if 'TRUE', returns detections only if confirmed by 'verifiedMasses'.

metaData

optional named list with additional identifiers for the analyte under study, ex. list(lipidID = "..", sumformular = "..", ..). This will be passed to the 'metaData' slot of the resulting 'analytePointPattern' object.

Value

An analyte point patter of type 'ppp' and 'analytePointPattern' containing the hits for 'm' in 'msData'. If 'confirmedOnly = TRUE' then only these hits are returned.


CeMOS-Mannheim/moleculaR documentation built on April 14, 2025, 8:27 a.m.