DA_Seurat | R Documentation |
Fast run for Seurat differential abundance detection method.
DA_Seurat(
object,
assay_name = "counts",
pseudo_count = FALSE,
norm = "LogNormalize",
scale.factor = 10000,
test = "wilcox",
contrast = NULL,
verbose = TRUE
)
object |
a phyloseq or TreeSummarizedExperiment object. |
assay_name |
the name of the assay to extract from the
TreeSummarizedExperiment object (default |
pseudo_count |
add 1 to all counts if TRUE (default
|
norm |
Method for normalization.
|
scale.factor |
Sets the scale factor for cell-level normalization |
test |
Denotes which test to use. Available options are:
|
contrast |
character vector with exactly three elements: the name of a factor in the design formula, the name of the numerator level for the fold change, and the name of the denominator level for the fold change. |
verbose |
an optional logical value. If |
A list object containing the matrix of p-values 'pValMat', the matrix of summary statistics for each tag 'statInfo', and a suggested 'name' of the final object considering the parameters passed to the function.
CreateSeuratObject
to create the Seurat
object, AddMetaData
to add metadata information,
NormalizeData
to compute the normalization for the
counts, FindVariableFeatures
to estimate the
mean-variance trend, ScaleData
to scale and center
features in the dataset, and FindMarkers
to perform
differential abundance analysis.
set.seed(1)
# Create a very simple phyloseq object
counts <- matrix(rnbinom(n = 60, size = 3, prob = 0.5), nrow = 10, ncol = 6)
metadata <- data.frame("Sample" = c("S1", "S2", "S3", "S4", "S5", "S6"),
"group" = as.factor(c("A", "A", "A", "B", "B", "B")))
ps <- phyloseq::phyloseq(phyloseq::otu_table(counts, taxa_are_rows = TRUE),
phyloseq::sample_data(metadata))
# Differential abundance
DA_Seurat(object = ps, contrast = c("group","B","A"))
# Perform a simple Wilcoxon test using Seurat on raw data
DA_Seurat(object = ps, contrast = c("group","B","A"), norm = "none",
test = "wilcox")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.