Description Usage Arguments Value Examples
Perform differential prevalence test on individual taxa in a phylseq object.
If block
is specified, then Cochran-Mantel-Haenszel test is used.
If block
is NULL, then Fisher's exact test is used.
1 2 | test_differential_prevalence(physeq, group, compare = NULL, block = NULL,
p.adjust.method = "fdr", minCount = 0L)
|
physeq |
Phyloseq object. |
group |
Name of column in sample metadata to perform group-wise comparisons on. |
compare |
List of 2 groups to be compared, which are present in the |
block |
Name of column in sample metadata to control for the group-wise comparisons. |
p.adjust.method |
Method for adjusting P-values for multiple hypothesis testing. |
minCount |
Minimal threshold for a taxon to be considered present in a sample.
Note: the check is |
Returns a list containing the following:
table
: data frame containing the prevalence test results, with the following columns:
Taxon, pvalue, Direction, OR, OR_lb, OR_ub, padj, Significance, tax_table(phyloseq)
.
OR_lb
and OR_ub
represent 95-percent confidence intervals for odds-ratio (OR).
test_name
: Name of test used - one of c("Fisher's exact test", "Cochran-Mantel-Haenszel test")
.
block
: Name of variable used as blocking factor.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# If there are only 2 levels for \code{Diet}
res <- test_differential_prevalence(physeq, group = "Diet", block = "Gender")
# If there are multiple levels for \code{Diet}
res <- test_differential_prevalence(physeq, group = "Diet", compare=c("Control", "High_Fat"), block = "Gender")
res <- test_differential_prevalence(physeq, group = "Diet", compare=c("Control", "High_Fibre"), block = "Gender")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.