plaquePicker: Separate stack of ion images into separated single-objects.

View source: R/plaquePicker.R

plaquePickerR Documentation

Separate stack of ion images into separated single-objects.

Description

Separate stack of ion images into separated single-objects.

Usage

plaquePicker(
  ionImages,
  coord,
  method = c("tpoint", "geometric", "peak"),
  fixedThreshold = NULL,
  binMatrix = NULL,
  addIonImages = NULL,
  ...
)

Arguments

ionImages

array of ion images as returned by MALDIquant::msiSlices().

coord

array of coordinates as returned by MALDIquant::coordinates().

method

character, method to use for binarization. If set to "peak" the threshold is set to 0 so each signal will be counted as valid. Make sure you set the tolerance for the ion images right and used actual peak data to generate the ion images.

fixedThreshold

numeric, if not NULL (default) overwrites method and uses a fixed value as a threshold.

addIonImages

array of ion images as returned by MALDIquant::msiSlices(). In contrast to ionImages these additional ion images will not be used for segmentation. The data from these ion images will still be included for the summary and successive data analysis.

binMatirx

binary matrix, if provided it overwrites method and is used to subset ionImages. This can be helpful if you want to segment one modality (e.g. lipid data) by another (e.g. peptide data).

Value

A list, on the top level the list contains one entry per provided ion image with conComp matrix, with same dimensions as the provided ion image and IDs assigned to pixels belonging to the same separate single-object. binMat matrix, of ion image binarized by tpoint-function. threshold numeric, the threshold estimated by tpoint-function. spectraIdx list of integer vectors containing the indecies of the spectra in the list of MALDIquant::massObject. Also, there is another entry called unified: The result of all binarized ion images combined. In addition to conComp, binMat, and spectraIdx that contain the equivalent matrices of the unified data as described above this entry contains the following: intensities list of lists containing the intensities of the corresponding pixels for the provided ion images

Examples

pp <- plaquePicker(NLGF67w_mouse1_rep1, coord = NLGF67w_mouse1_rep1_coord)

CeMOS-Mannheim/PlaquePicker documentation built on Sept. 30, 2022, 5:54 a.m.