sankey_pq {MiscMetabar} | R Documentation |
Sankey plot of phyloseq-class
object
Description
Usage
sankey_pq(
physeq = NULL,
fact = NULL,
taxa = 1:4,
add_nb_seq = FALSE,
min_prop_tax = 0,
tax2remove = NULL,
units = NULL,
symbol2sub = c("\\.", "-"),
...
)
Arguments
physeq |
(required): a |
fact |
Name of the factor to cluster samples by modalities.
Need to be in |
taxa |
a vector of taxonomic rank to plot |
add_nb_seq |
Represent the number of sequences or the number of OTUs (add_nb_seq = FALSE). Note that plotting the number of sequences is slower. |
min_prop_tax |
(default: 0) The minimum proportion for taxon to be plotted. EXPERIMENTAL. For the moment each links below the min.prop. tax is discard from the sankey network resulting in sometimes weird plot. |
tax2remove |
a vector of taxonomic groups to remove from the analysis
(e.g. |
units |
character string describing physical units (if any) for Value |
symbol2sub |
(default: c('\.', '-')) vector of symbol to delete in the taxonomy |
... |
Additional arguments passed on to
|
Value
A sankeyNetwork
plot representing the
taxonomic distribution of OTUs or sequences. If fact
is set,
represent the distribution of the last taxonomic level in the modalities
of fact
Author(s)
Adrien Taudière
See Also
Examples
data("GlobalPatterns", package = "phyloseq")
GP <- subset_taxa(GlobalPatterns, GlobalPatterns@tax_table[, 1] == "Archaea")
if (requireNamespace("networkD3")) {
sankey_pq(GP, fact = "SampleType")
}
if (requireNamespace("networkD3")) {
sankey_pq(GP, taxa = 1:4, min_prop_tax = 0.01)
sankey_pq(GP, taxa = 1:4, min_prop_tax = 0.01, add_nb_seq = TRUE)
}