phyloseq_long_bargraph: Do a bar graph of top taxo_level or asvs based on the long...

Description Usage Arguments Value Examples

View source: R/phyloseq.R

Description

Plot the bar graph and returns a list with a ggplot and a df with the summary of the data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
phyloseq_long_bargraph(
  df,
  n_bars = 30,
  title = "",
  text_scaling = 0.75,
  use_asv = TRUE,
  taxo_level = species,
  taxo_level_fill = division,
  taxo_colors_fill = structure(c("green", "orange", "red", "blue", "brown"), .Names =
    c("Chlorophyta", "Cryptophyta", "Rhodophyta", "Haptophyta", "Ochrophyta"))
)

Arguments

df

Data frame obtained from a phyloseq file using the function phyloseq_transform_to_long

n_bars

numbers of bars to plot

title

Title for the treemap

text_scaling

Scaling for the text of the graph

use_asv

If TRUE use asvs, if FALSE use the taxo_level selected

taxo_level

Taxonomic level to use when use_asv = FALSE (should be between species up to class)

division_colors

Colors to be used for the different divisions

Value

Plot the bargraph Returns a list made of 2 elements

Examples

1
my_list <- phyloseq_long_asv_bargraph(phyloseq_long, title= "Antartica", n_bars=10, use_asv = FALSE, taxo_level= genus, text_scaling=1)

vaulot/dvutils documentation built on Nov. 20, 2021, 11:01 a.m.