::opts_chunk$set(echo = TRUE, warning=FALSE, collapse = TRUE) knitr
for (i in 1:length(params))
print(paste('Parameter:', names(params)[i], ' - Value:', params[[i]], '- Class:', class(params[[i]])))
## [1] "Parameter: Dataset - Value: CTL04 - Class: character"
## [1] "Parameter: OutputFolder - Value: ~/DataDir/bulkRNASeq/8.WGCNA/CTL04/2_ModuleCharacterization/ - Class: character"
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
library(DT)
library(viridis)
## Loading required package: viridisLite
library(sechm)
library(WGCNA)
## Loading required package: dynamicTreeCut
## Loading required package: fastcluster
##
## Attaching package: 'fastcluster'
## The following object is masked from 'package:stats':
##
## hclust
##
##
## Attaching package: 'WGCNA'
## The following object is masked from 'package:stats':
##
## cor
library(SummarizedExperiment)
## Loading required package: MatrixGenerics
## Loading required package: matrixStats
##
## Attaching package: 'matrixStats'
## The following object is masked from 'package:dplyr':
##
## count
##
## Attaching package: 'MatrixGenerics'
## The following objects are masked from 'package:matrixStats':
##
## colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
## colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
## colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
## colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
## colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
## colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
## colWeightedMeans, colWeightedMedians, colWeightedSds,
## colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
## rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
## rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
## rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
## rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
## rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
## rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
## rowWeightedSds, rowWeightedVars
## Loading required package: GenomicRanges
## Loading required package: stats4
## Loading required package: BiocGenerics
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:dplyr':
##
## combine, intersect, setdiff, union
## The following objects are masked from 'package:stats':
##
## IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
##
## anyDuplicated, aperm, append, as.data.frame, basename, cbind,
## colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
## get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
## match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
## Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
## table, tapply, union, unique, unsplit, which.max, which.min
## Loading required package: S4Vectors
##
## Attaching package: 'S4Vectors'
## The following objects are masked from 'package:dplyr':
##
## first, rename
## The following objects are masked from 'package:base':
##
## expand.grid, I, unname
## Loading required package: IRanges
##
## Attaching package: 'IRanges'
## The following objects are masked from 'package:dplyr':
##
## collapse, desc, slice
## Loading required package: GenomeInfoDb
## Loading required package: Biobase
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
##
## Attaching package: 'Biobase'
## The following object is masked from 'package:MatrixGenerics':
##
## rowMedians
## The following objects are masked from 'package:matrixStats':
##
## anyMissing, rowMedians
<- params$Dataset
Dataset <- params$OutputFolder
OutputFolder
if (dir.exists(OutputFolder) == FALSE) {
dir.create(OutputFolder, recursive=TRUE)
}
source('WGCNAHelper.R')
load('~/DataDir/bulkRNASeq/8.WGCNA/CTL04/1_NetworkGeneration/NetworkGeneration.RData')
<- DummyTraits DummyTotal
Objects generated from first step:
metadata(SE_WGCNA)$anno_colors <- list(Condition = c('DMSO' = 'grey30', 'CTL' = 'azure3',
'AhHyd_Ag'='#F8766D', 'AhHyd_Inh'='#F8766D50',
'Andr_Ag'='#fccb17', 'Andr_Inh'='#C49A0050',
"Estr_Ag"= '#53B400', "Estr_Inh"= '#53B40050',
'GC_Ag' = '#00C094', 'GC_Inh' = '#00C09450',
'LivX_Ag' = '#00B6EB', 'LivX_Inh' = '#00B6EB50',
'Ret_Ag' = '#A58AFF', 'Ret_Inh' = '#A58AFF50',
'Thyr_Ag' = '#FB61D7', 'Thyr_Inh' = '#FB61D750'
))
<- c('darkblue', "purple","white","lightgoldenrod1", 'goldenrod1')
ScaledCols <- c('darkblue', "blue","white","forestgreen", 'green') CorrCols
<- DummyTotal[,-c(1:4, 21)]
DummyTraits
<- ncol(VstSel)
nGenes <- nrow(VstSel)
nSamples
# spearman correlation
<- WGCNA::cor(FinalMEs, DummyTraits, use = 'p', method='spearman')
SpearmanCor <- WGCNA::corPvalueStudent(SpearmanCor, nSamples)
SpearmanPvalue
# pearson correlation
<- WGCNA::cor(FinalMEs, DummyTraits, use = 'p', method='pearson')
PearsonCor <- WGCNA::corPvalueStudent(PearsonCor, nSamples) PearsonPvalue
Spearman
<- paste(signif(SpearmanCor,2), '\n(', signif(SpearmanPvalue, 1), ')', sep = '')
textMatrix dim(textMatrix) <- dim(SpearmanCor)
::labeledHeatmap(Matrix = SpearmanCor, xLabels=names(DummyTraits), yLabels=names(FinalMEs), ySymbols=names(FinalMEs),
WGCNAcolorLabels=FALSE, colors=viridis(50)[15:50], textMatrix = textMatrix, setStdMargins = FALSE,
cex.text = 0.5, zlim = c(-1,1), main = paste('Module-trait relationships'))
Pearson
<- paste(signif(PearsonCor,2), '\n(', signif(PearsonPvalue, 1), ')', sep = '')
textMatrix dim(textMatrix) <- dim(PearsonCor)
::labeledHeatmap(Matrix = PearsonCor, xLabels=names(DummyTraits), yLabels=names(FinalMEs), ySymbols=names(FinalMEs),
WGCNAcolorLabels=FALSE, colors=viridis(50)[15:50], textMatrix = textMatrix, setStdMargins = FALSE,
cex.text = 0.5, zlim = c(-1,1), main = paste('Module-trait relationships'))
<- 'turquoise'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 2404 genes: 2087 protein-coding and 317 lncRNAs (15 %) .
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
## `use_raster` is automatically set to TRUE for a matrix with more than
## 2000 rows. You can control `use_raster` argument by explicitly setting
## TRUE/FALSE to it.
##
## Set `ht_opt$message = FALSE` to turn off this message.
## 'magick' package is suggested to install to give better rasterization.
##
## Set `ht_opt$message = FALSE` to turn off this message.
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'blue'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 1308 genes: 947 protein-coding and 361 lncRNAs (38 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'green'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 906 genes: 826 protein-coding and 80 lncRNAs (10 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'brown'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 871 genes: 715 protein-coding and 156 lncRNAs (22 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'red'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 668 genes: 541 protein-coding and 127 lncRNAs (23 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'midnightblue'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 592 genes: 460 protein-coding and 132 lncRNAs (29 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'black'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 533 genes: 473 protein-coding and 60 lncRNAs (13 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'pink'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 498 genes: 436 protein-coding and 62 lncRNAs (14 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'magenta'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 470 genes: 400 protein-coding and 70 lncRNAs (18 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'purple'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 413 genes: 360 protein-coding and 53 lncRNAs (15 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'greenyellow'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 353 genes: 307 protein-coding and 46 lncRNAs (15 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'tan'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 348 genes: 297 protein-coding and 51 lncRNAs (17 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'cyan'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 312 genes: 263 protein-coding and 49 lncRNAs (19 %).
The top-250 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'grey60'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 166 genes: 144 protein-coding and 22 lncRNAs (15 %).
The top-166 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'lightgreen'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 160 genes: 126 protein-coding and 34 lncRNAs (27 %).
The top-160 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'lightyellow'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 117 genes: 103 protein-coding and 14 lncRNAs (14 %).
The top-117 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'royalblue'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 109 genes: 86 protein-coding and 23 lncRNAs (27 %).
The top-109 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
<- 'darkred'
ModName <- ifelse(dim(dplyr::filter(GeneMetrics, Module==ModName))[1] > 250, 250,
TopGenes dim(dplyr::filter(GeneMetrics, Module==ModName))[1])
The module contains 94 genes: 74 protein-coding and 20 lncRNAs (27 %).
The top-94 genes according to intramodular connectivity will be shown in interactive scatterplot and table.
boxME(METraits=METraits, module=ModName, ascisse='Condition', title=NULL,
lines='Yes', reference='DMSO')
boxMM(GeneMM=GeneMetrics, module=ModName, title=NULL)
sechm(SE_WGCNA, features=GeneMetrics[GeneMetrics$Module==ModName, ]$Gene, assayName="vst", gaps_at="Condition",
top_annotation='Condition', hmcols=ScaledCols, do.scale=TRUE, breaks=0.8,
anno_colors = metadata(SE_WGCNA)$anno_colors)
plotGeneMetrics(GeneMetrics, module=ModName, title=NULL, top=TopGenes)
interactiveMetrics(GeneMetrics, Module=ModName)
save(GeneMetrics, file=paste0(OutputFolder, 'GeneMetrics.RData'))
write.table(GeneMetrics, file=paste0(OutputFolder, 'GeneMetrics.txt'), sep='\t')
<- sessionInfo()
SessionInfo <- date()
Date save.image(paste0(OutputFolder, 'ModuleCharacterization.RData'))
Date## [1] "Mon Jul 21 19:40:03 2025"
SessionInfo## R version 4.2.1 (2022-06-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.4 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] SummarizedExperiment_1.28.0 Biobase_2.58.0
## [3] GenomicRanges_1.50.2 GenomeInfoDb_1.34.9
## [5] IRanges_2.32.0 S4Vectors_0.36.1
## [7] BiocGenerics_0.44.0 MatrixGenerics_1.10.0
## [9] matrixStats_0.63.0 WGCNA_1.72-1
## [11] fastcluster_1.2.3 dynamicTreeCut_1.63-1
## [13] sechm_1.6.0 viridis_0.6.2
## [15] viridisLite_0.4.1 DT_0.27
## [17] ggplot2_3.4.1 dplyr_1.1.0
##
## loaded via a namespace (and not attached):
## [1] Rtsne_0.16 colorspace_2.1-0 rjson_0.2.21
## [4] deldir_1.0-6 ellipsis_0.3.2 circlize_0.4.15
## [7] htmlTable_2.4.1 XVector_0.38.0 GlobalOptions_0.1.2
## [10] base64enc_0.1-3 clue_0.3-64 rstudioapi_0.14
## [13] farver_2.1.1 bit64_4.0.5 AnnotationDbi_1.60.0
## [16] fansi_1.0.4 codetools_0.2-19 splines_4.2.1
## [19] doParallel_1.0.17 impute_1.72.3 cachem_1.0.7
## [22] knitr_1.42 Formula_1.2-5 jsonlite_1.8.4
## [25] cluster_2.1.4 GO.db_3.16.0 png_0.1-8
## [28] compiler_4.2.1 httr_1.4.5 backports_1.4.1
## [31] lazyeval_0.2.2 Matrix_1.5-3 fastmap_1.1.1
## [34] cli_3.6.1 htmltools_0.5.4 tools_4.2.1
## [37] gtable_0.3.1 glue_1.6.2 GenomeInfoDbData_1.2.9
## [40] V8_4.2.2 Rcpp_1.0.10 jquerylib_0.1.4
## [43] vctrs_0.6.2 Biostrings_2.66.0 preprocessCore_1.60.2
## [46] crosstalk_1.2.0 iterators_1.0.14 xfun_0.37
## [49] stringr_1.5.0 lifecycle_1.0.3 ca_0.71.1
## [52] zlibbioc_1.44.0 scales_1.2.1 TSP_1.2-2
## [55] parallel_4.2.1 RColorBrewer_1.1-3 ComplexHeatmap_2.14.0
## [58] yaml_2.3.7 curl_5.0.0 memoise_2.0.1
## [61] gridExtra_2.3 sass_0.4.5 rpart_4.1.19
## [64] latticeExtra_0.6-30 stringi_1.7.12 RSQLite_2.3.0
## [67] highr_0.10 randomcoloR_1.1.0.1 foreach_1.5.2
## [70] checkmate_2.1.0 seriation_1.4.1 shape_1.4.6
## [73] rlang_1.1.1 pkgconfig_2.0.3 bitops_1.0-7
## [76] evaluate_0.20 lattice_0.20-45 purrr_1.0.1
## [79] labeling_0.4.2 htmlwidgets_1.6.1 bit_4.0.5
## [82] tidyselect_1.2.0 magrittr_2.0.3 R6_2.5.1
## [85] generics_0.1.3 Hmisc_4.8-0 DelayedArray_0.24.0
## [88] DBI_1.1.3 pillar_1.8.1 foreign_0.8-84
## [91] withr_2.5.0 survival_3.5-3 KEGGREST_1.38.0
## [94] RCurl_1.98-1.10 nnet_7.3-18 tibble_3.2.1
## [97] crayon_1.5.2 interp_1.1-3 utf8_1.2.3
## [100] plotly_4.10.1 rmarkdown_2.20 jpeg_0.1-10
## [103] GetoptLong_1.0.5 grid_4.2.1 data.table_1.14.8
## [106] blob_1.2.3 digest_0.6.31 tidyr_1.3.0
## [109] munsell_0.5.0 registry_0.5-1 bslib_0.4.2