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_sample_locations()

Set the sample types used during the examination

Usage

PlateBuilder$set_sample_locations(sample_locations)

Arguments

sample_locations

vector of sample locations pretty name ie. A1, B2


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

Usage

PlateBuilder$set_dilutions(use_layout_dilutions = TRUE, values = NULL)

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 dilution

values

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_types()

Usage

PlateBuilder$set_sample_types(use_layout_types = TRUE, values = NULL)

Arguments

use_layout_types

logical value indicating whether to use names extracted from layout files to extract sample types

values

a vector of sample types to overwrite the extraction process


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

Usage

PlateBuilder$set_sample_names(use_layout_sample_names = TRUE)

Arguments

use_layout_sample_names

logical value indicating whether to use names extracted from layout files. If set to false, this function only checks if the sample names are provided in the plate


Method set_data()

Set the data used during the examination

Usage

PlateBuilder$set_data(data)

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 how data$Median looks like:

SampleAnalyte1Analyte2Analyte3
Sample11.22.33.4
Sample24.55.66.7
............
Sample967.88.99.0


Method set_default_data_type()

Set the data type used for calculations

Usage

PlateBuilder$set_default_data_type(data_type = "Median")

Arguments

data_type

a character value representing the type of data that is currently used for calculations. By default, it is set to Median


Method set_batch_info()

Set the batch info for the plate

Usage

PlateBuilder$set_batch_info(batch_info)

Arguments

batch_info

a raw list containing metadata about the plate read from the Luminex file


Method set_plate_name()

Set the plate name for the plate. The plate name is extracted from the filepath

Usage

PlateBuilder$set_plate_name(file_path)


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

Usage

PlateBuilder$set_layout(layout_matrix)

Arguments

layout_matrix

a matrix containing information about the sample names. dilutions, etc.


Method build()

Create a Plate object from the PlateBuilder object

Usage

PlateBuilder$build(validate = TRUE)


Method clone()

The objects of this class are cloneable with this method.

Usage

PlateBuilder$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.