View source: R/plot_functions.R
plot_tax_pq | R Documentation |
An alternative to phyloseq::plot_bar()
function.
plot_tax_pq(
physeq,
fact = NULL,
merge_sample_by = NULL,
type = "nb_seq",
taxa_fill = "Order",
print_values = TRUE,
color_border = "lightgrey",
linewidth = 0.1,
prop_print_value = 0.01,
nb_print_value = NULL,
add_info = TRUE,
na_remove = TRUE,
clean_pq = TRUE
)
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 the
|
type |
If "nb_seq" (default), the number of sequences is used in plot. If "nb_taxa", the number of ASV is plotted. If both, return a list of two plots, one for nbSeq and one for ASV. |
taxa_fill |
(default: 'Order'): Name of the taxonomic rank of interest |
print_values |
(logical, default TRUE): Do we print some values on plot? |
color_border |
color for the border |
linewidth |
The line width of geom_bar |
prop_print_value |
minimal proportion to print value (default 0.01) |
nb_print_value |
number of higher values to print (replace prop_print_value if both are set). |
add_info |
(logical, default TRUE) Do we add title and subtitle with information about the total number of sequences and the number of samples per modality. |
na_remove |
(logical, default TRUE) if TRUE remove all the samples
with NA in the |
clean_pq |
(logical) If set to TRUE, empty samples are discarded after subsetting ASV |
A ggplot2 graphic
Adrien Taudière
tax_bar_pq()
and multitax_bar_pq()
data(data_fungi_sp_known)
plot_tax_pq(data_fungi_sp_known,
"Time",
merge_sample_by = "Time",
taxa_fill = "Class"
)
plot_tax_pq(data_fungi_sp_known,
"Height",
merge_sample_by = "Height",
taxa_fill = "Class",
na_remove = TRUE,
color_border = rgb(0, 0, 0, 0)
)
plot_tax_pq(data_fungi_sp_known,
"Height",
merge_sample_by = "Height",
taxa_fill = "Class",
na_remove = FALSE,
clean_pq = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.