Hello everyone, I'm new to WGCNA analysis... I'm trying to carry out one by using WGCNA Bioconductor Package. Being a newbie, I'm sticking to the official tutorial. In the Section 4 of the Tutorial it's explained how to create a heatmap correlating the previously obtained modules with sample quantitative traits (such as, for instance, phenotypical, measurable traits), as shown below:
However, I'd need a heatmap showing the correlations between the previously obtained modules and sample conditions instead. This will significantly help me to pick the most significant modules and further analyze them in Cytoscape, highlighting how they correlate with my experimental conditions immediately (for instance, the red module has a positive correlation with samples injected with the pathogen, the purple one with samples collected from root... and so on). The heatmap would look similar to this one (however, here the correlation is between modules and samples, not between modules and samples clustered by condition...from this other tutorial.
Any suggestions about how to create this kind of heatmap?
Thanks in advance for your help, have a nice day.
Hi, thank you for the (very quick!) answer. The official tutorial (first heatmap shown here) adopted labeledHeatmap. The second plot was created through ggplot.
Do you have a pheatmap usage example in a WGCNA context?
Hi again, no, I typically just create what I need.
In one of the WGCNA output files, you should have an object containing a list of all the sample IDs, then the cluster score for each. However this is formatted at present, you want to reformat it such that it is a matrix with row names being the gene module names and column names being the sample IDs. It's pretty likely that whatever output file you have is pretty close to that already. If not, paste the format of the output you do have as well as the format for the metadata you need in your original post and wee can go from there.
Hi LauferVA
this is what i got as one ouput
another output is where i got (i guess) the correlation / cluster score of these in each sample
Also i have a sheet where the categorization is listed of my samples
I tried this pheatmap:
Why don't i see a single gene cluster (module) to be correlated positively or negatively for at least one group?? (ALSO I HAVE 45 IN MILD, 46 IN MODERATE AND 21 IN SEVERE, SO ISN'T IT SENSIBLE TO SEE CORRELATION OF MODULES IN ALL SAMPLES OF EITHER GROUP)
Hi
Also if anyone can comment on how can we have a heatmap of genes vs sample_conditions like in above query (gene names vs groups: mild, moderate and severe)
Thanks