Here, we assess the enrichment of fine-mapped AD SNPs in cell-type specific enhancers identified by the Activity-by-Contact (ABC) Model. We use data from 132 cell types (Nasser et al. 2021, Kosoy et al. 2022).
We calculate an enrichment ratio using the following formula:
(# fine-mapped SNPs overlapping ABC enhancers in cell type x) / (same # of randomly sampled SNPs from 1000G panel overlapping ABC enhancers in cell type x)
The 1000G panel of common variants can be found in the 1000G_panel_hg19 folder.
We run this 1000 times and take the average of the 1000 runs to calculate the final enrichment ratio.
A sample script for running this analysis can be found within the ABC_enrichment_results folder, called bootstrapping_analysis_sample_script.R. For this markdown, we are using results calculated from this script (stored in the cell_type_enrichment_results folder).
sboxplot1 <- ggplot(enrichment_summary_finemapping, aes(x=Category, y=OR, color = Category)) +
geom_boxplot(outline=FALSE) +
geom_point() +
geom_jitter(position = position_jitter(width=0.02)) +
theme_classic() +
xlab('Cell Type Category') +
ylab('Enrichment Ratio \n (Fine-mapped BD Variants/all variants)') +
ylim(c(0,31)) +
theme(axis.title.x = element_text(margin = margin(t = 10, r = 0, b = 0, l = 0)),
axis.title.y = element_text(margin = margin(t = 0, r = 10, b = 0, l = 0))) +
geom_hline(yintercept=0,linetype=2)
print(sboxplot1)sboxplot2 <- ggplot(enrichment_summary[enrichment_summary$variants == 'AD lead gwas',], aes(x=Category, y=OR, color = Category)) +
geom_boxplot(outline=FALSE) +
geom_point() +
geom_jitter(position = position_jitter(width=0.02)) +
theme_classic() +
xlab('Cell Type Category') +
ylab('Enrichment Ratio \n (Fine-mapped BD Variants/all variants)') +
ylim(c(0,31)) +
theme(axis.title.x = element_text(margin = margin(t = 10, r = 0, b = 0, l = 0)),
axis.title.y = element_text(margin = margin(t = 0, r = 10, b = 0, l = 0))) +
geom_hline(yintercept=0,linetype=2)
print(sboxplot2)sboxplot3 <- ggplot(enrichment_summary[enrichment_summary$variants == 'BD finemapped',], aes(x=Category, y=OR, color = Category)) +
geom_boxplot(outline=FALSE) +
geom_point() +
geom_jitter(position = position_jitter(width=0.02)) +
theme_classic() +
xlab('Cell Type Category') +
ylab('Enrichment Ratio \n (Fine-mapped BD Variants/all variants)') +
ylim(c(0,31)) +
theme(axis.title.x = element_text(margin = margin(t = 10, r = 0, b = 0, l = 0)),
axis.title.y = element_text(margin = margin(t = 0, r = 10, b = 0, l = 0))) +
geom_hline(yintercept=0,linetype=2)
print(sboxplot3)This table shows enrichment statistics for all ABC enhancers for AD fine-mapped variants, AD GWAS variants, and BD fine-mapped variants.
This table shows all fine-mapped variants that overlap in microglia ABC enhancers.
setwd('/Users/ashvinravi/Desktop/finemapping_MPRA_project/AD_MPRA/')
abc_enhancer_coords <- read_tsv('ABC_enrichment_results/ABC_enhancers/abc_enhancer_coords_hg19.tsv', show_col_types=F)
microglia_enhancer_coords <- abc_enhancer_coords[abc_enhancer_coords$CellType == 'microglia',]
microglia_abc_coords <- microglia_enhancer_coords
# Load fine-mapped results here
fine_mapping_results <- read.table('/Users/ashvinravi/Desktop/finemapping_MPRA_project/AD_MPRA/full_results/susie_ld_gwas_with_rsids_hg19.tsv.gz', sep = '\t', header = TRUE)
names(microglia_abc_coords)[names(microglia_abc_coords) == 'chr'] = 'chrom'
names(fine_mapping_results)[names(fine_mapping_results) == 'CHR'] = 'chrom'
names(fine_mapping_results)[names(fine_mapping_results) == 'BP'] = 'start'
fine_mapping_results$end <- fine_mapping_results$start + 1
fine_mapping_results <- fine_mapping_results %>% filter(PIP >= 0.1)
fine_mapping_results$chrom <- paste('chr', fine_mapping_results$chrom, sep = '')
microglia_intersect <- bed_intersect(microglia_abc_coords, fine_mapping_results)
microglia_intersect_results <- microglia_intersect %>% distinct(chrom, start.y, end.y, LOCUS.y, PIP.y, CREDIBLE_SET.y)
createDT(microglia_intersect_results)