I was analyzing three data sets using wgcna independently. Each data set gave me several modules and I want to see their overlapping. With the help of the tutorial "Consensus-RelateToFemMods", I could modify some code to generate a overlapping heatmap containing the overlapped counts and p values. But when it comes assigning highly overlapped modules in different data sets with the same color, I'm a bit confused.
I'm wondering if there is a function for this reassigning module colors according to overlapping status. If there is not, what kind of rules do I have to follow to write my own code?