This class helps creating the Plate object. It is used to store the data and validate the final fields.
Active bindings
layout_as_vector
Print the layout associated with the plate as a flattened vector of values.
Methods
Method new()
Initialize the PlateBuilder object
Usage
PlateBuilder$new(sample_names, analyte_names, batch_name = "", verbose = TRUE)
Arguments
sample_names
vector of sample names measured during an examination in the same order as in the data
analyte_names
vector of analytes names measured during an examination in the same order as in the data
batch_name
name of the batch during which the plate was examined obtained from the plate info. An optional parameter, by default set to
""
- an empty string.
verbose
logical value indicating whether to print additional information. This parameter is stored as a private attribute of the object and reused in other methods
Method set_dilutions()
Extract and set the dilutions from layout, sample names or use a provided vector of values. The provided vector should be the same length as the number of samples and should contain dilution factors saved as strings
Arguments
use_layout_dilutions
logical value indicating whether to use names extracted from layout files to extract dilutions. If set to
FALSE
the function uses the sample names as a source for dilutionvalues
a vector of dilutions to overwrite the extraction process
Set and extract sample types from the sample names. Optionally use the layout file to extract the sample types
Method set_sample_names()
Set the sample names used during the examination. If the layout is provided, extract the sample names from the layout file. Otherwise, uses the original sample names from the Luminex file
Method set_data()
Set the data used during the examination
Arguments
data
a named list of data frames containing information about the samples and analytes. The list is named by the type of the data e.g.
Median
,Net MFI
, etc. The data frames contain information about the samples and analytes The rows are different measures, whereas the columns represent different analytes Example of howdata$Median
looks like:Sample Analyte1 Analyte2 Analyte3 Sample1 1.2 2.3 3.4 Sample2 4.5 5.6 6.7 ... ... ... ... Sample96 7.8 8.9 9.0
Method set_plate_name()
Set the plate name for the plate. The plate name is extracted from the filepath
Method set_layout()
Set the layout matrix for the plate. This function performs basic validation
verifies if the plate is a matrix of shape 8x12 with 96 wells