osat_score | R Documentation |
The OSAT score is intended to ensure even distribution of samples across batches and is closely related to the chi-square test contingency table (Yan et al. (2012) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/1471-2164-13-689")}).
osat_score(bc, batch_vars, feature_vars, expected_dt = NULL, quiet = FALSE)
bc |
BatchContainer with samples
or |
batch_vars |
character vector with batch variable names to take into account for the score computation. |
feature_vars |
character vector with sample variable names to take into account for score computation. |
expected_dt |
A |
quiet |
Do not warn about |
a list with two attributes: $score
(numeric score value), $expected_dt
(expected counts data.table
for reuse)
sample_assignment <- tibble::tribble(
~ID, ~SampleType, ~Sex, ~plate,
1, "Case", "Female", 1,
2, "Case", "Female", 1,
3, "Case", "Male", 2,
4, "Control", "Female", 2,
5, "Control", "Female", 1,
6, "Control", "Male", 2,
NA, NA, NA, 1,
NA, NA, NA, 2,
)
osat_score(sample_assignment,
batch_vars = "plate",
feature_vars = c("SampleType", "Sex")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.