![]() ![]() The list of ggplots produced can be arranged flexibly with the patchwork package functions. Group_by: You can group the samples on distinct plots by levels of a variable in the phyloseq object. Seriate_method specifies a seriation/ordering algorithm (default Ward hierarchical clustering with optimal leaf ordering, see seriation::list_seriation_methods()) Sample_order: Either specify a list of sample names to order manually, or the bars/samples can/will be sorted by similarity, according to a specified distance measure (default 'bray'-curtis), Įxtra arguments passed to facet_wrap() (if facet_by is not NA) (check only one sample is represented per bar!). It probably only makes sense to change this when also using facets (only really useful for limiting complexity of interactive plots Name of any ordering method suitable for distance matricesįALSE may speed up internal melting with ps_melt for large phyloseq objectsīut TRUE is required for some post-hoc plot customisation interactiveĬreates plot suitable for use with ggiraph max_taxa "identity", if you have truly quantitative microbiome profiling data seriate_method ![]() Transformation of taxa values used before ordering samples by similarity tax_transform_for_plotĭefault "compositional" draws proportions of total counts per sample,īut you could reasonably use another transformation,Į.g. Palette for taxa fill colours tax_transform_for_ordering (for no outlines set bar_outline_colour = NA) palette Width of line separating taxa and samples Line colour separating taxa and samples (use NA for no outlines) bar_outline_width (set to less than 1 to introduce gaps between samples) bar_outline_colour bar_widthĭefault 1 avoids random gapping otherwise seen with many samples The faceting will occur separately in the plot for each group. Resulting in a list of plots, one for each level of the group_by variable.įacets plots by this variable (must be categorical). ![]() Splits dataset by this variable (must be categorical) Name of variable to use for labelling samples, or "SAMPLE" for sample names group_by To calculate any distances needed for sample ordering label If TRUE, this will always use all taxa (not just the top n_taxa) Or "asis" for the current order as is returned by phyloseq::sample_names(ps) order_with_all_taxa Or any distance measure in dist_calc that doesn't require phylogenetic tree If FALSE, taxa coloured/filled as "other" remain distinct,Īnd so can have bar outlines drawn around them taxon_renamerįunction that takes taxon names and returns modified names for legend sample_order Or a vector of (all) taxa names at tax_level to set order manually merge_other Order of taxa within the bars, either a function for tax_sort (e.g. How many taxa to show distinct colours for (all others grouped into "Other") tax_order Taxonomic aggregation level (from rank_names(ps)) n_taxa ![]()
0 Comments
Leave a Reply. |