A class to represent the luminex plate. It contains information about the samples and analytes that were examined on the plate as well as some additional metadata and batch info
Public fields
plate_name
(
character(1)
)
Name of the plate. Set to the name of the file from which the plate was read.analyte_names
(
character()
)
Names of the analytes that were examined on the plate.sample_names
(
character()
)
Names of the samples that were examined on the plate.batch_name
(
character(1)
)
Name of the batch to which the plate belongs.plate_datetime
(
POSIXct()
)
A date and time when the plate was created by the machinesample_locations
(
character()
)
Locations of the samples on the plate.sample_types
(
character()
)
Types of the samples that were examined on the plate. The possible values arec(ALL, BLANK, TEST, NEGATIVE CONTROL, STANDARD CURVE, POSITIVE CONTROL)
.dilutions
(
character()
)
A list containing names of the samples as keys and string representing dilutions as values. The dilutions are represented as strings.dilution_values
(
numeric()
)
A list containing names of the samples as keys and numeric values representing dilutions as values.default_data_type
(
character(1)
)
The default data type that will be returned by theget_data
method. By default is set toMedian
.data
(
list()
)
A list containing dataframes with the data for each sample and analyte. The possible data types - the keys of the list are:c(Median, Net MFI, Count, Avg Net MFI, Mean, Peak)
.In each dataframe, the rows represent samples and the columns represent analytes.
batch_info
(
list()
)
A list containing additional, technical information about the batch.layout
(
character()
)
A list containing information about the layout of the plate. The layout is read from the separate file and usually provides additional information about the dilutions, sample names, and the sample layout on the actual plate.blank_adjusted
(
logical
)
A flag indicating whether the blank values have been adjusted.
Methods
Method new()
Method to initialize the Plate object
Usage
Plate$new(
plate_name,
sample_names,
analyte_names,
batch_name = "",
plate_datetime = NULL,
sample_locations = NULL,
sample_types = NULL,
dilutions = NULL,
dilution_values = NULL,
default_data_type = NULL,
data = NULL,
batch_info = NULL,
layout = NULL
)
Arguments
plate_name
(
character(1)
)
Name of the plate. By default is set to an empty string, during the reading process it is set to the name of the file from which the plate was read.sample_names
(
character()
)
Names of the samples that were examined on the plate.analyte_names
(
character()
)
Names of the analytes that were examined on the plate.batch_name
(
character(1)
)
Name of the batch to which the plate belongs. By default is set to an empty string, during the reading process it is set to thebatch
field of the plateplate_datetime
(
POSIXct()
)
Datetime object representing the date and time when the plate was created by the machine.sample_locations
(
character()
)
Locations of the samples on the plate.sample_types
(
character()
)
Types of the samples that were examined on the plate. The possible values arec(ALL, BLANK, TEST, NEGATIVE CONTROL, STANDARD CURVE, POSITIVE CONTROL)
.dilutions
(
character()
)
A list containing names of the samples as keys and string representing dilutions as values. The dilutions are represented as strings.dilution_values
(
numeric()
)
A list containing names of the samples as keys and numeric values representing dilutions as values.default_data_type
(
character(1)
)
The default data type that will be returned by theget_data
method. By default is set toMedian
.data
(
list()
)
A list containing dataframes with the data for each sample and analyte. The possible data types - the keys of the list arec(Median, Net MFI, Count, Avg Net MFI, Mean, Peak)
. In each dataframe, the rows represent samples and the columns represent analytes.batch_info
(
list()
)
A list containing additional, technical information about the batch.layout
(
character()
)
A list containing information about the layout of the plate. The layout is read from the separate file and usually provides additional information about the dilutions, sample names, and the sample layout on the actual plate.
Method print()
Function prints the basic information about the plate such as the number of samples and analytes
Method summary()
Function outputs basic information about the plate, such as examination date, batch name, and sample types.
Method get_data()
Function returns data for a specific analyte and sample.
Arguments
analyte
An analyte name or its id of which data we want to extract. If set to 'ALL' returns data for all analytes.
sample_type
is a type of the sample we want to extract data from. The possible values are
c(ALL, BLANK, TEST, NEGATIVE CONTROL, STANDARD CURVE, POSITIVE CONTROL)
. Default value isALL
.data_type
The parameter specifying which data type should be returned. This parameter has to take one of values:
c(Median, Net MFI, Count, Avg Net MFI, Mean, Peak)
. What's more, thedata_type
has to be present in the plate's data Default value is plate'sdefault_data_type
, which is usuallyMedian
.
Method get_dilution()
Function returns the dilution represented as strings for a specific sample type.
Method get_dilution_values()
Function returns the dilution values for a specific sample type.
Method blank_adjustment()
Function adjusts the values of samples (all samples excluding the blanks) by clamping the
values to the aggregated value of the BLANK
samples for each analyte separately.
The purpose of this operation is to unify the data by clamping values below the background noise. how this method works was inspired by the paper https://doi.org/10.1038/s41598-020-57876-0 which covers the quality control in the MBA.
In short, this operation firstly calculates the aggregate of MFI in the BLANK
samples
(available methods are: min
, max
, mean
, median
)
and then replaces all values below this threshold with the threshold value.
Method does not modifies the data of type Count
.
This operation is recommended to be performed before any further analysis, but is optional. Skipping it before further analysis is allowed, but will result in a warning.
Arguments
threshold
The method used to calculate the background value for each analyte. Every value below this threshold will be clamped to the threshold value. By default
max
. Available methods are:min
,max
,mean
,median
.inplace
Whether the method should produce new plate with adjusted values or not, By default
TRUE
- operates on the current plate.