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.
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.URL: https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/Consensus-NetworkConstruction-man.pdf
Section 2.a.7, Page 9,
Here, code merges modules that have close/similar expression values at a height of 0.25 (in dendrogram, Fig. 4) are merged.
After you run these:
,,,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: