Learn R Programming

cellHTS (version 1.42.0)

convertWellCoordinates: Converts different well identifiers

Description

For example, "B02" <-> c("B", "02") <-> 26, "AB32" <-> c("AB", "32") <-> 1328.

Usage

convertWellCoordinates(x, pdim, type="384")

Arguments

x
either: a character vector with alphanumeric well identifiers (e.g. B03 or AB32); or an nx2 character matrix whose first column contains letters and whose second column contains numbers; or an integer vector with position identifiers for wells within a plate (e.g. 27).
pdim
a vector of length 2 with names nrow and ncol giving the number of rows and columns in a plate. E.g. 'c(nrow=32, ncol=48)' for 1536-well plates.
type
an alternative way of specifying pdim. Supported are the values "24" for c(nrow=4, ncol=6), "96" for c(nrow= 8, ncol=12), "384" for c(nrow=16, ncol=24) and "1536" for c(nrow=32, ncol=48).

Value

  • A list with elements: letnum, with the alphanumeric well identifiers; let.num, with the alphanumeric well identifiers giving as a pair c(letter(s), 2-digits); num, with the integer position of the well within a plate.

Examples

Run this code
pd <- c("nrow"=8L, "ncol"=12L) # 96-well plate
    w <- sample(prod(pd), 3L)
    wpos <- convertWellCoordinates(w, pd)
    wpos

Run the code above in your browser using DataLab