titerWF
titerWF.Rd
This function will flag wells that belong to bleaches with highly variable worm titers.
Arguments
- data
A data frame output from the
summarizeWells
function.- ...
<[`dynamic-dots`][rlang::dyn-dots]> Variable(s) used to group data into independent bleaches for strains. Variable names in data are supplied separated by commas and without quotes. Typically the grouping variables will be:
Metadata_Experiemnt, strain, bleach
.- thresh
A numeric value used as a threshold to flag bleaches with high coefficient of variation in well n (cv.n). Bleaches with high cv.n are often either over-bleached or titered incorrectly.
- plot
Logical, if
TRUE
, the default. A ggplot2 object will be returned showing the distribution of CVs in worm number across the wells in control conditions for all independent bleaches. Thethresh
value is plotted as a red vertical line.- doseR
Logical, is this dose response data? The default,
doseR = FALSE
, expects control data to be recorded in the design file a particular way. Specifically, the drug and diluent variables should be identical for controls, e.g,drug = DMSO, diluent = DMSO, concentration_um = 0
. IfdoseR = TRUE
, the controls are expected to be coded differently, .e.g,drug = ABZ, diluent = DMSO, concentration_um = 0
. Warning messages are produced if the controls do not fit expectations, but try to ensure the controls are coded properly without relying this function to catch all edge cases.
Value
Either a single data frame identical to the input data with the titer_WellFlag
variable added.
The titer_WellFlag
variable is coded as "titer"
for all wells belonging to a strain with a coefficient of variation in worm number that is greater than thresh
.
Or, if plot = T
a list with two elements, the first element is the data frame, the other is the diagnostic plot.