process_dir | R Documentation |
This function processes all Luminex plate files within a specified directory.
Each plate file is processed using process_file()
, and the resulting normalised data is saved.
Optionally, quality control reports can be generated, and results from multiple plates can be merged into a single file.
Identify all Luminex plate files in the input_dir
, applying recursive search if recurse = TRUE
.
Detect the format of each file based on the format
parameter or the filename.
Locate the corresponding layout file using the filename or use the common layout passed with the layout_filepath
parameter.
Determine the appropriate output directory using get_output_dir()
.
Process each plate file using process_file()
.
If merge_outputs = TRUE
, merge normalised data from multiple plates into a single CSV file.
If format
is specified:
Each plate file should be named as {plate_name}.csv
.
The corresponding layout file should be named as {plate_name}_layout.csv
or {plate_name}_layout.xlsx
.
Alternatively, if layout_filepath
is provided, it serves as a unified layout file for all plates.
If format
equals NULL
(automatic detection):
Each plate file should be named as {plate_name}_{format}.csv
, where {format}
is either xPONENT
or INTELLIFLEX
.
The corresponding layout file should be named using the same convention as above, i.i. {plate_name}_{format}_layout.csv
or {plate_name}_{format}_layout.xlsx
.
The output_dir
parameter specifies where the processed files are saved.
If output_dir
is NULL
, output files are saved in the same directory as the input files.
By default, the output directory structure follows the input directory, unless flatten_output_dir = TRUE
, which saves all outputs directly into output_dir
.
Output filenames follow the convention used in process_file()
.
For a plate named {plate_name}
, the normalised output files are named as:
{plate_name}_RAU.csv
for RAU normalisation.
{plate_name}_nMFI.csv
for nMFI normalisation.
{plate_name}_MFI.csv
for MFI normalisation.
If generate_reports = TRUE
, a quality control report for every plate is saved as {plate_name}_report.pdf
.
If merge_outputs = TRUE
, merged normalised files are named as:
merged_RAU_{timestamp}.csv
merged_nMFI_{timestamp}.csv
merged_MFI_{timestamp}.csv
If generate_multiplate_reports = TRUE
, a multiplate quality control report is saved as multiplate_report_{timestamp}.pdf
.
process_dir(
input_dir,
output_dir = NULL,
recurse = FALSE,
flatten_output_dir = FALSE,
layout_filepath = NULL,
format = NULL,
normalisation_types = c("MFI", "RAU", "nMFI"),
generate_reports = FALSE,
generate_multiplate_reports = FALSE,
merge_outputs = FALSE,
column_collision_strategy = "intersection",
return_plates = FALSE,
dry_run = FALSE,
verbose = TRUE,
...
)
input_dir |
( |
output_dir |
( |
recurse |
(
|
flatten_output_dir |
(
|
layout_filepath |
( |
format |
( |
normalisation_types |
(
|
generate_reports |
(
|
generate_multiplate_reports |
(
|
merge_outputs |
(
|
column_collision_strategy |
(
|
return_plates |
(
|
dry_run |
(
|
verbose |
(
|
... |
Additional arguments passed to |
If return_plates = TRUE
, returns a sorted list of Plate
objects. Otherwise, returns NULL
.
# Process all plate files in a directory
input_dir <- system.file("extdata", "multiplate_lite", package = "SerolyzeR", mustWork = TRUE)
output_dir <- tempdir(check = TRUE)
plates <- process_dir(input_dir, return_plates = TRUE, output_dir = output_dir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.