plate_view {quicR} | R Documentation |
Real-Time Plate View
Description
Converts the real-time data into a ggplot figure. The layout is either 8x12 or 16x24 for 96- and 384-well plates, respectively.
Usage
plate_view(df, meta, plate = 96)
Arguments
df |
Real-time dataframe |
meta |
Dataframe containing well IDs and Sample IDs to title each facet. |
plate |
Integer either 96 or 384 to denote microplate type. |
Value
A ggplot object
Examples
# This test takes >5 sec
file <- system.file(
"extdata/input_files",
file = "test.xlsx",
package = "quicR"
)
tab <- organize_tables(file)
IDs <- quicR::convert_tables(tab)[["Sample IDs"]] |>
na.omit()
# Get the real-time data.
df_ <- get_real(file, ordered = FALSE)[[1]]
# Set the time column as the df index.
rownames(df_) <- df_[, 1]
# Remove the time column and ID row.
df_ <- df_[, -1]
# Get the wells used in the run.
wells <- get_wells(file)
# Take the metadata and apply it into a dataframe for the plate_view function.
sample_locations <- cbind(wells, IDs) |>
stats::na.omit()
# Wrap the text if it is too long.
sample_locations <- sample_locations |>
dplyr::mutate(IDs = ifelse(stringr::str_length(IDs) > 12, gsub(" ", "\n", IDs), IDs))
# Make the plate view figure.
plate_view(df_, sample_locations, plate = 96)
[Package quicR version 1.0.2 Index]