% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_graph_from_module.R
\name{build_graph_from_module}
\alias{build_graph_from_module}
\title{Build a graph object from a data frame and module Info}
\usage{
build_graph_from_module(
  df,
  node_annotation = NULL,
  directed = F,
  top_modules = 15,
  seed = 1115
)
}
\arguments{
\item{df}{Data frame.
Edge list with columns \code{from}, \code{to}, and optionally \code{weight}.
If \code{weight} is absent, an unweighted graph is constructed.}

\item{node_annotation}{Data Frame
The annotation file of nodes in network contain \code{node} and \code{Modularity}}

\item{directed}{Logical (default: \code{FALSE}).
Whether edges between nodes are directed.}

\item{top_modules}{Integer.
Number of top-ranked modules to select.}

\item{seed}{Integer (default = 1115).
Random seed for reproducibility.}
}
\value{
An graph object representing the correlation network.
Node/edge attributes include correlation statistics and (optionally) module labels.
}
\description{
Build a graph object from a data frame and module Info
}
\examples{
\dontrun{
# `node_annotation` must contain a `Modularity` column that assigns
# each node to a module.
obj <- build_graph_from_module(
  df              = edge_df,
  node_annotation = node_annotation
)
}
}
