View source: R/plot_functions.R
sankey_pq | R Documentation |
phyloseq-class
objectsankey_pq(
physeq = NULL,
fact = NULL,
taxa = 1:4,
add_nb_seq = FALSE,
min_prop_tax = 0,
tax2remove = NULL,
units = NULL,
symbol2sub = c("\\.", "-"),
...
)
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
|
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
Adrien Taudière
sankeyNetwork
, ggaluv_pq()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.