batchdataProcessing: Process several mzXML files (peakpicking and isotope...

View source: R/dataProcessing.R

batchdataProcessingR Documentation

Process several mzXML files (peakpicking and isotope annotation) and create an msbatch for batch processing.

Description

Process several mzXML files (peakpicking and isotope annotation) and create an msbatch for batch processing.

Usage

batchdataProcessing(
  files,
  metadata,
  polarity,
  dmzagglom = 15,
  drtagglom = 500,
  drtclust = 100,
  minpeak = c(5, 3),
  drtgap = 10,
  drtminpeak = 15,
  drtmaxpeak = c(100, 200),
  recurs = 5,
  sb = c(3, 2),
  sn = 2,
  minint = c(1000, 100),
  weight = c(2, 3),
  dmzIso = 10,
  drtIso = 5,
  parallel = FALSE,
  ncores,
  verbose = TRUE
)

Arguments

files

file paths of the mzXML files. Optional.

metadata

csv file or data.frame with 3 columns: sample (samples named as the mzXML files), acquisitionmode (MS, DIA or DDA) and groups (i.e. blank, QC, sample). DIA, DDA and MS files are allowed, but only DIA and DDA files will be used for lipid annotation.

polarity

character value: negative or positive.

dmzagglom

mz tolerance (in ppm) used for partitioning and clustering.

drtagglom

rt window used for partitioning (in seconds).

drtclust

rt window used for clustering (in seconds).

minpeak

minimum number of measurements required for a peak.

drtgap

maximum RT gap length to be filled (in seconds).

drtminpeak

minimum RT width of a peak (in seconds). At least minpeak within the drtminpeak window are required to define a peak.

drtmaxpeak

maximum RT width of a single peak (in seconds).

recurs

maximum number of peaks within one EIC.

sb

signal-to-base ratio.

sn

signal-to-noise ratio.

minint

minimum intensity of a peak.

weight

weight for assigning measurements to a peak.

dmzIso

mass tolerance for isotope matching.

drtIso

time windows for isotope matching.

parallel

logical.

ncores

number of cores to be used in case parallel is TRUE.

verbose

print information messages.

Details

This function executes 2 steps: 1) creates an msobject for each sample (using the dataProcessing function) and 2) sets an msbatch (setmsbatch function).

Numeric arguments accept one or two values for MS1 and MS2, respectively.

Value

msbatch

Author(s)

M Isabel Alcoriza-Balaguer <maialba@iislafe.es>

References

Peak-picking algorithm has been imported from enviPick R-package: https://cran.r-project.org/web/packages/enviPick/index.html

See Also

dataProcessing and setmsbatch

Examples

## Not run: 
# if metadata is a data frame:
msbatch <- batchdataProcessing(metadata$sample, metadata, polarity = "positive",
dmzagglom = 25, drtagglom = 500, drtclust = 60, minpeak = c(5, 3),
drtgap = 5, drtminpeak = 20, drtmaxpeak = 100, recurs = 5, sb = c(3, 2),
sn = 2, minint = c(1000, 100), weight = 2, dmzIso = 10, drtIso = 5)

# if metadata is a csv file:
msbatch <- batchdataProcessing(metadata = "metadata.csv", polarity = "positive",
dmzagglom = 25, drtagglom = 500, drtclust = 60, minpeak = c(5, 3),
drtgap = 5, drtminpeak = 20, drtmaxpeak = 100, recurs = 5, sb = c(3, 2),
sn = 2, minint = c(1000, 100), weight = 2, dmzIso = 10, drtIso = 5)

## End(Not run)


LipidMS documentation built on May 29, 2024, 11:24 a.m.