process_plate {SerolyzeR}R Documentation

Process Plate Data and Save Normalised Output

Description

Processes a Luminex plate and computes normalised values using the specified normalisation_type. Depending on the chosen method, the function performs blank adjustment, fits models, and extracts values for test samples. Optionally, the results can be saved as a CSV file.

Usage

process_plate(
  plate,
  filename = NULL,
  output_dir = "normalised_data",
  write_output = TRUE,
  normalisation_type = "RAU",
  data_type = "Median",
  sample_type_filter = "ALL",
  blank_adjustment = FALSE,
  verbose = TRUE,
  reference_dilution = 1/400,
  ...
)

Arguments

plate

A Plate object containing raw or processed Luminex data.

filename

(character(1), optional) Output CSV filename. If NULL, defaults to "{plate_name}_{normalisation_type}.csv". File extension is auto-corrected to .csv if missing. If an absolute path is given, output_dir is ignored.

output_dir

(character(1), default = "normalised_data") Directory where the CSV will be saved. Will be created if it doesn't exist. If NULL, the current working directory is used.

write_output

(logical(1), default = TRUE) Whether to write the output to disk.

normalisation_type

(character(1), default = 'RAU') The normalisation method to apply.

  • Allowed values: c(MFI, RAU, nMFI).

data_type

(character(1), default = "Median") The data type to use for normalisation (e.g., "Median").

sample_type_filter

(character()) The types of samples to normalise. (e.g., "TEST", "STANDARD CURVE"). It can also be a vector of sample types. In that case, dataframe with multiple sample types will be returned. By default equals to "ALL", which corresponds to processing all sample types.

blank_adjustment

(logical(1), default = FALSE) Whether to apply blank adjustment before processing.

verbose

(logical(1), default = TRUE) Whether to print additional information during execution.

reference_dilution

(numeric(1) or character(1), default = 1/400) Target dilution used for nMFI calculation. Ignored for other types. Can be numeric (e.g., 0.0025) or string (e.g., "1/400").

...

Additional arguments passed to the model fitting function create_standard_curve_model_analyte() and predict.Model

Details

Supported normalisation types:

Value

A data frame of computed values, with test samples as rows and analytes as columns.

RAU Workflow

  1. Optionally perform blank adjustment.

  2. Fit a model for each analyte using standard curve data.

  3. Predict RAU values for test samples.

  4. Aggregate and optionally save results.

nMFI Workflow

  1. Optionally perform blank adjustment.

  2. Compute normalised MFI using the reference_dilution.

  3. Aggregate and optionally save results.

MFI Workflow

  1. Optionally perform blank adjustment.

  2. Return adjusted MFI values.

See Also

create_standard_curve_model_analyte, get_nmfi

Examples

plate_file <- system.file("extdata", "CovidOISExPONTENT_CO_reduced.csv", package = "SerolyzeR")
layout_file <- system.file("extdata", "CovidOISExPONTENT_CO_layout.xlsx", package = "SerolyzeR")
plate <- read_luminex_data(plate_file, layout_file, verbose = FALSE)

example_dir <- tempdir(check = TRUE)

# Process using default settings (RAU normalisation)
process_plate(plate, output_dir = example_dir)

# Use a custom filename and skip blank adjustment
process_plate(plate,
  filename = "no_blank.csv",
  output_dir = example_dir,
  blank_adjustment = FALSE
)

# Use nMFI normalisation with reference dilution
process_plate(plate,
  normalisation_type = "nMFI",
  reference_dilution = "1/400",
  output_dir = example_dir
)


[Package SerolyzeR version 1.3.0 Index]