run_de | R Documentation |
Perform differential expression/accessibility (DE/DA) on single-cell data. Libra implements unique DE/DA methods that can all be accessed from one function. These methods encompass traditional single-cell methods as well as methods accounting for biological replicate including pseudobulk and mixed model methods. The code for this package has been largely inspired by the Seurat and Muscat packages. Please see the documentation of these packages for further information.
run_de(
input,
meta = NULL,
replicate_col = "replicate",
cell_type_col = "cell_type",
label_col = "label",
min_cells = 3,
min_reps = 2,
min_features = 0,
de_family = "pseudobulk",
de_method = "edgeR",
de_type = "LRT",
input_type = "scRNA",
normalization = "log_tp10k",
binarization = FALSE,
latent_vars = NULL,
n_threads = 2
)
input |
a single-cell matrix to be converted, with features (genes) in rows
and cells in columns. Alternatively, a |
meta |
the accompanying meta data whereby the rownames match the column
names of |
replicate_col |
the vector in |
cell_type_col |
the vector in |
label_col |
the vector in |
min_cells |
the minimum number of cells in a cell type to retain it.
Defaults to |
min_reps |
the minimum number of replicates in a cell type to retain it.
Defaults to |
min_features |
the minimum number of expressing cells (or replicates)
for a gene to retain it. Defaults to |
de_family |
the differential expression/accessibility family to use. Available options are:
|
de_method |
the specific differential expression testing method to use.
Please see the documentation under |
input_type |
refers to either scRNA or scATAC |
normalization |
normalization for single-cell based Seurat/Signac methods, options include
|
binarization |
binarization for single-cell ATAC-seq only |
latent_vars |
latent variables for single-cell Seurat/Signac based methods. |
n_threads |
number of threads to use for parallelization in mixed models. |
de_test |
the specific mixed model test to use. Please see the
documentation under |
a data frame containing differential expression results with the following columns:
"cell type": The cell type DE tests were run on. By default Libra will run DE on all cell types present in the original meta data.
"gene": The gene being tested.
"avg_logFC": The average log fold change between conditions. The
direction of the logFC can be controlled using factor levels of label_col
whereby a positive logFC reflects higher expression in the first level of
the factor, compared to the second. This is calculated using Seurat::FoldChange
.
"label1.pct": Percentage of cells expressing the gene in label 1.
"label2.pct": Percentage of cells expressing the gene in label 2.
"label1.exp": Mean expression of the gene in label 1.
"label2.exp": Mean expression of the gene in label 2.
"p_val": The p-value resulting from the null hypothesis test.
"p_val_adj": The adjusted p-value according to the Benjamini Hochberg method (FDR).
"de_family/da_family": The differential expression/accessibility method family.
"de_method/da_method": The precise differential/accessibility expression method.
"de_type/da_type": The differential expression/accessibility method statistical testing type.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.