well.info: Extract ID, Prefix, Well, Row and Column Label

View source: R/well.info.R

well.infoR Documentation

Extract ID, Prefix, Well, Row and Column Label

Description

Create a uniform representation for a multi-titer well with an optional prefix extracted as prefix

Usage

well.info(w, format = NULL, upper = TRUE, drop.levels = TRUE)

Arguments

w

Label (tag) for the well (coerced to a character).

format

Character string as sprintf format for the column, default value of NULL pads the column value with zeros as needed such as "%02d" for more than 9 columns.

upper

to use upper case when TRUE.

drop.levels

logical value to drop unused levels in row and column.

Details

This function will parse the character string in w into an optional "harmonized" tag with an arbitrary prefix used to identify the plate, followed by a single character for the well, followed by the column number formatted as per format. The code will fail if the row value is not one of the 16 letters from A to P or if the column number is not in the range of 1 to 384.

The prefix must contain only alphanumeric characters (0-9, a-z, A-Z), the underscore character, or the hyphen.

This function is also used to harmonize well information generated by different processes that may differ by the lower or upper case or the use of leading zeros for the column number.

Value

A named list of length three or five. Values for tag and prefix will be returned only if a plate prefix is used.

  • tag, harmonized character representation of the entire well name including any prefix if present, otherwise this is not returned

  • prefix, prefix as a character string if present, otherwise this is not returned

  • well, harmonized well name as a factor

  • row, row as a factor with levels A-P (or a-p)

  • column, column number as a factor with levels 1-24

Examples

  well.info("a6") # default settings
  well.info("a6", format = "%d", upper = TRUE)
  well.info("Plate_2b92", format = "%05d")
  well.info("Plate_2b92", format = "%05d", drop.levels = FALSE)


ornelles/virustiter documentation built on March 15, 2024, 9:28 a.m.