DA_ZicoSeq | R Documentation |
Fast run for ZicoSeq differential abundance detection method.
DA_ZicoSeq(
object,
assay_name = "counts",
contrast = NULL,
strata = NULL,
adj.name = NULL,
feature.dat.type = c("count", "proportion", "other"),
is.winsor = TRUE,
outlier.pct = 0.03,
winsor.end = c("top", "bottom", "both"),
is.post.sample = TRUE,
post.sample.no = 25,
perm.no = 99,
link.func = list(function(x) sign(x) * (abs(x))^0.5),
ref.pct = 0.5,
stage.no = 6,
excl.pct = 0.2,
verbose = TRUE
)
object |
a phyloseq or TreeSummarizedExperiment object. |
assay_name |
the name of the assay to extract from the
TreeSummarizedExperiment object (default |
contrast |
character vector with exactly, three elements: a string indicating the name of factor whose levels are the conditions to be compared, the name of the level of interest, and the name of the other level. |
strata |
a factor such as subject IDs indicating the permutation strata or characters indicating the strata variable in |
adj.name |
the name(s) for the variable(s) to be adjusted. Multiple variables are allowed.
They could be numeric or categorical; should be in |
feature.dat.type |
the type of the feature data. It could be "count", "proportion" or "other". For "proportion" data type, posterior sampling will not be performed, but the reference-based ratio approach will still be used to address compositional effects. For "other" data type, neither posterior sampling or reference-base ratio approach will be used. |
is.winsor |
a logical value indicating whether winsorization should be performed to replace outliers. The default is TRUE. |
outlier.pct |
the expected percentage of outliers. These outliers will be winsorized. The default is 0.03. For count/proportion data,
|
winsor.end |
a character indicating whether the outliers at the "top", "bottom" or "both" will be winsorized.
The default is "top". If the |
is.post.sample |
a logical value indicating whether to perform posterior sampling of the underlying proportions. Only relevant when the feature data are counts. |
post.sample.no |
the number of posterior samples if posterior sampling is used. The default is 25. |
perm.no |
the number of permutations. If the raw p values are of the major interest, set |
link.func |
a list of transformation functions for the feature data or the ratios. Based on our experience, square-root transformation is a robust choice for many datasets. |
ref.pct |
percentage of reference taxa. The default is 0.5. |
stage.no |
the number of stages if multiple-stage normalization is used. The default is 6. |
excl.pct |
the maximum percentage of significant features (nominal p-value < 0.05) in the reference set that should be removed. Only relevant when multiple-stage normalization is used. |
verbose |
an optional logical value. If |
A list object containing the matrix of p-values 'pValMat', a matrix of summary statistics for each tag 'statInfo', and a suggested 'name' of the final object considering the parameters passed to the function.
ZicoSeq
.
set.seed(1)
# Create a very simple phyloseq object
counts <- matrix(rnbinom(n = 600, size = 3, prob = 0.5), nrow = 100,
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_ZicoSeq(object = ps, feature.dat.type = "count",
contrast = c("group", "B", "A"), is.winsor = TRUE, winsor.end = "top",
is.post.sample = FALSE, verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.