ggflower: Use microbiome data to map petals

View source: R/ggflowerplot.R

ggflowerR Documentation

Use microbiome data to map petals

Description

Use microbiome data to map petals

Usage

ggflower(
  otu = NULL,
  tax = NULL,
  map = NULL,
  ps = NULL,
  group = "Group",
  rep = 6,
  m1 = 2,
  start = 1,
  a = 0.2,
  b = 1,
  lab.leaf = 1,
  col.cir = "yellow",
  a.cir = 0.5,
  b.cir = 0.5,
  m1.cir = 2
)

Arguments

otu

otu table of microbiome. data.frame

tax

taxonmy table of microbiome. data.frame

map

table.data.frame

ps

phyloseq Object, contains OTU tables, tax table and map table, represented sequences,phylogenetic tree.

group

colnames which selected for show

rep

repeat number of microbial data.

m1

Petal shape, square to round to prismatic, the value gradually decreases

start

The rotation angle of the petals, the greater the value, the greater the angle

a

The width of the petals

b

Distance from petal to center

lab.leaf

The distance from the label to the center of the circle

col.cir

Center color

Value

ggplot objects

Author(s)

Contact: Tao Wen 2018203048@njau.edu.cn Jun Yuan junyuan@njau.edu.cn Penghao Xie 2019103106@njau.edu.cn

References

Yuan J, Zhao J, Wen T, Zhao M, Li R, Goossens P, Huang Q, Bai Y, Vivanco JM, Kowalchuk GA, Berendsen RL, Shen Q Root exudates drive the soil-borne legacy of aboveground pathogen infection Microbiome 2018,DOI: doi: 10.1186/s40168-018-0537-x

Examples

library(phyloseq)
library(ggplot2)
data(ps)

map = as.data.frame(sample_data(ps))
map$Group1 <- c("A","B","C","D","E","F ")
sample_data(ps) = map

p <- ggflower(ps = ps,
              rep = 3,
              group = "Group1",
              start = 1,
              m1 = 2,
              a = 0.3,
              b = 0.3,
              lab.leaf = 1,
              col.cir = "yellow",
              b.cir = 0.8,
              a.cir = 0.8
)
p2 <- p + scale_fill_brewer(palette = "Paired")
p2
p <- ggflower(ps = ps,
              rep = 3,
              group = "Group1",
              start = 1,
              m1 = 1,
              a = 0.3,
              b = 1,
              lab.leaf = 1,
              col.cir = "yellow"
)
p3 <- p + scale_fill_brewer(palette = "Paired")

p3
p5 <- ggflower(ps = ps,
               rep = 3,
               group = "Group1",
               start = 1,
               m1 = 2,
               a = 0.2,
               b = 1,
               lab.leaf = 1,
               col.cir = "yellow"
)
p5

p <- ggflower(ps = ps,
              rep = 3,
              group = "Group1",
              start = 30,
              m1 = 2,
              a = 0.2,
              b = 1,
              lab.leaf = 1,
              col.cir = "yellow"
)
p1 <- p + scale_fill_brewer(palette = "Paired")

p1

taowenmicro/ggClusterNet documentation built on March 29, 2024, 1:32 a.m.