.plate_layout <- function(plate.dimensions,forbidden.wells) {
plate.dimensions <- as.integer(plate.dimensions)
plate.layout <- matrix(FALSE,
nrow=plate.dimensions[1],
ncol=plate.dimensions[2])
rownames(plate.layout) <- LETTERS[seq_len(plate.dimensions[1])]
colnames(plate.layout) <- seq_len(plate.dimensions[2])
if(!is.null(forbidden.wells)) {
forbidden.wells <- lapply(forbidden.wells,function(x) {
return(list(row=(gsub("[[:digit:]]","",x) |> match(LETTERS)),
column=(gsub("[^[:digit:]]","",x)) |> as.integer()))
}) |> data.table::rbindlist()
plate.layout[cbind(forbidden.wells[,row],
forbidden.wells[,column])] <- NA
}
return(plate.layout)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.