Dear everyone,

I am trying to build and evaluate co-expression networks based on RNA-seq data. Co-expression networks are built by first providing a gene-expression matrix, where each row is a gene and each column is a sample and, or treatment. Thus each cell in the matrix shows an expression value of a gene in a sample/treatment. Then these expression values are correlated, resulting in a pairwise correlation matrix, where each gene is correlated to each gene. This correlation matrix is then transformed into an adjacency matrix, resulting in a matrix showing the weighted relationships between genes as values between 0 and 1.

Using the **EGAD R-package** (see Resources below) one can create and evaluate such co-expression networks.

## Problem

To evaluate a co-expression network, one has to generate a binary annotation matrix. Such a matrix has genes as rows and annotations (e.g. GO-terms) as columns and each cell has either the value 1, or 0, indicating whether the gene belongs to the annotation, or not.
The problem is to generate this annotation matrix, one has to provide a 2-column interaction-matrix where each row represents one gene-gene interaction.
For the examples in the EGAD user guide (see resources below), such an interaction-matrix is provided. But it is **not explained how to generate such a matrix for co-expression networks, where interactions are not binary, but weighted**.
What one could do is to threshold the adjacency matrix and create a binary network from the co-expression network, i.e. defining all interactions with weight >= 0.7 as real connections (binary = 1) and everything with weight < 0.7 as no connection (binary = 0). But that seems to bias the entire analysis towards setting this threshold.

## Question

How does one get a 2-column gene-interaction matrix from a **co-expression network** required as input for the "make_annotations()"-function?

## Resources

EGAD R-package (https://www.bioconductor.org/packages/release/bioc/html/EGAD.html) Paper by Ballouz et al. (2016, doi: 10.1093/bioinformatics/btw695) EGAD user guide (https://www.bioconductor.org/packages/release/bioc/vignettes/EGAD/inst/doc/EGAD.pdf)

Hello, have you had any luck? I'm also using WGCNA to make co-expression networks, and would like to try the EGAD package to test which tweaks "improve" my networks.

Two possible workarounds I'm thinking are:

Setting as "connection" any two genes belonging to the same module.

Setting adjacency=0 (zero) any two genes

NOTbelonging to the same module, while leaving theintramodularnon-binary adjacencies.Thanks in advance.