getBgnd | R Documentation |
Determine the optimum background value between "positive" and "negative"
values in the argument param
. The group used to determine the
background is specified with the argument by
.
getBgnd(df, by, param = "mfi", mult = 2.5, log = TRUE)
df |
Annotated |
by |
Character string identifying the grouping factor in |
param |
Variable name in |
mult |
Multiplier constant passed to |
log |
|
The value between positive and negative values in param
will be
determined according to by
. If this value is "control" or is missing,
all values identified as type == "control"
or with x/moi == 0
will be treated as background. If this value is "row" or "column",
any values with type == "control"
or with x/moi == 0
in each
row or column will be used to define the background for that row or column.
If true zero moi values are not present, the background will be determined
by Otsu's method for the groups defined with the variable by
.
Typically this would be "well"
or "file"
but can be any factor
variable in the data.frame df
. The background value will be determined
by the logic in findBgnd
.
The annotated data frame must have the variable identified in param
and, if 'by' is missing, a variable named either "x"
or "moi"
.
If 'by' is provided, variable of this name must exist as a factor in the
argument df
.
A named numeric vector of background values.
getZero
# Subset of data by_stack
f <- system.file("extdata", "by_stack/file005.tif", package = "virustiter")
img <- getImages(f)
v <- parseImages(img)
# Get background value for grouping value of "file"
getBgnd(v, by = "file")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.