| pseudobulk_pairwise | R Documentation |
For each ordered pair of contrast levels in vals_test, fits a
DESeq2 model on just those two groups of pseudobulks and returns the
foreground-vs-background coefficient. This is more conservative than
one-vs-all because a marker has to differentiate the foreground from
every other group, not just the average background. Cost grows as
O(N^2) in the number of levels, so subset to the levels of interest
first.
pseudobulk_pairwise(
dge_formula,
counts_df,
meta_data,
contrast_var,
vals_test,
verbose,
min_counts_per_sample,
present_in_min_samples
)
dge_formula |
One-sided formula such as |
counts_df |
Feature-by-pseudobulk integer count matrix. Rows
are features; columns must align with rows of |
meta_data |
data.frame of pseudobulk metadata. One row per
pseudobulk; should contain only the variables used in
|
contrast_var |
Name of the contrast column in |
vals_test |
Character vector of contrast levels to test. If
|
verbose |
Logical. Print progress messages. Default |
min_counts_per_sample |
Minimum count per pseudobulk for a
gene to be considered expressed in that pseudobulk. Default |
present_in_min_samples |
Minimum number of pseudobulks in
which a gene must reach |
Most users should call pseudobulk_deseq2() with mode = "pairwise"
rather than this function directly. The companion
summarize_dge_pairs() collapses the directional pairs to a single
row per (gene, group).
data.frame of DESeq2 results with columns group1,
group2, feature, baseMean, log2FoldChange, lfcSE,
stat, pvalue, padj. Each row reports the test where
pseudobulks of group1 are the foreground and pseudobulks of
group2 are the background.
pseudobulk_deseq2(), pseudobulk_one_vs_all(),
pseudobulk_within(), summarize_dge_pairs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.