rMSIannotation: rMSIannotation

Description Usage Arguments Value

View source: R/annotation.R

Description

Searches for isotopic ions in the peak matrix and evaluates them using morphology, intensity and mass error criteria. This algorithm only searches carbon-based isotopic ions. Using the infromation generated by the isotopes test, the algorithm then proceeds to search adduct pairs between the monoisotopic ions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
rMSIannotation(
  PeakMtx,
  iso.number = 2,
  iso.tolerance = 30,
  iso.charge = 1,
  iso.scoreThreshold = 0.75,
  iso.toleranceUnits = "ppm",
  iso.imageVector = NULL,
  addu.tolerance = 50,
  addu.adducts = data.frame(mass = c(38.963706, 22.98976, 1.007825), name = c("K",
    "Na", "H")),
  csv.results = FALSE,
  csv.path = getwd()
)

Arguments

PeakMtx

List. An rMSIprocPeakMatrix. Must contain at least the following categories:

  • PeakMtx$intensity. A matrix containg the intensities of the peaks for each pixel (rows = pixels, cols = ions).

  • PeakMtx$mass. A vector containg the masses of each peak. Must be in the same order with the columns of the intensity marix.

  • PeakMtx$numPixels. Number of pixels (rows in your matrix).

iso.number

Integer. Number of isotopes for each monoisotopic ion to be found.

iso.tolerance

Integer. Mass tolerance for the distance between isotope candidates in scans or ppms. (1.003355 Da +/- iso.tolerance)

iso.charge

Integer. Charge of the patterns to be found.

iso.scoreThreshold

Numeric between 0 and 1. ILS value to consider a pair of ions isotopes.

iso.toleranceUnits

String. The units of iso.tolerance. Must be 'ppm' or 'scan'. If ToleranceUnits is 'scan' then ImageVector must be the mass channels vector of the rMSI image (rMSIObj$mass).

iso.imageVector

Numeric Vector. The mass channels vector of the imaging dataset containing all the scans.

addu.tolerance

Integer. Mass error tolerance in ppm.

csv.results

Boolean. If TRUE, the annotations will be writen in CSV files under the name A.csv, B.csv and C.csv. By default FALSE.

csv.path

Path. Path to the folder where the CSV files shoul be stored. By default the working directory.

addu.adductDataFrame

Data frame containing the adducts to be searched. By defalut (+H, +Na and +K). It must have two columns.

  • $name. Column containing the names as strings of the elements or molecules that form adducts (i.e. "Na", "K", "H")

  • $mass. Masses of the adduct forming elements.

Value

List.


prafols/rMSIproc documentation built on Dec. 12, 2021, 7:31 p.m.