Description Usage Arguments Value Functions Examples
View source: R/cluster-testing.R
Typically one will want to stratify by chain by calling cluster_test_by
, as this will calculate the number of cell "trials" separately depending on the chain recovered.
1 2 3 4 5 6 7 8 9 10 11 12 13 | cluster_test_by(ccdb, fields = "chain", tbl = "cluster_tbl", ...)
cluster_logistic_test(
formula,
ccdb,
filterset = cluster_filterset(),
contig_filter_args = TRUE,
tie_break_keys = c("umis", "reads"),
add_cluster_tbl = FALSE,
keep_fit = FALSE,
fitter = glm_glmer,
silent = FALSE
)
|
ccdb |
|
fields |
|
tbl |
one of |
... |
passed to |
formula |
the right-hand side of a glmer or glm-style formula. |
filterset |
a call to |
contig_filter_args |
an expression passed to |
tie_break_keys |
(optional) |
add_cluster_tbl |
|
keep_fit |
|
fitter |
a function taking arguments |
silent |
|
table with one row per cluster/term.
cluster_test_by
: split ccdb
and conduct tests within strata
1 2 3 4 5 6 7 8 9 10 11 | library(dplyr)
data(ccdb_ex)
ccdb_ex = cluster_germline(ccdb_ex)
trav1 = filter(ccdb_ex$cluster_tbl, v_gene == 'TRAV1')
cluster_logistic_test(~pop + (1|sample), ccdb_ex,
filterset = cluster_filterset(white_list= trav1))
# Fixed effect analysis of each cluster, by chain
prev4 = ccdb_ex$contig_tbl %>% group_by(cluster_idx) %>%
summarize(n()) %>% filter(`n()`>= 4)
cluster_test_by(ccdb = ccdb_ex, fields = 'chain',
tbl = 'cluster_tbl', formula = ~ pop, filterset = cluster_filterset(white_list= prev4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.