This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Module merging WGCNA

Hello all,

I'm interested to perform gene co-expression using WGCNA R module. I clean data for samples and remove genes that don't form any cluster. Post cleaning I perform clustering to identify different modules (40 excluding grey). Each module consist different number of genes, I generate list of genes in a output text file.
Next, I merge module that are highly similar and left with 20 modules. Further, I perform regression to identify module significant to the trait. I see the P-value and module name, which is OK.

I'm unable to move forward here with two things:

1- I don't know which modules were merged with what. Initial module clustering and gene list isn't helpful after module merging.
2. I'd like to have gene names binned in newly merged modules.

How do I make my way with these two points?

Thanks.

wgcna microarray expression

1 answer

Hey, you should check the output of each and every command that you have used so that you can understand how the program's functions behave. Then, you may find the answer to your question(s).

I'm working step by step, looking into function parameters and reading explanations provided on the tutorial. After rummaging and lost I've posted my query. I can share code and comments if needed to show my inputs.

https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/

http://systemsbio.ucsd.edu/WGCNAdemo/

http://pklab.med.harvard.edu/scw2014/WGCNA.html

The first URL has work flow; I've gone through different PDFs individually (not blindly/naively).

Thank you.

Thank you. Relating to your 2 questions, can you show the lines of code from the tutorials to which your questions relate? It can help to use the str() function on objects so that you can see all information that is held within them.

After you run these:

# Numeric module labels
moduleLabels = merge$colors

# Convert labels to colors
moduleColors = labels2colors(moduleLabels)

,,,the colour vector, moduleColors, has the same order as your genes (or samples, if you are doing WGCNA sample-wise).

To see which modules have been merged, run:

cbind(unmergedColors, moduleColors)

Log in to answer this question.