Which module to select for Pathway analysis based on Module trait correlation and pvalue?

I have a total of 35 tumor samples classified into 4 subtypes. Subtype A, B, C, and D. I have RNAseq data. I'm interested in identifying modules related to each subtype with co-expression network analysis. I have read the WGCNA tutorial and create a trait.csv file like below:

Showing here some rows of the trait.csv file.

SamInfo <- read.csv("trait.csv")

Samples = rownames(datExpr);
traitRows = match(Samples, SamInfo$Samples); datTraits = SamInfo[traitRows, -1]; rownames(datTraits) = SamInfo[traitRows, 1]; nGenes = ncol(datExpr); #15648L nSamples = nrow(datExpr); #35L #calculate eigengenes (1st principal component) of modules MEs0 = moduleEigengenes(datExpr, dynamicColors)$eigengenes
MEs = orderMEs(MEs0)
moduleTraitCor = cor(MEs, datTraits, use = "p");
moduleTraitPvalue = corPvalueStudent(moduleTraitCor, nSamples);

#Will display correlations and their p-values
textMatrix = paste(signif(moduleTraitCor, 2), "\n(", signif(moduleTraitPvalue, 1), ")",
sep = "");
dim(textMatrix) = dim(moduleTraitCor)
par(mar = c(6, 8.5, 3, 3));

#Display the correlation values within a heatmap plot
labeledHeatmap(Matrix = moduleTraitCor, xLabels = names(datTraits),
yLabels = names(MEs), ySymbols = names(MEs), colorLabels = FALSE,
colors = blueWhiteRed(50), textMatrix = textMatrix, setStdMargins = FALSE,
cex.text = 0.5, zlim = c(-1,1), main = paste("Module-trait relationships"))


The Correlation between Subtypes and Modules Heatmap looks like below:

For functions identification (Pathway Analysis), from the above output for each subtype, should I select only the modules that were significantly positively correlated with subtypes, or Can I also use the significantly negatively correlated modules?

Is it good to use the modules that were not significant for pathway analysis?

In case if I can use positive and negative correlated modules, Can I combine those modules and use those genes for Pathway analysis?

• Thanks for the answer. One small question. Lets say from the above image, for Subtype A I have selected modules salmon, grey60, tan (negative), and midnightblue (positive) for pathway analysis. I see that salmon module is also significantly positive with Subtype C. So, then the pathways I get from salmon module are related to which subtype? – stack_learner Jun 9 '20 at 17:19
• thanq. sorry for the heatmap with correlation values modules and trait information. Have some doubt whether here MEs0 = moduleEigengenes(datExpr, ?)\$eigengenes I have to use dynamicColors which is before merging or moduleColors which is after merging. In the above image I used dynamicColors. 2) there are few modules like turquoise and blue with more than 8000 and 5000 genes. The number is huge. How do I reduce the number? – stack_learner Jun 12 '20 at 12:56