network_data: Creates data describing a gene regulatory network

View source: R/fct_network_inference.R

network_dataR Documentation

Creates data describing a gene regulatory network

Description

Creates dataframe that describe the network compatible with visNetwork, from an igraph object. The degree and community of each node are computed. Communities are defined by the louvain algorithm, that maximizes local modularity. A type is assigned to each gene, either a regulator or a target gene.

Usage

network_data(graph, regulators, gene_info = NULL)

Arguments

graph

igraph object, as returned by DIANE::network_thresholding(), or DIANE::network_from_tests().

regulators

list of regulators, so they can be marked as special nodes in the network

gene_info

dataframe with gene IDs as rownames, containing additional info on genes, in columns named label and description. For known organisms, it can be obtained from DIANE::get_gene_information()

Value

Named list of dataframes containing nodes and edges information.

Examples

## Not run: 
data("abiotic_stresses")
data("regulators_per_organism")
genes <- get_locus(abiotic_stresses$heat_DEGs)
# mat was inferred using the function network_inference
mat <- abiotic_stresses$heat_DEGs_regulatory_links
network <- DIANE::network_thresholding(mat, n_edges = length(genes))
data <- network_data(network, regulators_per_organism[["Arabidopsis thaliana"]])

## End(Not run)

OceaneCsn/DIANE documentation built on Jan. 10, 2024, 6:43 p.m.