read_luminex_data {SerolyzeR} | R Documentation |
Read Luminex Data
Description
Reads a Luminex plate file and returns a Plate object containing the extracted data. Optionally, a layout file can be provided to specify the arrangement of samples on the plate.
Usage
read_luminex_data(
plate_filepath,
layout_filepath = NULL,
format = "xPONENT",
plate_file_separator = ",",
plate_file_encoding = "UTF-8",
use_layout_sample_names = TRUE,
use_layout_types = TRUE,
use_layout_dilutions = TRUE,
default_data_type = "Median",
sample_types = NULL,
dilutions = NULL,
verbose = TRUE,
...
)
Arguments
plate_filepath |
( |
layout_filepath |
( |
format |
(
|
plate_file_separator |
(
|
plate_file_encoding |
(
|
use_layout_sample_names |
(
|
use_layout_types |
(
|
use_layout_dilutions |
(
|
default_data_type |
(
|
sample_types |
( |
dilutions |
( |
verbose |
(
|
... |
Additional arguments. Ignored in this method. Here included for better integration with the pipeline |
Details
The function supports two Luminex data formats:
-
xPONENT: Used by older Luminex machines.
-
INTELLIFLEX: Used by newer Luminex devices.
Value
A Plate object containing the parsed Luminex data.
Workflow
Validate input parameters, ensuring the specified format is supported.
Read the plate file using the appropriate parser:
xPONENT files are read using
read_xponent_format()
.INTELLIFLEX files are read using
read_intelliflex_format()
.
Post-process the extracted data:
Validate required data columns (
Median
,Count
).Extract sample locations and analyte names.
Parse the date and time of the experiment.
File Structure
-
Plate File (
plate_filepath
): A CSV file containing Luminex fluorescence intensity data. -
Layout File (
layout_filepath
) (optional): An Excel or CSV file containing the plate layout.The layout file should contain a table with 8 rows and 12 columns, where each cell corresponds to a well location.
The values in the table represent the sample names for each well.
Sample types detection
The read_luminex_data()
method automatically detects the sample types based on the sample names, unless provided the sample_types
parameter.
The sample types are detected used the translate_sample_names_to_sample_types()
method.
In the documentation of this method, which can be accessed with command ?translate_sample_names_to_sample_types
, you can find the detailed description of the sample types detection.
Duplicates in sample names
In some cases, we want to analyse the sample with the same name twice on one plate. The package allows for such situations, but we assume that the user knows what they are doing.
When importing sample names (either from the layout file or the plate file), the function will check for duplicates. If any are found, it will issue a warning like:
Duplicate sample names detected: A, B. Renaming to make them unique.
Then it will add simple numeric suffixes (e.g. “.1”, “.2”) to the repeated sample names so that every name is unique while keeping the original text easy to recognize.
Examples
# Read a Luminex plate file with an associated layout file
plate_file <- system.file("extdata", "CovidOISExPONTENT.csv", package = "SerolyzeR")
layout_file <- system.file("extdata", "CovidOISExPONTENT_layout.csv", package = "SerolyzeR")
plate <- read_luminex_data(plate_file, layout_file)
# Read a Luminex plate file without a layout file
plate_file <- system.file("extdata", "CovidOISExPONTENT_CO.csv", package = "SerolyzeR")
plate <- read_luminex_data(plate_file, verbose = FALSE)