Learn R Programming

PvSTATEM (version 0.2.2)

process_file: Process a file to generate normalised data and reports

Description

Perform process_plate and generate_plate_report for a given plate file. In more detail, this function reads the plate file and calls the process_plate on the processed plate objects across all the normalisation types, including the raw MFI values. If the user has specified the generate_report flag, it will also call the generate_plate_report function generating the quality control report.

Usage

process_file(
  plate_filepath,
  layout_filepath,
  output_dir = "normalised_data",
  format = "xPONENT",
  generate_report = FALSE,
  process_plate = TRUE,
  normalisation_types = c("RAU", "nMFI"),
  verbose = TRUE,
  ...
)

Arguments

plate_filepath

(character(1)) The path to the plate file.

layout_filepath

(character(1)) The path to the layout file.

output_dir

(character(1)) The directory where the output files should be saved. The default is "normalised_data".

format

(character(1)) The format of the Luminex data. The default is "xPONENT". Available options are "xPONENT" and "INTELLIFLEX".

generate_report

(logical(1)) If TRUE, generate a quality control report. The default is FALSE.

process_plate

(logical(1)) If TRUE, process the plate. The default is TRUE. If the value is set to FALSE the function will only read the plate file and return the plate object.

normalisation_types

(character()) A vector of normalisation types to use. The default is c("RAU", "nMFI").

verbose

(logical(1)) Print additional information. The default is TRUE.

...

Additional arguments to for the read_luminex_data function.

Examples

Run this code

# Select an input csv file for processing and corresponding layout file
plate_file <- system.file("extdata", "CovidOISExPONTENT_CO_reduced.csv", package = "PvSTATEM")
layout_file <- system.file("extdata", "CovidOISExPONTENT_CO_layout.xlsx", package = "PvSTATEM")

example_dir <- tempdir(check = TRUE) # a temporary directory
# create and save dataframe with computed dilutions for all suported noramlization types
process_file(plate_file, layout_file, output_dir = example_dir)

example_dir2 <- tempdir(check = TRUE) # a temporary directory
# process the plate for a specific normalization type
process_file(plate_file, layout_file, output_dir = example_dir2, normalisation_types = c("RAU"))

Run the code above in your browser using DataLab