The output files will be created alongside their corresponding input files, preserving
the directory structure of the input directory unless the flatten_output_dir
parameter is set to TRUE
.
process_dir(
input_dir,
output_dir = NULL,
recurse = FALSE,
flatten_output_dir = FALSE,
layout_filepath = NULL,
format = NULL,
normalisation_types = c("RAU", "nMFI"),
generate_reports = FALSE,
merge_outputs = FALSE,
column_collision_strategy = "intersection",
return_plates = FALSE,
dry_run = FALSE,
verbose = TRUE,
...
)
If the return_plates
parameter is set to TRUE
the function returns a list of plates
sorted by the plate_datetime
(The time of the experiment noted in the csv file) in increasing order (oldest plates first).
If the return_plates
parameters is set to FALSE
the function returns NULL
.
(character(1)
) The directory containing the input files. It may be nested.
(character(1)
) Optional overwrite directory where the output files should be saved. The default is NULL
.
By default, the output directory is the same as the input directory.
(logical(1)
) If TRUE
, the function will search for files recursively in the input directory. The default is FALSE
.
(logical(1)
) If TRUE
, the output files will be saved in the output directory directly. The default is FALSE
.
(character(1)
) The path to the layout file. The default is NULL
, and the layout file will have to
be determined automatically based on the file name.
(character(1)
) The format of the Luminex data. The default is NULL
, and the format will have to
be determined automatically based on the file name. Available options are xPONENT
and INTELLIFLEX
.
(character()
) A vector of normalisation types to use. The default is c("RAU", "nMFI")
.
(logical(1)
) If TRUE
, generate quality control reports for each file. The default is FALSE
.
(logical(1)
) If TRUE
, merge the outputs of all plates into a single CSV file for each normalisation type.
The resulting file will be saved in the output directory with the name merged_{normalisation_type}_{timestamp}.csv
.
Example: merged_nMFI_20250115_230735.csv
.
(character(1)
) A method for handling missing or additional columns when merging outputs.
Possible options are union
and intersection
. The default is intersection
.
(logical(1)
) If TRUE
, return a list of processed plates. The default is FALSE
.
(logical(1)
) If TRUE
, the function will not process any files
but will print the information about the files that would be processed. The default is FALSE
.
(logical(1)
) Print additional information. The default is TRUE
.
Additional arguments to for the process_file
function.
# Select input directory to process
dir <- system.file("extdata", "multiplate_lite", package = "PvSTATEM", mustWork = TRUE)
# Select output directory
output_dir <- tempdir(check = TRUE)
# Process input directory and return plates
plates <- process_dir(dir, return_plates = TRUE, output_dir = output_dir)
Run the code above in your browser using DataLab