batchLipidSearch: Batch lipid detection in an MSI dataset

View source: R/batchLipidSearch.R

batchLipidSearchR Documentation

Batch lipid detection in an MSI dataset

Description

This applies 'moleculaR::searchAnalyte' on a given MSI dataset against the entire SwissLipids database taking into account the different ionization statuses (i.e. adducts).

Usage

batchLipidSearch(
  spData,
  fwhmObj,
  spwin = NA,
  sldb,
  adduct = c("M-H", "M+H", "M+Na", "M+K"),
  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).

sldb

the SwissLipid database loaded as a data.frame.

adduct

a character vector specifying the ionisation status of interest, c("M-H", "M+H", "M+Na", "M+K").

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 lipid hits identified in the MSI dataset 'spData' for the specified 'adduct' formations taking into account the 'fwhm' information.


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