PerformDataTrimming: Perform ROI Extraction from raw MS data (PerformDataTrimming)

View source: R/ROI_Extraction.R

PerformDataTrimmingR Documentation

Perform ROI Extraction from raw MS data (PerformDataTrimming)

Description

This function performs the raw data trimming. This function will output an trimmed MSnExp file to memory or hardisk according to the choice of users must provide the data path for 'datapath', and optionally provide other corresponding parameters.

Usage

PerformDataTrimming(
  datapath,
  mode = "ssm",
  write = FALSE,
  mz,
  mzdiff,
  rt,
  rtdiff,
  rt.idx = 1/15,
  rmConts = TRUE,
  plot = TRUE,
  running.controller = NULL
)

Arguments

datapath

Character, the path of the raw MS data files' or folder's path (.mzXML, .CDF and .mzML) for parameters training.

mode

Character, mode for data trimming to select the chraracteristic peaks. Default is 'ssm'. Users could select random trimed according to mz value (mz_random) or RT value (rt_random). Besides, specific peaks at certain mz (mz_specific) or RT (rt_specific) could also be extracted. 'none' will not trim the data.

write

Logical, if true, will write the trimmed data to the directory 'trimmed' folder in the datapath. The data in memory will be kept.

mz

Numeric, mz value(s) for specific selection. Positive values means including (the values indicted) and negative value means excluding/removing.

mzdiff

Numeric, the deviation (ppm) of mz value(s).

rt

Numeric, rt value for specific selection. Positive values means including and negative value means excluding.

rtdiff

Numeric, the deviation (seconds) of rt value(s).

rt.idx

Numeric, the relative rt (retention time) range, from 0 to 1. 1 means all retention time will be retained, while 0 means none. Default is 1/15. If default rt.idx produce too few peaks, please consider increasing this value.

rmConts

LOgical, whether to exclude/remove the potential contamination for parameters optimization. Default is TRUE.

plot

Logical, if TRUE, will plot the chromatogram of the trimmed data.

running.controller

The resuming pipeline running controller. Optional. Don't need to define by hand.

Value

will return an mSet objects with extracted ROI

Author(s)

Zhiqiang Pang zhiqiang.pang@mail.mcgill.ca Jeff Xia jeff.xia@mcgill.ca Mcgill University License: GNU GPL (>= 2)

See Also

PerformROIExtraction for the new version of this function.

Examples

DataFiles <- dir(system.file("mzData", package = "mtbls2"), full.names = TRUE, recursive = TRUE)
# mSet <- PerformDataTrimming(datapath = DataFiles[1],rt.idx = 0.025, rmConts = FALSE);

xia-lab/OptiLCMS documentation built on Nov. 16, 2024, 4:36 p.m.