runSplits | R Documentation |
Run the differential abundance detection methods on split datasets.
runSplits(
split_list,
method_list,
normalization_list,
object,
assay_name = "counts",
min_counts = 0,
min_samples = 0,
verbose = TRUE,
BPPARAM = BiocParallel::SerialParam()
)
split_list |
A list of 2 |
method_list |
a list object containing the methods and their parameters. |
normalization_list |
a list object containing the normalization method
names and their parameters produced by |
object |
a phyloseq object. |
assay_name |
the name of the assay to extract from the
TreeSummarizedExperiment object (default |
min_counts |
Parameter to filter taxa. Set this number to keep features
with more than |
min_samples |
Parameter to filter taxa. Set this number to keep
features with a |
verbose |
an optional logical value. If |
BPPARAM |
An optional |
A named list containing the results for each method.
data(ps_plaque_16S)
# Balanced design
my_splits <- createSplits(
object = ps_plaque_16S, varName = "HMP_BODY_SUBSITE", balanced = TRUE,
paired = "RSID", N = 10 # N = 100 suggested
)
# Make sure the subject ID variable is a factor
phyloseq::sample_data(ps_plaque_16S)[, "RSID"] <- as.factor(
phyloseq::sample_data(ps_plaque_16S)[["RSID"]])
# Initialize some limma based methods
my_limma <- set_limma(design = ~ RSID + HMP_BODY_SUBSITE,
coef = "HMP_BODY_SUBSITESupragingival Plaque",
norm = c("TMM", "CSS"))
# Set the normalization methods according to the DA methods
my_norm <- setNormalizations(fun = c("norm_edgeR", "norm_CSS"),
method = c("TMM", "CSS"))
# Run methods on split datasets
results <- runSplits(split_list = my_splits, method_list = my_limma,
normalization_list = my_norm, object = ps_plaque_16S)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.