Dulce_AnnotateMS1: Annotate glycans in MS1 data

View source: R/AnnotateMS1.r

Dulce_AnnotateMS1R Documentation

Annotate glycans in MS1 data

Description

This function constitutes the complete MS Data Annotation Pipeline. It is robust and smart enough to understand what kind of data is being inputed and continue the pipeline from the appropriate step. It is constructed in such a way that when an error occurs, the last correctly executed product is saved and returned.

Usage

Dulce_AnnotateMS1(
  data,
  cwp = NULL,
  pdp = NULL,
  names = NULL,
  classes = "Unclassified",
  perfwhm = 0.5,
  cor_eic_th = 0.75,
  polarity = NULL,
  rtmin = 0,
  rtmax = Inf,
  pgp = NULL,
  ppm = NULL,
  mzabs = NULL,
  output = "all"
)

Arguments

data

Object of any of these classes: MSnExp, OnDiskMSnExp, XCMSnExp, xcmsSet, xsAnnotate, data.frame.

cwp

CentWaveParam() object. If not given, default CentWaveParam() values are used.

pdp

PeakDensityParam() object. If not given, default PeakDensityParam() values are used.

names

Character vector with length equals to the amount of samples. It defines the identifier of each sample. If NULL (default), it generates names according to: sprintf('sample_\%03d', 1:nrow(data)) (sample_001, sample_002, etc).

classes

Character vector with length equals to the amount of samples. It defines the main grouping of the samples. If NULL (default), it defines an "Unclassified" group for all samples.

perfwhm

numeric value. It will be passed into CAMERA::groupFWHM() function.

cor_eic_th

numeric value. It will be passed into CAMERA::groupCorr() function.

polarity

character value, either "positive" or "negative". It will be passed into CAMERA::findAdducts() function.

rtmin

Numeric value specifying the lower retention time boundary.

rtmax

Numeric value specifying the higher retention time boundary.

pgp

predictGlycansParam() object. If not given, default predictGlycansParam() values are used.

ppm

M/z range for putative glycans in ppm units.

mzabs

M/z range for putative glycans in absolute units. Changed to NULL if both, ppm and mzabs, are specified.

output

Character object that determines what the function will return. If "main", a list with an 'XCMSnExp' object (if possible) and the last achieved product will be returned. If "all", a list with all the partial products along the pipeline is returned. If "last", only the last achieved product will be returned.

Value

If no errors occurs during the execution of the function, then the output depends on th output argument. If all, the function will return every partial product achieved. If main, XCMSnExp object (with peaks picked and grouped) and an annotated putative glycans data.frame are returned. If last, only the annotated putative glycans data.frame is returned. If an error occur during the execution of the function, it saves the last partial product achieved, and tries to return the specified output option.

Examples

# Examples have to be made with a toy data object.


margotbligh/Dulce documentation built on May 15, 2022, 10:51 a.m.