Description Usage Arguments Value Examples
Perform Kruskal-Wallis test on individual taxa in a phylseq object.
If block
is specified, then it is used as a blocking factor.
If block
is NULL, then standard Kruskal-Wallis test is applied.
1 2 | test_differential_abundance_Kruskal(physeq, group, compare = NULL,
block = NULL, p.adjust.method = "fdr")
|
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. |
Returns a list containing the following:
table
: data frame containing the prevalence test results, with the following columns:
Taxon, H, pvalue, padj, Significance, tax_table(phyloseq)
.
test_name
: Name of test used - in this case "Kruskal-Wallis 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_abundance_Kruskal(physeq, group = "Diet", block = "Gender")
# If there are multiple levels for \code{Diet}
res <- test_differential_abundance_Kruskal(physeq, group = "Diet", compare=c("Control", "High_Fat"), block = "Gender")
res <- test_differential_abundance_Kruskal(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.