GCIMS Sample is an S4 class to store one sample with the drift and retention time ranges and other relevant attributes (GC column, drift tube length...) if available

The actual spectra is stored in the data slot, in a matrix, where the first index (rows) corresponds to drift times and the second to retention times (columns).

Slots

drift_time

numeric. (required)

retention_time

numeric. (required)

data

matrix A matrix with drift time in the rows and retention time in columns. (required)

gc_column

character. (optional) The type of chromatographic column used

drift_tube_length

numeric (optional) The length of the drift tube, in mm

drift_gas

character. (optional) The drift gas used (e.g "nitrogen")

params

list (optional) Arbitrary list of parameters and annotations

history

character. A character vector with a summary of information of the processing details the sample has gone through already

filepath

character. A string with the path to the raw data

description

A string (optional). A sample name or ID or description used in plots

proc_params

list (internal). Data processing parameters computed and used internally.

peaks

A data frame (internal). The peak list, typically set using findPeaks(). Use peaks() to get/set this.

peaks_debug_info

A list with arbitrary debug information from findPeaks().

baseline

A matrix of the same dimensions as data with the baseline. Use estimateBaseline() to estimate it and baseline() to get or set it.

class_version

"numeric_version" (internal) The GCIMSSample object defines internally a class version, so if a GCIMSSample object is saved, the GCIMS package is updated and the GCIMSSample class has changed during the upgrade it may be possible to upgrade the previously saved object when it's loaded.

Examples

# Create a new GCIMSSample with methods::new()
dummy_obj <-methods::new(
  "GCIMSSample",
  drift_time = 1:2,
  retention_time = 1:3,
  data = matrix(1:6, nrow = 2, ncol = 3),
  gc_column = "Optional column name",
  drift_gas = "nitrogen",
  drift_tube_length = 98.0 # in mm
)