Learn R Programming

gcxgclab (version 1.1.0)

batch_preprocess: Batch reprocessing

Description

batch_preprocess performs full preprocessing on a batch of data files.

Usage

batch_preprocess(
  path = ".",
  mod_t = 10,
  shift = 0,
  lambda = 20,
  gamma = 0.5,
  subtract = NULL,
  THR = 10^5,
  do_align = TRUE,
  use_ref_peak = TRUE,
  ref_peak = 92.1397,
  images = FALSE
)

Value

A data.frame object. A list of pairs of data frames. A TIC data frame and an MS data frame for each file.

Arguments

path

a string object. The path to the directory containing the cdf files to be batch preprocessed and aligned.

mod_t

a float object. The modulation time for the GCxGC sample analysis. Default is 10.

shift

a float object. The number of seconds to shift the phase by. Default is 0 to skip shifting.

lambda

a float object. A number (parameter in Whittaker smoothing), suggested between 1 to 10^5. Small lambda is very little smoothing, large lambda is very smooth. Default is lambda = 20.

gamma

a float object. Correction factor between 0 and 1. 0 results in almost no values being subtracted to the baseline, 1 results in almost everything except the peaks to be subtracted to the baseline. Default is 0.5.

subtract

a data.frame object. Data frame containing TIC data from a background sample or blank sample to be subtracted from the sample TIC data.

THR

a float object. Threshold for peak intensity for peak alignment. Should be a number between the baseline value and the highest peak intensity. Default is THR = 100000.

do_align

a boolean object. An optional input allowing the user to skip alignment of the given data files if alignment is not needed. Default is TRUE.

use_ref_peak

a boolean object. Determines if an initial shift to a given reference peak, default is toluene, should be done before aligning all other peaks above given threshold THR. Default is TRUE.

ref_peak

a float object. The m/z value of the reference peak for optional initial shift. Default is 92.1397 (toluene).

images

a boolean object. An optional input. If TRUE, all images of preprocessing steps will be displayed. Default is FALSE, no images will be displayed.

Details

This function performs full preprocessing on a batch of data files. Extracts data and performs peak alignment and performs smoothing and baseline correction.

Examples

Run this code
folder <- system.file("extdata",package="gcxgclab")
frame_list <- batch_preprocess(folder,mod_t=.5,lambda=10,gamma=0.5,images=TRUE)

Run the code above in your browser using DataLab