GCIMSDataset_fromList

GCIMSDataset_fromList(
  samples,
  pData = NULL,
  scratch_dir = NULL,
  keep_intermediate = FALSE,
  on_ram = TRUE
)

Arguments

samples

A named list of GCIMSSample objects. names should match pData$SampleID

pData

A data frame with at least the SampleID and filename columns.

scratch_dir

A directory to save intermediate results.

keep_intermediate

Whether to keep sample files for intermediate results. Only used if on_ram=FALSE

on_ram

logical. Whether the dataset should be kept stored on RAM or on disk.

Value

A GCIMSDataset object

Examples

# Create a new GCIMSDataset with the convenient constructor function:
sample1 <- GCIMSSample(
  drift_time = 1:2,
  retention_time = 1:3,
  data = matrix(1:6, nrow = 2, ncol = 3)
)
dummy_obj <- GCIMSDataset_fromList(
  pData = data.frame(SampleID = "Sample1", Sex = "female"),
  samples = list(Sample1 = sample1)
)