PerformNetworkCorrelation: Function to call for correlation network

View source: R/mdp_utils.R

PerformNetworkCorrelationR Documentation

Function to call for correlation network

Description

This function runs the fastspar or cor.test

Usage

PerformNetworkCorrelation(
  mbSetObj,
  taxrank,
  cor.method = "pearson",
  colorOpt = "expr",
  permNum = 100,
  pvalCutoff = 0.05,
  corrCutoff = 0.3,
  abundOpt = "mean",
  corr.net.name,
  plotNet = FALSE,
  netType = "static",
  netLayout = "kk",
  netTextSize = 2.5
)

Arguments

mbSetObj

Input the name of the mbSetObj.

taxrank

Character, input the taxonomic level to perform partial correlation analysis.

cor.method

Character, input the correlation method. Supported methods are pearson, spearman, kendall and sparcc.

colorOpt

Character, input what to color the nodes by. Default the nodes will be colored by their expression levels.

permNum

Numeric, input the number of permutations to perform. Default is set to 100.

pvalCutoff

Numeric, input the p-value cutoff. Default is set to 0.05.

corrCutoff

Numeric, input the correlation cutoff. Default is set to 0.3.

abundOpt

Character, default is set to "mean".

corr.net.name

Character, input the name of the plot to save.

plotNet

Boolean. Set to TRUE if you would like a network visualization outputted to your current working directory.

netLayout

Character, layout from ggraph. "kk" for the spring-based algorithm by Kamada and Kawai as default. "drl" for force directed algorithm from the DrL toolbox. "lgl" for Large Graph Layout. "fr" for force-directed of Fruchterman and Reingold.

netTextSize

Numeric, input the preferred font size to be used in the network plot.

networkType

Character, "static" to create a static image or "interactive" to create an interactive network saved as an html in your working directory.


xia-lab/MicrobiomeAnalystR documentation built on April 17, 2024, 7:45 p.m.