extract_edges {GNET2} | R Documentation

## Extract the network from the gnet result

### Description

Extract the network as edge list from the gnet result. For a module, each regulator and downstream gene will form a directed edge.

### Usage

    extract_edges(gnet_result)

### Arguments

`gnet_result` | Returned results from gnet().

### Value

A three column edge list from the gnet result.The third column are the sum of scores of any groups with the regulator-target interaction.

### Examples

    set.seed(1)
    init_group_num = 8
    init_method = 'kmeans'
    exp_data <- matrix(rnorm(50*10),50,10)
    reg_names <- paste0('TF',1:5)
    rownames(exp_data) <- c(reg_names,paste0('gene',1:(nrow(exp_data)-length(reg_names))))
    colnames(exp_data) <- paste0('condition_',1:ncol(exp_data))
    se <- SummarizedExperiment::SummarizedExperiment(assays=list(counts=exp_data))
    gnet_result <- gnet(se,reg_names,init_method,init_group_num)
    edge_list <- extract_edges(gnet_result)

[Package GNET2 version 1.3.9 Index]