% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_graph_from_adj_mat.R
\name{build_graph_from_adj_mat}
\alias{build_graph_from_adj_mat}
\title{Build a correlation-based network from a adjacency matrix}
\usage{
build_graph_from_adj_mat(
  adjacency_matrix,
  module.method = c("Fast_greedy", "Walktrap", "Edge_betweenness", "Spinglass"),
  node_annotation = NULL,
  top_modules = 15,
  seed = 1115
)
}
\arguments{
\item{adjacency_matrix}{Numeric matrix.
A numeric matrix with adjacency matrix.}

\item{module.method}{Character.
Network community detection (module identification) method.
Options include "Fast_greedy", "Walktrap", "Edge_betweenness", and "Spinglass".}

\item{node_annotation}{Data frame.
Optional node annotation table, containing metadata such as taxonomy or functional categories.}

\item{top_modules}{Integer.
Number of top-ranked modules to retain for downstream visualization or analysis.}

\item{seed}{Integer (default = 1115).
Random seed for reproducibility.}
}
\value{
A graph object representing the correlation-based microbial network.
Node/edge attributes include correlation statistics and (optionally) module labels.
}
\description{
Build a correlation-based network from a adjacency matrix
}
\examples{
data(adjacency_matrix_example)
set.seed(1)
idx <- sample(ncol(adjacency_matrix_example), 80)
adj <- adjacency_matrix_example[idx, idx]
obj <- build_graph_from_adj_mat(
  adjacency_matrix = adj,
  module.method    = "Fast_greedy",
  top_modules      = 5
)
obj
}
