graph_test_pq {MiscMetabar} | R Documentation |
Performs graph-based permutation tests on phyloseq object
Description
A wrapper of phyloseqGraphTest::graph_perm_test()
for quick plot with
important statistics
Usage
graph_test_pq(
physeq,
fact,
merge_sample_by = NULL,
nperm = 999,
return_plot = TRUE,
title = "Graph Test",
na_remove = FALSE,
...
)
Arguments
physeq |
(required): a |
fact |
(required) Name of the factor to cluster samples by modalities.
Need to be in |
merge_sample_by |
a vector to determine
which samples to merge using |
nperm |
(int) The number of permutations to perform. |
return_plot |
(logical) Do we return only the result of the test or do we plot the result? |
title |
The title of the Graph. |
na_remove |
(logical, default FALSE) If set to TRUE, remove samples with NA in the variables set in formula. |
... |
Other params for be passed on to
|
Details
This function is mainly a wrapper of the work of others.
Please cite phyloseqGraphTest
package.
Value
A ggplot
2 plot with a subtitle indicating the pvalue
and the number of permutations
Author(s)
Adrien Taudière
Examples
if (requireNamespace("phyloseqGraphTest")) {
data(enterotype)
graph_test_pq(enterotype, fact = "SeqTech")
graph_test_pq(enterotype, fact = "Enterotype", na_remove = TRUE)
}