phfnetworks: phfnetworks

View source: R/phfnetworks.R

phfnetworksR Documentation

phfnetworks

Description

Constructs a plot combining the phylogenetic tree, the heatmaps showing average occurrence frequency and average relative abundance of each taxa, and the co-occurrence networks from different methods.

Usage

phfnetworks(
  otu,
  taxa,
  sample,
  tree,
  functional_profile,
  propr = TRUE,
  sparcc = TRUE,
  cclasso = TRUE,
  cluster_method,
  pre_threshold,
  fdr_threshold,
  cor_threshold,
  permutation,
  nscore = "degree",
  hcol = "red",
  propr_col = "darkcyan",
  sparcc_col = "firebrick3",
  cclasso_col = "goldenrod3",
  ttip = 3,
  tlab = 2,
  hlab = 4,
  llab = 10,
  alab = 4,
  offset = 0.3,
  width = 1,
  mini_abun,
  threshold,
  sample_name,
  sample_group,
  mini_tpm,
  threshold_tpm,
  both_core_col,
  common_core_col,
  func_core_col,
  non_core_col,
  hub_col,
  non_hub_col
)

Arguments

otu

a community count data matrix with samples in rows and OTUs/taxa in column,

taxa

a taxa information matrix. The rownames must match the OTU names (taxa_names) of the otu,

sample

a sample information data.frame. The rownames must match the sample names in the otu,

tree

a phylogenetic tree. The tip labels must match the otu names in the otu,

functional_profile

a community count data matrix with samples in rows and OTUs/taxa in column,

propr

a logical value indicating whether to run propr,

sparcc

a logical value indicating whether to run sparcc,

cclasso

a logical value indicating whether to run cclasso,

cluster_method

module clustering methods, including cluster_walktrap, cluster_edge_betweenness, cluster_fast_greedy and cluster_spinglass,

pre_threshold

occurrence frequency,

fdr_threshold

fdr threshold,

cor_threshold

association threshold,

permutation

permutation number of the association methods,

nscore

the node-level property (degree, betweenness and closeness),

hcol

the color of heatmap,

propr_col

the color of the properties of propr network,

sparcc_col

the color of the properties of sparcc network,

cclasso_col

the color of the properties of cclasso network,

ttip

the node size of the tree,

tlab

the font size of the tree tip label,

hlab

the font size of the heatmap label,

llab

the font size of the legend label,

alab

the font size of the title,

offset

the offset between each subfigure,

width

the width of each heatmap cell,

mini_abun

a value indicating whether the otu is present,

threshold

a value indicating the final percent increase in beta-diversity,

sample_name

the name of a column that containing the sample name,

sample_group

the name of a column that containing the sample type/group,

mini_tpm

a value indicating whether the function is present,

threshold_tpm

a value indicating the final percent increase in beta-diversity,

both_core_col

the color of the both-core nodes in the tree

common_core_col

the color of the common-core nodes in the tree

func_core_col

the color of the functional-core nodes in the tree

non_core_col

the color of the non-core nodes in the tree

hub_col

the color of the hubs in the network

non_hub_col

the color of the non-hubs in the network

Details

Constructs a plot combining the phylogenetic tree, the heatmaps showing average occurrence frequency and average relative abundance of each taxa, and the co-occurrence networks from different methods.

Value

Combined plot showing the phylogenetic tree, the heatmap and co-occurrence networks.

Examples

 phfnetworks(otu, taxa, sample, tree, functional_profile, propr = TRUE, sparcc = TRUE, cclasso = TRUE, cluster_method="cluster_walktrap", pre_threshold, fdr_threshold, cor_threshold, permutation, nscore = 'degree', hcol = 'red', propr_col = 'darkcyan', sparcc_col = 'firebrick3', cclasso_col = 'goldenrod3', ttip = 3, tlab = 2, hlab = 4, llab = 4, offset = 0.3, width = 1, mini_abun = 0, threshold = 0.02, sample_name, sample_group, mini_tpm = 1000, threshold_tpm = 0.5, both_core_col = 'goldenrod4', common_core_col = 'deeppink4', func_core_col = '#0073C2FF', non_core_col = 'gray', non_hub_col = 'grey', hub_col = 'black')

lindan1128/coreMicrobiome documentation built on May 5, 2022, 8:24 p.m.