convertWellCoordinates {cellHTS2} | R Documentation |
Converts between different ways of specifying well coordinates. For example, "B02" <-> c("B", "02") <-> 26.
convertWellCoordinates(x, pdim)
x |
either a character vector with alphanumeric well identifiers (e.g. 'B03') or a vector (or matrix) of the type c('B', '03') ) or a vector of integers with position identifiers for a well 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 (integer values). E.g. 'c(nrow=16L, ncol=24L)' for 384-well plates. |
This function can be used to convert between different ways of specifying well coordinates within a plate. For example, wells can be identified by an alphanumeric character (e.g. "B02" or c("B", "02")) or by an integer value (e.g. 26). See Examples.
A list with elements:
letnum
, with the alphanumeric well identifiers;
let.num
, with the alphanumeric well identifiers giving as a pair c(LETTER, 2-digits);
num
, with the position of the well within a plate.
Ligia Bras ligia@ebi.ac.uk and W. Huber huber@ebi.ac.uk
pd <- c("nrow"=8L, "ncol"=12L) # 96-well plate w <- sample(1:prod(pd), 3) wpos <- convertWellCoordinates(w, pd) wpos