This function is used to name attribute(s). Attribute(s) names, in this case, are equivalent to the well labels found on the microplate reader. An attribute for a sample loaded into row A - column 1 will be named A1. In short, the function takes a clean data frame and returns attribute names that match the FLUOstar plate layout often presented as an Excel file.
Usage
dat_col_names_rigid(
dat = NULL,
df,
rows_used = NULL,
cols_used = NULL,
user_specific_labels = NULL,
read_direction = NULL
)
Arguments
- dat
A string ("dat_1.dat") if the file is found within the present working directory (pwd) OR a path pointing directly to a ".dat" file.
- df
A data frame that requires attribute labels.
- rows_used
A character vector indicating the rows or tuples used on the microplate (usually a 96-well microplate). Initialized as NULL.
- cols_used
A numeric vector indicating the plate columns or attributes used. Initialized as NULL.
- user_specific_labels
A character vector where the user manually enters the used microplate wells based on the FLUOstar plate layout.
- read_direction
A string input with two choices, “vertical” or “horizontal.” The user indicates “vertical” if the user intends to have a final data frame with samples arranged as sample type triplets (A1, B1, C1, A1, B1, C1) OR “horizontal” if the user intends to have a final data frame with samples arranged as clusters per sample type (A1, A2, A3, B1, B2, B3).
Note
Users are advised to input rows used but won’t be penalized for not doing so. If the user provides the rows used, then attribute names are generated for the user. The user must check to ensure that the names match the microplate layout.
The user can leave the columns used as NULL if the user loaded samples from column 1 and did so in sequence. If the user fails to load in sequence from the first position, then the user must provide a numeric vector of columns used.
For instance, where the user skips columns, the user will be prompted to interact with the program in order to ensure the final data frame has the correct attribute names.
The user can bypass the rows used and columns used parameters if the user supplies a manually created character vector of the wells used in an experiment.
The read direction parameter is used to determine the presentation of the samples in the final data frame.
This naming function only returns a character vector hence the rigid suffix.
Examples
fpath <- system.file("extdata", "dat_1.dat", package = "normfluodbf", mustWork = TRUE)
dat_df <- read.table(file=fpath)
nocomma_dat <- clean_odddat_optimus(dat_df)
resampled_scaled <- resample_dat_scale(nocomma_dat, tnp=3, cycles=40)
n = c('A','B','C')
sample_col_names <- dat_col_names_rigid(dat = fpath, resampled_scaled, n)