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
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?