extract_plate_layout: Extract layout from labeled plate data

extract_plate_layoutR Documentation

Extract layout from labeled plate data

Description

Ultimately, probably belongs in utils.R or the like. Use extract_plate_layout to generate a plate layout object from labeled data.

Usage

extract_plate_layout(
  data,
  .auto_detect = TRUE,
  .extract_well = TRUE,
  .extract_well_into = c("well", "channel_from_var", "type_from_var"),
  .extract_sep = "_",
  .var_col = "variable",
  .well_col = "well",
  .keep_manual = c("dye_conc_uM", "channel_f", "dye", "type", "exp_num", "identity"),
  .respect_grouping = FALSE,
  ...
)

Arguments

data

a tibble containing labeled dsf data

.auto_detect

a boolean. If TRUE, attempts to automatically identify which columns contain layout information based on the number of unique values provided per well (layout columns have only one value per well; data columns have one per measurement). Defaults to TRUE.

.extract_well

a boolean. If TRUE, extracts the "well" component from a column which contains well, e.g. "A1_FAM", will extract "A1"

.extract_well_into

a character vector, passed directly to the "into" argument of tidyr::separate, if .extract_well is TRUE. Gives the names of the pieces into which the column named in the .var_col argument will be separated. Defaults to c("well", "channel_from_var", "type_from_var"). The elements other than 'well' in .extract_well_into will be dropped from the final layout. A warning is passed if columns of this name existed in input and will therefore also be missing from the resulting layout.

.extract_sep

a string, passed directl yto the "sep" argument to tidyr::separate, if .extract_well is TRUE. Gives the separator between components; defaults to "_"

.var_col

a string, giving the name of the column in the provided data containing unqiue trace identifiers. Defaults to "variable". This column is used to get well names, if .extract_well_into is TRUE.

.well_col

a string, giving the name of the column containing well names, if any.

.keep_manual

a characer vector which, if if .auto_detect = FALSE, gives the names of all column (other than well), which are to be kept and put in the final layout.

.respect_grouping

a boolean, defaults to FALSE, on whether or not to respect grouping of input data. Defaults to FALSE.

...

additional named arguments, not passed to anything, but used to allow the passage of ... arguments to this function from upstream, while ignoring and ... arguments from upstream which do not match arguments in this function.

Value

a plate layout tibble, as described in read_plate_layout


taiawu/dsfworld_package documentation built on June 18, 2024, 5:39 a.m.