corMicro: Correlation network calculation of microbial community data

View source: R/corMicro.R

corMicroR Documentation

Correlation network calculation of microbial community data

Description

Correlation network calculation of microbial community data

Usage

corMicro(
  ps = ps,
  N = 0,
  r.threshold = 0.6,
  method.scale = "rela",
  p.threshold = 0.05,
  method = "pearson",
  R = 10,
  ncpus = 1
)

Arguments

ps

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

N

filter OTU tables by abundance.The defult, N=0, extract the top N number relative abundance of OTU.

r.threshold

The defult, r.threshold=0.6, it represents the correlation that the absolute value of the correlation threshold is greater than 0.6. the value range of correlation threshold from 0 to 1.

method.scale

sacleing method for microbiome data, rela, log,TMM,RLC···

p.threshold

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

method

method for Correlation calculation,method="pearson" is the default value. The alternatives to be passed to cor are "spearman" and "kendall". recentliy "sparcc" added to method

R

number of repeats for sparcc p value

ncpus

number of cpu for sparcc calculate p value

Value

list which contains OTU correlation matrix

Author(s)

Contact: Tao Wen taowen@njau.edu.cn Penghao Xie 2019103106@njau.edu.cn yongxin liu yxliu@genetics.ac.cn Jun Yuan junyuan@njau.edu.cn

References

Tao Wen#, Penghao Xie#, Shengdie Yang, Guoqing Niu, Xiaoyu Liu, Zhexu Ding, Chao Xue, Yong-Xin Liu *, Qirong Shen, Jun Yuan* ggClusterNet: an R package for microbiome network analysis and modularity-based multiple network layouts iMeta 2022,DOI: doi: 10.1002/imt2.32

Examples

data(ps)
result <- corMicro(ps = ps,N = 100,r.threshold=0.6,p.threshold=0.05,method = "pearson")
# extract cor matrix
cor = result[[1]]

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