MatCorPlot: Microbial matel text and env correcton with the plot to...

View source: R/MatCorPlot.R

MatCorPlotR Documentation

Microbial matel text and env correcton with the plot to showing,from science peper.

Description

Microbial matel text and env correcton with the plot to showing,from science peper.

Usage

MatCorPlot(
  env.dat,
  tabOTU,
  distance = "bray",
  method = "metal",
  method.cor = "spearman",
  cor.p = 0.05,
  x = TRUE,
  y = TRUE,
  diag = T,
  sig = TRUE,
  siglabel = FALSE,
  shownum = TRUE,
  numpoint = 22,
  numpoint2 = 21,
  numsymbol = NULL,
  curvature = 0.2,
  lacx = "left",
  lacy = "bottom",
  range = 0.5,
  p.thur = 0.3,
  onlysig = TRUE
)

Arguments

env.dat

env table

tabOTU

OTU table conbined with list

distance

The defult, distance = "bray", method of microbiota distance

method

method for matel test

x

x axis label

y

y axis label

diag

diag label

sig

if show only sig value

siglabel

R2 value

numpoint

point type 22

numpoint2

point type 21

numsymbol

point adding e.g. 27

lacx

location of x axis

lacy

location of y axis

range

curve size

p.thur

sig value

onlysig

T or F

p.threshold

The defult, p.threshold=0.05, it represents significance threshold below 0.05.

fill

fill coulor of node

Value

ggplot object

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

data(ps)
library(phyloseq)
library(tidyverse)
ps1 = filter_taxa(ps, function(x) sum(x ) > 200 , TRUE);ps1
otu = as.data.frame(t(vegan_otu(ps1)))
mapping = as.data.frame( sample_data(ps1))
tabOTU1 = list(otu1 = otu,otu2 = otu,otu3 = otu)
data(env1)
MatCorPlot(
  env.dat = env1,
 tabOTU = tabOTU1,
  distance = "bray",
  method = "metal",
  x = F,
  y = F,
  diag = T,
  sig = TRUE,
  siglabel = FALSE,
  shownum = TRUE,
  numpoint = NULL,
  numsymbol = 27,
  lacx = "left",
  lacy = "bottom",
  range = 0.5,
  p.thur = 0.3,
  onlysig = F
)

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