-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComethyl
376 lines (314 loc) · 19.3 KB
/
Comethyl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
#load packages
.libPaths("/share/lasallelab/programs/comethyl/R_4.1.0/rtest")
AnnotationHub::setAnnotationHubOption("CACHE", value = "/share/lasallelab/programs/comethyl/R_4.1.0/rtest")
setwd("Females_Males/Paper/V1")
library(tidyverse)
library(WGCNA)
library(comethyl)
library(Biobase)
BiocManager::install(c("plyr", "zip"))
# Set Global Options ####
options(stringsAsFactors = FALSE)
Sys.setenv(R_THREADS = 1)
disableWGCNAThreads()
# Read Bismark CpG Reports ####
colData <- openxlsx::read.xlsx("sample_info.xlsx", rowNames = TRUE)
setwd("placenta_cytosine_reports")
bs <- getCpGs(colData, file = "Paper/V1/Unfiltered_BSseq.rds")
setwd("Paper/V1")
# Examine CpG Totals at Different Cutoffs ####
CpGtotals <- getCpGtotals(bs, file = "CpG_Totals.txt")
plotCpGtotals(CpGtotals, file = "CpG_Totals.pdf")
# Filter BSobject ####
bs <- filterCpGs(bs, cov = 5, perSample = 0.80, file = "Filtered_BSseq.rds")
# Call Regions ####
regions <- getRegions(bs, file = "Unfiltered_Regions.txt")
plotRegionStats(regions, maxQuantile = 0.99, file = "Unfiltered_Region_Plots.pdf")
plotSDstats(regions, maxQuantile = 0.99, file = "Unfiltered_SD_Plots.pdf")
plotRegionStats(regions, maxQuantile = 1, file = "Unfiltered_Region_Plots_maxQuant1.pdf")
plotSDstats(regions, maxQuantile = 1, file = "Unfiltered_SD_Plots_maxQuant1.pdf")
#get coverage by sample by region to see if certain samples do not have coverage over the selected regions, leading to covMin = 0
bs <- read_rds("Filtered_BSseq.rds")
regions <- read.delim("Unfiltered_Regions.txt")
cov <- bsseq::getCoverage(bs, regions = regions[, c("chr", "start", "end")], what = "perRegionTotal")
write.table(cov, file = "Coverage.csv", sep = ",", col.names = NA)
cov_first_half <- cov[c(1:1000000),]
write.table(cov_first_half, file = "Coverage_first_half.csv", sep = ",", col.names = NA)
cov_second_half <- cov[, -c(1:1,000,000)]
write.table(cov_second_half, file = "Coverage_second_half.csv", sep = ",", col.names = NA)
#samples JLYZ0066, JLYZ0063, JLYZ0070, JLYZ0062, JLYZ0076, JLYZ0049, JLYZ0040, JLYZ0048, JLYZ0030, JLYZ0020 show 0 coverage over many unfiltered regions.
#remove these ten samples from analysis
samples_to_remove <- c("JLYZ0066", "JLYZ0063", "JLYZ0070", "JLYZ0062", "JLYZ0076", "JLYZ0049", "JLYZ0040", "JLYZ0048", "JLYZ0030", "JLYZ0020")
colData[!(row.names(colData) %in% samples_to_remove) , ]
# Read Bismark CpG Reports ####
colData <- openxlsx::read.xlsx("sample_info.xlsx", rowNames = TRUE)
setwd("/share/lasallelab/Jules/MARBLES_PCB/placenta_cytosine_reports")
bs <- getCpGs(colData, file = "/share/lasallelab/Jules/MARBLES_PCB/Females_Males/Paper/V1/Unfiltered_BSseq.rds")
setwd("/share/lasallelab/Jules/MARBLES_PCB/Females_Males/Paper/V1")
# Examine CpG Totals at Different Cutoffs ####
CpGtotals <- getCpGtotals(bs, file = "CpG_Totals.txt")
plotCpGtotals(CpGtotals, file = "CpG_Totals.pdf")
# Filter BSobject ####
bs <- filterCpGs(bs, cov = 4, perSample = 0.80, file = "Filtered_BSseq.rds")
# Call Regions ####
regions <- getRegions(bs, file = "Unfiltered_Regions.txt")
plotRegionStats(regions, maxQuantile = 0.99, file = "Unfiltered_Region_Plots.pdf")
plotSDstats(regions, maxQuantile = 0.99, file = "Unfiltered_SD_Plots.pdf")
plotRegionStats(regions, maxQuantile = 1, file = "Unfiltered_Region_Plots_maxQuant1.pdf")
plotSDstats(regions, maxQuantile = 0.99, file = "Unfiltered_SD_Plots_maxQuant1.pdf")
# Examine Region Totals at Different Cutoffs ####
regionTotals <- getRegionTotals(regions, file = "Region_Totals.txt")
plotRegionTotals(regionTotals, file = "Region_Totals.pdf")
# Filter Regions ####
regions <- filterRegions(regions, covMin = 12, methSD = 0.06,
file = "Filtered_Regions.txt")
plotRegionStats(regions, maxQuantile = 0.99, file = "Filtered_Region_Plots.pdf")
plotSDstats(regions, maxQuantile = 0.99, file = "Filtered_SD_Plots.pdf")
# Adjust Methylation Data for PCs ####
meth <- getRegionMeth(regions, bs = bs, file = "Region_Methylation.rds")
mod <- model.matrix(~1, data = pData(bs))
methAdj <- adjustRegionMeth(meth, mod = mod,
file = "Adjusted_Region_Methylation.rds")
getDendro(methAdj, distance = "euclidean") %>%
plotDendro(file = "Sample_Dendrogram.pdf", expandY = c(0.25, 0.08))
# Select Soft Power Threshold ####
sft <- getSoftPower(methAdj, corType = "pearson", file = "Soft_Power.rds")
plotSoftPower(sft, file = "Soft_Power_Plots.pdf")
# Get Comethylation Modules ####
modules <- getModules(methAdj, power = sft$powerEstimate, regions = regions,
corType = "pearson", file = "Modules.rds")
plotRegionDendro(modules, file = "Region_Dendrograms.pdf")
BED <- getModuleBED(modules$regions, file = "Modules.bed")
# Examine Correlations between Modules and Samples ####
MEs <- modules$MEs
Module_Eigennodes <- write.table(MEs, "Module_Eigennodes.csv", sep = ",", row.names = TRUE, col.names = NA)
moduleDendro <- getDendro(MEs, distance = "bicor")
plotDendro(moduleDendro, labelSize = 4, nBreaks = 5,
file = "Module_ME_Dendrogram.pdf")
moduleCor <- getCor(MEs, corType = "bicor")
plotHeatmap(moduleCor, rowDendro = moduleDendro, colDendro = moduleDendro,
file = "Module_Correlation_Heatmap.pdf")
moduleCorStats <- getMEtraitCor(MEs, colData = MEs, corType = "bicor", robustY = TRUE, file = "Module_Correlation_Stats.txt")
sampleDendro <- getDendro(MEs, transpose = TRUE, distance = "bicor")
plotDendro(sampleDendro, labelSize = 3, nBreaks = 5,
file = "Sample_ME_Dendrogram.pdf")
sampleCor <- getCor(MEs, transpose = TRUE, corType = "bicor")
plotHeatmap(sampleCor, rowDendro = sampleDendro, colDendro = sampleDendro,
file = "Sample_Correlation_Heatmap.pdf")
plotHeatmap(MEs, rowDendro = sampleDendro, colDendro = moduleDendro,
legend.title = "Module\nEigennode",
legend.position = c(0.37, 0.89), file = "Sample_ME_Heatmap.pdf")
# Test Correlations between Module Eigennodes and Sample Traits ####
MEtraitCor <- getMEtraitCor(MEs, colData = colData, corType = "bicor",
file = "ME_Trait_Correlation_Stats.txt")
traitDendro <- getCor(MEs, y = colData, corType = "bicor", robustY = FALSE) %>%
getDendro(transpose = TRUE)
plotDendro(traitDendro, labelSize = 3.5, expandY = c(0.65, 0.08),
file = "Trait_Dendrogram.pdf")
plotMEtraitCor(MEtraitCor, moduleOrder = moduleDendro$order,
traitOrder = traitDendro$order,
file = "ME_Trait_Correlation_Heatmap.pdf")
plotMEtraitCor(MEtraitCor, moduleOrder = moduleDendro$order,
traitOrder = traitDendro$order, topOnly = TRUE, label.type = "p",
label.size = 4, label.nudge_y = 0, legend.position = c(1.11, 0.795),
colColorMargins = c(-1, 4.75, 0.5, 10.1),
file = "Top_ME_Trait_Correlation_Heatmap.pdf", width = 8.5,
height = 4.25)
#order traits by categories on ME-trait heatmap
traitCategories <- list("23", "24", "18", "20", "4", "3", "26", "21", "25", "22", "1", "19", "17",
"31", "33", "32", "15", "6", "5", "7", "8", "9", "30", "16", "36", "14",
"12", "13", "10", "11", "29", "35", "34", "28", "27", "2")
traitOrderCategories <- as.numeric(traitCategories)
plotMEtraitCor(MEtraitCor, moduleOrder = moduleDendro$order,
traitOrder = traitOrderCategories,
file = "ME_Trait_Correlation_Heatmap_categorized.pdf", colColorMargins = c(-1.0,4.05,1.5,8.6))
# Explore Significant ME-Trait Correlations ####
# Plot Module Eigennodes vs Traits
plotMEtraitDot(MEs$salmon, trait = colData$DiagnosisASD,
traitCode = c("TD" = 0, "non-TD" = 1, "ASD" = 2),
colors = c("TD" = "#3366CC", "non-TD" = "#258f1a", "ASD" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Diagnosis", ylab = "Salmon Module Eigennode",
file = "salmon_ME_Diagnosis_Dotplot.pdf")
plotMEtraitDot(MEs$midnightblue, trait = colData$DiagnosisASD,
traitCode = c("TD" = 0, "non-TD" = 1, "ASD" = 2),
colors = c("TD" = "#3366CC", "non-TD" = "#258f1a", "ASD" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Diagnosis", ylab = "Midnightblue Module Eigennode",
file = "midnightblue_ME_Diagnosis_Dotplot.pdf")
plotMEtraitDot(MEs$darkturquoise, trait = colData$DiagnosisASD,
traitCode = c("TD" = 0, "non-TD" = 1, "ASD" = 2),
colors = c("TD" = "#3366CC", "non-TD" = "#258f1a", "ASD" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Diagnosis", ylab = "Darkturquoise Module Eigennode",
file = "darkturquoise_ME_Diagnosis_Dotplot.pdf")
plotMEtraitDot(MEs$tan, trait = colData$DiagnosisASD,
traitCode = c("TD" = 0, "non-TD" = 1, "ASD" = 2),
colors = c("TD" = "#3366CC", "non-TD" = "#258f1a", "ASD" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Diagnosis", ylab = "tan Module Eigennode",
file = "tan_ME_Diagnosis_Dotplot.pdf")
plotMEtraitDot(MEs$salmon, trait = colData$PrenatalVitamin,
traitCode = c("Yes" = 1, "No" = 0),
colors = c("Yes" = "#3366CC", "No" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Prenatal vitamin use in month 1", ylab = "Salmon Module Eigennode",
file = "salmon_ME_PrenatalVitamin_Dotplot.pdf")
colDataPV <- colData[-18, ]
MEsPV <- MEs[-18, ]
plotMEtraitDot(MEsPV$red, trait = colDataPV$PrenatalVitamin,
traitCode = c("No" = 0, "Yes" = 1),
colors = c("No" = "#3366CC", "Yes" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Prenatal vitamin use in month 1", ylab = "Red Module Eigennode",
file = "red_ME_PrenatalVitamin_Dotplot_no_yes.pdf")
plotMEtraitDot(MEs$red, trait = colData$PrenatalVitamin,
traitCode = c("No" = 0, "Yes" = 1),
colors = c("Yes" = "#3366CC", "No" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Prenatal vitamin use in month 1", ylab = "Red Module Eigennode",
file = "red_ME_PrenatalVitamin_Dotplot.pdf")
plotMEtraitDot(MEs$midnightblue, trait = colData$PrenatalVitamin,
traitCode = c("Yes" = 1, "No" = 0),
colors = c("Yes" = "#3366CC", "No" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Prenatal vitamin use in month 1", ylab = "Midnightblue Module Eigennode",
file = "midnightblue_ME_PrenatalVitamin_Dotplot.pdf")
plotMEtraitDot(MEs$midnightblue, trait = colData$MaternalOmega3s,
traitCode = c("High" = 1, "Low" = 0),
colors = c("High" = "#3366CC", "Low" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "PUFA", ylab = "Midnightblue Module Eigennode",
file = "midnightblue_ME_Maternal_Omega3s_Dotplot.pdf")
colDataHTN <- colData[-18, ]
MEsHTN <- MEs[-18, ]
plotMEtraitDot(MEsHTN$darkturquoise, trait = colDataHTN$ChronicHypertension,
traitCode = c("No" = 0, "Yes" = 1),
colors = c("No" = "#3366CC", "Yes" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Mom Chronic Hypertension", ylab = "Darkturquoise Module Eigennode",
file = "darkturquoise_ME_ChronicHypertension_noNA_Dotplot.pdf")
plotMEtraitDot(MEs$darkturquoise, trait = colData$ChronicHypertension,
traitCode = c("No" = 0, "Yes" = 1),
colors = c("No" = "#3366CC", "Yes" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Mom Chronic Hypertension", ylab = "Darkturquoise Module Eigennode",
file = "darkturquoise_ME_ChronicHypertension_Dotplot.pdf")
plotMEtraitDot(MEs$darkturquoise, trait = colData$DadHispanic,
traitCode = c("No" = 0, "Yes" = 1),
colors = c("No" = "#3366CC", "Yes" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Dad Hispanic", ylab = "Darkturquoise Module Eigennode",
file = "darkturquoise_ME_DadHispanic_Dotplot.pdf")
plotMEtraitDot(MEs$royalblue, trait = colData$GestationalDiabetes,
traitCode = c("No" = 0, "Yes" = 1),
colors = c("No" = "#3366CC", "Yes" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Gestational Diabetes", ylab = "RoyalBlue Module Eigennode",
file = "royalblue_ME_GestationalDiabetes_Dotplot.pdf")
plotMEtraitDot(MEs$royalblue, trait = colData$DeliveryPayer,
traitCode = c("Private" = 1, "Public" = 0),
colors = c("Private" = "#3366CC", "Public" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Delivery Payer", ylab = "RoyalBlue Module Eigennode",
file = "royalblue_ME_DeliveryPayer_Dotplot.pdf")
plotMEtraitDot(MEs$royalblue, trait = colData$MomBirthPlace,
traitCode = c("California" = 0, "Not California" = 1),
colors = c("California" = "#3366CC", "Not California" = "#FF3366"), ylim = c(-0.2, 0.2),
xlab = "Mom Birth Place", ylab = "RoyalBlue Module Eigennode",
file = "royalblue_ME_MomBirthPlace_Dotplot.pdf")
plotMEtraitScatter(MEs$salmon, trait = colData$ADOScs, ylim = c(-0.15, 0.15),
xlab = "ADOS Score", ylab = "Salmon Module Eigennode",
file = "salmon_ME_ADOS_Scatterplot.pdf")
plotMEtraitScatter(MEs$salmon, trait = colData$MomEducation, ylim = c(-0.15, 0.15),
xlab = "Mom Education", ylab = "Salmon Module Eigennode",
file = "salmon_ME_MomEducation_Scatterplot.pdf")
plotMEtraitScatter(MEs$midnightblue, trait = colData$ADOScs, ylim = c(-0.15, 0.15),
xlab = "ADOS Score", ylab = "Midnightblue Module Eigennode",
file = "midnightblue_ME_ADOS_Scatterplot.pdf")
plotMEtraitScatter(MEs$darkturquoise, trait = colData$ADOScs, ylim = c(-0.15, 0.15),
xlab = "ADOS Comparison Score", ylab = "Darkturquoise Module Eigennode",
file = "darkturquoise_ME_ADOS_Scatterplot.pdf")
plotMEtraitScatter(MEs$tan, trait = colData$ADOScs, ylim = c(-0.15, 0.15),
xlab = "ADOS Score", ylab = "Tan Module Eigennode",
file = "Tan_ME_ADOS_Scatterplot.pdf")
plotMEtraitScatter(MEs$midnightblue, trait = colData$MaternalPlasmaPUFA, ylim = c(-0.15, 0.15),
xlab = "Maternal Plasma PUFA", ylab = "Midnightblue Module Eigennode",
file = "midnightblue_ME_Maternal_Plasma_PUFA_Scatterplot.pdf")
plotMEtraitScatter(MEs$red, trait = colData$MullenScore, ylim = c(-0.15, 0.15),
xlab = "Mullen Score", ylab = "Red Module Eigennode",
file = "red_ME_MullenScore_Scatterplot.pdf")
plotMEtraitScatter(MEs$royalblue, trait = colData$Apgar5min, ylim = c(-0.15, 0.15),
xlab = "APGAR score 5 minutes", ylab = "RoyalBlue Module Eigennode",
file = "royalblue_ME_APGAR5min_Scatterplot.pdf")
# Plot Region Methylation vs Traits
regions <- modules$regions
meth <- readRDS("Comethyl/V1/Region_Methylation.rds")
plotMethTrait("salmon", regions = regions, meth = meth,
trait = colData$DiagnosisASD, traitCode = c("TD" = 0, "non-TD" = 1, "ASD" = 2),
traitColors = c("TD" = "#3366CC", "non-TD" = "#258f1a", "ASD" = "#FF3366"),
trait.legend.title = "Diagnosis",
file = "salmon_Module_Methylation_Diagnosis_Heatmap.pdf")
plotMethTrait("darkturquoise", regions = regions, meth = meth,
trait = colData$DiagnosisASD, traitCode = c("TD" = 0, "non-TD" = 1, "ASD" = 2),
traitColors = c("TD" = "#3366CC", "non-TD" = "#258f1a", "ASD" = "#FF3366"),
trait.legend.title = "Diagnosis",
file = "darkturquoise_Module_Methylation_Diagnosis_Heatmap.pdf")
plotMethTrait("salmon", regions = regions, meth = meth,
trait = colData$ADOScs, expandY = 0.04, trait.legend.title = "ADOS Score",
trait.legend.position = c(1.034, 3.35),
file = "salmon_Module_Methylation_ADOS_Heatmap.pdf")
plotMethTrait("midnightblue", regions = regions, meth = meth,
trait = colData$ADOScs, expandY = 0.04, trait.legend.title = "ADOS Score",
trait.legend.position = c(1.034, 3.35),
file = "midnightblue_Module_Methylation_ADOS_Heatmap.pdf")
plotMethTrait("darkturquoise", regions = regions, meth = meth,
trait = colData$ADOScs, expandY = 0.04, trait.legend.title = "ADOS Score",
trait.legend.position = c(1.034, 3.35),
file = "darkturquoise_Module_Methylation_ADOS_Heatmap.pdf")
# Annotate Modules ####
regionsAnno <- annotateModule(regions, module = NULL, grey = FALSE,
genome = "hg38",
file = "Annotated_Module_Regions.txt")
regionsAnno <- annotateModule(regions, module = NULL, grey = TRUE,
genome = "hg38",
file = "Annotated_Module_Regions_Grey.txt")
# Analyze Functional Enrichment ####
ontologies <- listOntologies("hg38", version = "4.0.4")
enrich_PCB_modules <- enrichModule(regions, module = c("darkturquoise", "red", "royalblue", "tan","darkgreen"), genome = "hg38",
file = "PCB_Module_Enrichment.txt")
plotEnrichment(enrich_PCB_modules, file = "PCB_Module_Enrichment_Plot.pdf")
# Circos Plot ####
library(circlize)
regions <- modules$regions
regions_col <- subset(regions, !module == "grey") %>%
dplyr::select(chr, start, end, module)
pdf("Module_Circos_Plot.pdf", width = 3.5, height = 3.5)
circos.par(gap.degree = 2, cell.padding = c(0.007,0,0.007,0),
circle.margin = 0.00001)
circos.initializeWithIdeogram(species = "hg38", plotType = c("ideogram", "labels"))
circos.genomicTrack(regions_col, ylim = c(0, 1),
panel.fun = function(region, value, ...) {
circos.genomicRect(region, value, ytop = 1, ybottom = 0,
border = unlist(value))
})
circos.clear()
dev.off()
# Module Region Counts ####
region_counts <- table(regions_col$module) %>% sort(decreasing = TRUE) %>%
as.data.frame()
region_counts$Var1 <- as.character(region_counts$Var1) %>%
factor(levels = rev(region_counts$Var1))
barplot <- ggplot(aes(x = Var1, y = Freq), data = region_counts) +
geom_col(fill = "#132B43") +
coord_flip() +
scale_x_discrete(expand = expansion(c(0.02))) +
scale_y_continuous(breaks = breaks_pretty(n = 4),
expand = expansion(c(0.004, 0.03))) +
theme_bw(base_size = 25) +
theme(legend.position = "none", panel.grid.major = element_blank(),
panel.border = element_rect(color = "black", size = 1.25),
axis.ticks.x = element_line(size = 1.25),
axis.ticks.y = element_blank(),
panel.grid.minor = element_blank(), strip.background = element_blank(),
axis.text.x = element_text(color = "black", size = 16),
axis.text.y = element_blank(),
axis.title.x = element_text(size = 20), axis.title.y = element_blank(),
plot.margin = unit(c(1,1,0.5,0), "lines")) +
ylab("Regions")
rowColors <- ggplot(data = data.frame(x = 0, y = 1:nrow(region_counts),
color = rev(region_counts$Var1))) +
geom_tile(aes(x = x, y = y, color = color, fill = color)) +
scale_fill_identity(aesthetics = c("color", "fill")) +
theme_void() +
theme(legend.position = "none", plot.margin = unit(c(-0.15,-2,2.9,1),
"lines"))
gg <- plot_grid(rowColors, barplot, ncol = 2, rel_widths = c(0.1, 1))
ggsave("Module_Region_Counts.pdf", plot = gg, dpi = 600, width = 5, height = 7,
units = "in")