batchAnalyteSearch: Batch Analyte detection in an MSI dataset

View source: R/batchAnalyteSearch.R

batchAnalyteSearchR Documentation

Batch Analyte detection in an MSI dataset

Description

This applies 'moleculaR::searchAnalyte' on a given MSI dataset against a vector of provided m/z values representing analytes of interest.

Usage

batchAnalyteSearch(
  spData,
  fwhmObj,
  spwin = NA,
  m,
  numCores = 1L,
  wMethod = "Gaussian",
  verifiedMasses = NA,
  confirmedOnly = FALSE,
  verbose = TRUE
)

Arguments

spData

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

fwhmObj

an S3 object of type 'fwhm' with the estimated fwhm data.

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).

m

a numeric vector of m/z values of interest.

numCores

an integer, the number of cores to be used for the search, passed to 'parallel::mclapply'. Not supported on Windows machines.

wMethod

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

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'.

verbose

whether to show progress. Ignored when 'numCores > 1'.

Value

An analyte point patter of type 'ppp' and 'analytePointPattern' containing all analyte hits identified in the MSI dataset 'spData' for the specified m/z values in 'm' taking into account the 'fwhm' information.


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