merged_results <- merge_finemapping_results(minimum_support=1,
include_leadSNPs=T,
xlsx_path="./Data/annotated_finemapping_results.xlsx",
from_storage=T,
haploreg_annotation=T,
biomart_annotation=T,
verbose = F)
## [1] "++ Submitting chunk 1 / 1"
## Note: zip::zip() is deprecated, please use zip::zipr() instead
merged_results <- subset(merged_results, Dataset=="./Data/GWAS/Nalls23andMe_2019")
createDT(subset(merged_results, Support == 2))
potential_missense <- SNPs_by_mutation_type(merged_results, mutation_type="missense_variant")
createDT(potential_missense)
# candidate_counts <- counts_summary(top_SNPs, merged_results)
# createDT(candidate_counts)
# Distribution of mutation types in Credible Set SNPs
mod <- merged_results %>%
mutate(CredSet.Lead =
ifelse(Support>0,
ifelse(leadSNP==T,"CS & leadSNP", "CS & non-leadSNP"),
ifelse(leadSNP==T, "Non-CS & leadSNP","Non-CS & non-leadSNP")),NA)
ggplot(data=mod, aes(x=consequence_type_tv, fill=CredSet.Lead)) +
geom_bar(aes(y = ..count..), position="dodge") + # (..count..)/sum(..count..)
coord_flip() +
labs(title="Proportions of Mutation Types (Biomart)",
subtitle = "Support = Within Credible Set",
x = "Mutation Type",
y="SNP Count") +
theme(legend.text = element_text(size=8))
## [1] "psychENCODE:: Downloading summary stats."
## [1] "psychENCODE:: File already exists."
## [1] "psychENCODE:: File already exists."
## [1] "psychENCODE:: File already exists."
## [1] "psychENCODE:: File already exists."
## [1] "+ Gathering all fine-mapping results from storage..."
## [1] "+ Importing results... PTK2B"
## [1] "+ Importing results... ASXL3"
## [1] "+ Importing results... ATG14"
## [1] "+ Importing results... ATP6V0A1"
## [1] "+ Importing results... BIN3"
## [1] "+ Importing results... BRIP1"
## [1] "+ Importing results... BST1"
## [1] "+ Importing results... C5orf24"
## [1] "+ Importing results... CAB39L"
## [1] "+ Importing results... CAMK2D"
## [1] "+ Importing results... CASC16"
## [1] "+ Importing results... CD19"
## [1] "+ Importing results... CHD9"
## [1] "+ Importing results... CHRNB1"
## [1] "+ Importing results... CLCN3"
## [1] "+ Importing results... CRHR1"
## [1] "+ Importing results... CRLS1"
## [1] "+ Importing results... CTSB"
## [1] "+ Importing results... DLG2"
## [1] "+ Importing results... DNAH17"
## [1] "+ Importing results... DYRK1A"
## [1] "+ Importing results... ELOVL7"
## [1] "+ Importing results... FAM171A2"
## [1] "+ Importing results... FAM47E-STBD1"
## [1] "+ Importing results... FAM49B"
## [1] "+ Importing results... FBRSL1"
## [1] "+ Importing results... FCGR2A"
## [1] "+ Importing results... FGF20"
## [1] "+ Importing results... FYN"
## [1] "+ Importing results... GALC"
## [1] "+ Importing results... GBF1"
## [1] "+ Importing results... GCH1"
## [1] "+ Importing results... GPNMB"
## [1] "+ Importing results... GS1-124K5.11"
## [1] "+ Importing results... HIP1R"
## [1] "+ Importing results... HLA-DRB5"
## [1] "+ Importing results... IGSF9B"
## [1] "+ Importing results... INPP5F"
## [1] "+ Importing results... IP6K2"
## [1] "+ Importing results... ITGA8"
## [1] "+ Importing results... ITPKB"
## [1] "+ Importing results... KCNIP3"
## [1] "+ Importing results... KCNS3"
## [1] "+ Importing results... KPNA1"
## [1] "+ Importing results... KRTCAP2"
## [1] "+ Importing results... LCORL"
## [1] "+ Importing results... LINC00693"
## [1] "+ Importing results... LMNB1"
## [1] "+ Importing results... LOC100131289"
## [1] "+ Importing results... LRRK2"
## [1] "+ Importing results... MAP4K4"
## [1] "+ Importing results... MBNL2"
## [1] "+ Importing results... MCCC1"
## [1] "+ Importing results... MED12L"
## [1] "+ Importing results... MEX3C"
## [1] "+ Importing results... MIPOL1"
## [1] "+ Importing results... NOD2"
## [1] "+ Importing results... NUCKS1"
## [1] "+ Importing results... PAM"
## [1] "+ Importing results... RETREG3"
## [1] "+ Importing results... RIMS1"
## [1] "+ Importing results... RIT2"
## [1] "+ Importing results... RNF141"
## [1] "+ Importing results... RPS12"
## [1] "+ Importing results... RPS6KL1"
## [1] "+ Importing results... SATB1"
## [1] "+ Importing results... SCAF11"
## [1] "+ Importing results... SETD1A"
## [1] "+ Importing results... SH3GL2"
## [1] "+ Importing results... SIPA1L2"
## [1] "+ Importing results... SNCA"
## [1] "+ Importing results... SP1"
## [1] "+ Importing results... SPPL2B"
## [1] "+ Importing results... SPTSSB"
## [1] "+ Importing results... STK39"
## [1] "+ Importing results... SYT17"
## [1] "+ Importing results... TMEM163"
## [1] "+ Importing results... TMEM175"
## [1] "+ Importing results... TRIM40"
## [1] "+ Importing results... UBAP2"
## [1] "+ Importing results... VAMP4"
## [1] "+ Importing results... VPS13C"
## [1] "+ Importing results... WNT3"
## [1] "+ Importing results... PTK2B"
## [1] "+ Importing results... ASXL3"
## [1] "+ Importing results... ATG14"
## [1] "+ Importing results... ATP6V0A1"
## [1] "+ Importing results... BIN3"
## [1] "+ Importing results... BRIP1"
## [1] "+ Importing results... BST1"
## [1] "+ Importing results... C5orf24"
## [1] "+ Importing results... CAB39L"
## [1] "+ Importing results... CAMK2D"
## [1] "+ Importing results... CASC16"
## [1] "+ Importing results... CD19"
## [1] "+ Importing results... CHD9"
## [1] "+ Importing results... CHRNB1"
## [1] "+ Importing results... CLCN3"
## [1] "+ Importing results... CRHR1"
## [1] "+ Importing results... CRLS1"
## [1] "+ Importing results... CTSB"
## [1] "+ Importing results... DLG2"
## [1] "+ Importing results... DNAH17"
## [1] "+ Importing results... DYRK1A"
## [1] "+ Importing results... ELOVL7"
## [1] "+ Importing results... FAM171A2"
## [1] "+ Importing results... FAM47E-STBD1"
## [1] "+ Importing results... FAM49B"
## [1] "+ Importing results... FBRSL1"
## [1] "+ Importing results... FCGR2A"
## [1] "+ Importing results... FGF20"
## [1] "+ Importing results... FYN"
## [1] "+ Importing results... GALC"
## [1] "+ Importing results... GBF1"
## [1] "+ Importing results... GCH1"
## [1] "+ Importing results... GPNMB"
## [1] "+ Importing results... GS1-124K5.11"
## [1] "+ Importing results... HIP1R"
## [1] "+ Importing results... HLA-DRB5"
## [1] "+ Importing results... IGSF9B"
## [1] "+ Importing results... INPP5F"
## [1] "+ Importing results... IP6K2"
## [1] "+ Importing results... ITGA8"
## [1] "+ Importing results... ITPKB"
## [1] "+ Importing results... KCNIP3"
## [1] "+ Importing results... KCNS3"
## [1] "+ Importing results... KPNA1"
## [1] "+ Importing results... KRTCAP2"
## [1] "+ Importing results... LCORL"
## [1] "+ Importing results... LINC00693"
## [1] "+ Importing results... LMNB1"
## [1] "+ Importing results... LOC100131289"
## [1] "+ Importing results... LRRK2"
## [1] "+ Importing results... MAP4K4"
## [1] "+ Importing results... MBNL2"
## [1] "+ Importing results... MCCC1"
## [1] "+ Importing results... MED12L"
## [1] "+ Importing results... MEX3C"
## [1] "+ Importing results... MIPOL1"
## [1] "+ Importing results... NOD2"
## [1] "+ Importing results... NUCKS1"
## [1] "+ Importing results... PAM"
## [1] "+ Importing results... RETREG3"
## [1] "+ Importing results... RIMS1"
## [1] "+ Importing results... RIT2"
## [1] "+ Importing results... RNF141"
## [1] "+ Importing results... RPS12"
## [1] "+ Importing results... RPS6KL1"
## [1] "+ Importing results... SATB1"
## [1] "+ Importing results... SCAF11"
## [1] "+ Importing results... SETD1A"
## [1] "+ Importing results... SH3GL2"
## [1] "+ Importing results... SIPA1L2"
## [1] "+ Importing results... SNCA"
## [1] "+ Importing results... SP1"
## [1] "+ Importing results... SPPL2B"
## [1] "+ Importing results... SPTSSB"
## [1] "+ Importing results... STK39"
## [1] "+ Importing results... SYT17"
## [1] "+ Importing results... TMEM163"
## [1] "+ Importing results... TMEM175"
## [1] "+ Importing results... TRIM40"
## [1] "+ Importing results... UBAP2"
## [1] "+ Importing results... VAMP4"
## [1] "+ Importing results... VPS13C"
## [1] "+ Importing results... WNT3"
## [1] "eQTL"
## [1] "+ Importing eQTL data..."
## [1] "ASXL3"
## [1] "ATG14"
## [1] "ATP6V0A1"
## [1] "BIN3"
## [1] "BRIP1"
## [1] "BST1"
## [1] "C5orf24"
## [1] "CAB39L"
## [1] "CAMK2D"
## [1] "CASC16"
## [1] "CD19"
## [1] "CHD9"
## [1] "CHRNB1"
## [1] "CLCN3"
## [1] "CRHR1"
## [1] "CRLS1"
## [1] "CTSB"
## [1] "DLG2"
## [1] "DNAH17"
## [1] "DYRK1A"
## [1] "ELOVL7"
## [1] "FAM171A2"
## [1] "FAM47E-STBD1"
## [1] "FAM49B"
## [1] "FBRSL1"
## [1] "FCGR2A"
## [1] "FGF20"
## [1] "FYN"
## [1] "GALC"
## [1] "GBF1"
## [1] "GCH1"
## [1] "GPNMB"
## [1] "GS1-124K5.11"
## [1] "HIP1R"
## [1] "HLA-DRB5"
## [1] "IGSF9B"
## [1] "INPP5F"
## [1] "IP6K2"
## [1] "ITGA8"
## [1] "ITPKB"
## [1] "KCNIP3"
## [1] "KCNS3"
## [1] "KPNA1"
## [1] "KRTCAP2"
## [1] "LCORL"
## [1] "LINC00693"
## [1] "LOC100131289"
## [1] "LRRK2"
## [1] "MAP4K4"
## [1] "MBNL2"
## [1] "MCCC1"
## [1] "MED12L"
## [1] "MEX3C"
## [1] "MIPOL1"
## [1] "NOD2"
## [1] "NUCKS1"
## [1] "PAM"
## [1] "PTK2B"
## [1] "RETREG3"
## [1] "RIMS1"
## [1] "RIT2"
## [1] "RNF141"
## [1] "RPS12"
## [1] "RPS6KL1"
## [1] "SATB1"
## [1] "SCAF11"
## [1] "SETD1A"
## [1] "SH3GL2"
## [1] "SIPA1L2"
## [1] "SNCA"
## [1] "SP1"
## [1] "SPPL2B"
## [1] "SPTSSB"
## [1] "STK39"
## [1] "SYT17"
## [1] "TMEM163"
## [1] "TMEM175"
## [1] "TRIM40"
## [1] "UBAP2"
## [1] "VAMP4"
## [1] "VPS13C"
## [1] "WNT3"
## [1] "cQTL"
## [1] "+ Importing cQTL data..."
## [1] "ASXL3"
## [1] "ATG14"
## [1] "ATP6V0A1"
## [1] "BIN3"
## [1] "BRIP1"
## [1] "BST1"
## [1] "C5orf24"
## [1] "CAB39L"
## [1] "CAMK2D"
## [1] "CASC16"
## [1] "CD19"
## [1] "CHD9"
## [1] "CHRNB1"
## [1] "CLCN3"
## [1] "CRHR1"
## [1] "CRLS1"
## [1] "CTSB"
## [1] "DLG2"
## [1] "DNAH17"
## [1] "DYRK1A"
## [1] "ELOVL7"
## [1] "FAM171A2"
## [1] "FAM47E-STBD1"
## [1] "FAM49B"
## [1] "FBRSL1"
## [1] "FCGR2A"
## [1] "FGF20"
## [1] "FYN"
## [1] "GALC"
## [1] "GBF1"
## [1] "GCH1"
## [1] "GPNMB"
## [1] "GS1-124K5.11"
## [1] "HIP1R"
## [1] "HLA-DRB5"
## [1] "IGSF9B"
## [1] "INPP5F"
## [1] "IP6K2"
## [1] "ITGA8"
## [1] "ITPKB"
## [1] "KCNIP3"
## [1] "KCNS3"
## [1] "KPNA1"
## [1] "KRTCAP2"
## [1] "LCORL"
## [1] "LINC00693"
## [1] "LOC100131289"
## [1] "LRRK2"
## [1] "MAP4K4"
## [1] "MBNL2"
## [1] "MCCC1"
## [1] "MED12L"
## [1] "MEX3C"
## [1] "MIPOL1"
## [1] "NOD2"
## [1] "NUCKS1"
## [1] "PAM"
## [1] "PTK2B"
## [1] "RETREG3"
## [1] "RIMS1"
## [1] "RIT2"
## [1] "RNF141"
## [1] "RPS12"
## [1] "RPS6KL1"
## [1] "SATB1"
## [1] "SCAF11"
## [1] "SETD1A"
## [1] "SH3GL2"
## [1] "SIPA1L2"
## [1] "SNCA"
## [1] "SP1"
## [1] "SPPL2B"
## [1] "SPTSSB"
## [1] "STK39"
## [1] "SYT17"
## [1] "TMEM163"
## [1] "TMEM175"
## [1] "TRIM40"
## [1] "UBAP2"
## [1] "VAMP4"
## [1] "VPS13C"
## [1] "WNT3"
## [1] "isoQTL"
## [1] "+ Importing isoQTL data..."
## [1] "ASXL3"
## [1] "ATG14"
## [1] "ATP6V0A1"
## [1] "BIN3"
## [1] "BRIP1"
## [1] "BST1"
## [1] "C5orf24"
## [1] "CAB39L"
## [1] "CAMK2D"
## [1] "CASC16"
## [1] "CD19"
## [1] "CHD9"
## [1] "CHRNB1"
## [1] "CLCN3"
## [1] "CRHR1"
## [1] "CRLS1"
## [1] "CTSB"
## [1] "DLG2"
## [1] "DNAH17"
## [1] "DYRK1A"
## [1] "ELOVL7"
## [1] "FAM171A2"
## [1] "FAM47E-STBD1"
## [1] "FAM49B"
## [1] "FBRSL1"
## [1] "FCGR2A"
## [1] "FGF20"
## [1] "FYN"
## [1] "GALC"
## [1] "GBF1"
## [1] "GCH1"
## [1] "GPNMB"
## [1] "GS1-124K5.11"
## [1] "HIP1R"
## [1] "HLA-DRB5"
## [1] "IGSF9B"
## [1] "INPP5F"
## [1] "IP6K2"
## [1] "ITGA8"
## [1] "ITPKB"
## [1] "KCNIP3"
## [1] "KCNS3"
## [1] "KPNA1"
## [1] "KRTCAP2"
## [1] "LCORL"
## [1] "LINC00693"
## [1] "LOC100131289"
## [1] "LRRK2"
## [1] "MAP4K4"
## [1] "MBNL2"
## [1] "MCCC1"
## [1] "MED12L"
## [1] "MEX3C"
## [1] "MIPOL1"
## [1] "NOD2"
## [1] "NUCKS1"
## [1] "PAM"
## [1] "PTK2B"
## [1] "RETREG3"
## [1] "RIMS1"
## [1] "RIT2"
## [1] "RNF141"
## [1] "RPS12"
## [1] "RPS6KL1"
## [1] "SATB1"
## [1] "SCAF11"
## [1] "SETD1A"
## [1] "SH3GL2"
## [1] "SIPA1L2"
## [1] "SNCA"
## [1] "SP1"
## [1] "SPPL2B"
## [1] "SPTSSB"
## [1] "STK39"
## [1] "SYT17"
## [1] "TMEM163"
## [1] "TMEM175"
## [1] "TRIM40"
## [1] "UBAP2"
## [1] "VAMP4"
## [1] "VPS13C"
## [1] "WNT3"
## [1] "HiC"
## [1] "+ Importing HiC data..."
## [1] "ASXL3"
## [1] "ATG14"
## [1] "ATP6V0A1"
## [1] "BIN3"
## [1] "BRIP1"
## [1] "BST1"
## [1] "C5orf24"
## [1] "CAB39L"
## [1] "CAMK2D"
## [1] "CASC16"
## [1] "CD19"
## [1] "CHD9"
## [1] "CHRNB1"
## [1] "CLCN3"
## [1] "CRHR1"
## [1] "CRLS1"
## [1] "CTSB"
## [1] "DLG2"
## [1] "DNAH17"
## [1] "DYRK1A"
## [1] "ELOVL7"
## [1] "FAM171A2"
## [1] "FAM47E-STBD1"
## [1] "FAM49B"
## [1] "FBRSL1"
## [1] "FCGR2A"
## [1] "FGF20"
## [1] "FYN"
## [1] "GALC"
## [1] "GBF1"
## [1] "GCH1"
## [1] "GPNMB"
## [1] "GS1-124K5.11"
## [1] "HIP1R"
## [1] "HLA-DRB5"
## [1] "IGSF9B"
## [1] "INPP5F"
## [1] "IP6K2"
## [1] "ITGA8"
## [1] "ITPKB"
## [1] "KCNIP3"
## [1] "KCNS3"
## [1] "KPNA1"
## [1] "KRTCAP2"
## [1] "LCORL"
## [1] "LINC00693"
## [1] "LOC100131289"
## [1] "LRRK2"
## [1] "MAP4K4"
## [1] "MBNL2"
## [1] "MCCC1"
## [1] "MED12L"
## [1] "MEX3C"
## [1] "MIPOL1"
## [1] "NOD2"
## [1] "NUCKS1"
## [1] "PAM"
## [1] "PTK2B"
## [1] "RETREG3"
## [1] "RIMS1"
## [1] "RIT2"
## [1] "RNF141"
## [1] "RPS12"
## [1] "RPS6KL1"
## [1] "SATB1"
## [1] "SCAF11"
## [1] "SETD1A"
## [1] "SH3GL2"
## [1] "SIPA1L2"
## [1] "SNCA"
## [1] "SP1"
## [1] "SPPL2B"
## [1] "SPTSSB"
## [1] "STK39"
## [1] "SYT17"
## [1] "TMEM163"
## [1] "TMEM175"
## [1] "TRIM40"
## [1] "UBAP2"
## [1] "VAMP4"
## [1] "VPS13C"
## [1] "WNT3"
## Warning: funs() is soft deprecated as of dplyr 0.8.0
## Please use a list of either functions or lambdas:
##
## # Simple named list:
## list(mean = mean, median = median)
##
## # Auto named with `tibble::lst()`:
## tibble::lst(mean, median)
##
## # Using lambdas
## list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## This warning is displayed once per session.
results.DF <- fgwas(results_path="./Data/GWAS/Nalls23andMe_2019/_genome_wide",
fgwas.out = file.path(results_path,"fGWAS","Output"),
fgwas = "./echolocatoR/tools/fgwas-0.3.6/src/fgwas",
dataset = "./Data/GWAS/Nalls23andMe_2019",
remove_tmps = T,
force_new_fgwas = F)
## [1] "fGWAS:: Results file already exists."
## [1] " Importing: ./Data/GWAS/Nalls23andMe_2019/_genome_wide/fGWAS/fGWAS_summary.Nalls23andMe_2019.txt"
estimate > 0
estimate < 0
interact=T
, hover to explore more information about each data point, including the annotation that the enirchment test was conducted with.annotation_or_tissue = "annotation
.
## Registered S3 method overwritten by 'seriation':
## method from
## reorder.hclust gclus
GoShifter: Performs SNP-level enrichment tests using BED files. However, unlike simpler methods, it also incorporates Linkage Disequilibrium (LD) info into the model. In this pipeline, LD is estimated from the refrence panel (e.g. 1000 Genomes Phase 1). + Because GoShifter does not consider a specific background, these tests were repeated for both the Credible Sets, and then in all the SNPs in the same locus. - GoShifter was used to test for enrichment in three different SNP Groups:
1. Credible Set: SNPs that were prioritized by at least one fine-mapping tool. 2. Lead SNPs: The top N significant SNPs in the original GWAS, where N is equal to the number of Credible Set SNPs. 3. Random: A randomly chosen numer of SNPs
sum(enrichment >= nSnpOverlap) / n.permutations
# List all chromatin state options
chrom.states.df <- GoShifter.list_chromatin_states()
createDT(chrom.states.df)
# Prepare Data
results_path <- "./Data/GWAS/Nalls23andMe_2019/LRRK2"
finemap_DT <- data.table::fread(file.path(results_path,"Multi-finemap/Multi-finemap_results.txt"))
# Create different subsets of SNPs to test for enrichment
snp_df.CS <- subset(finemap_DT, Support>0)
snp_df.GWAS <- (finemap_DT %>% dplyr::arrange(P, desc(Effect)))[1:nrow(snp_df.CS),]
snp_df.Random <- finemap_DT[sample(nrow(finemap_DT), nrow(snp_df.CS)), ]
snp.df.list <- list("CS"=snp_df.CS, "GWAS"=snp_df.GWAS, "Random"=snp_df.Random)
# Iterate GoShifter over each SNP Group
GS.groups <- lapply(names(snp.df.list), function(group){
printer("GoShifter:: testing enrichment for SNP Group:",group)
GS.RESULTS <- GoShifter(results_path = results_path,
snp_df = snp.df.list[[group]],
SNP.Group = group,
ROADMAP_search = c("monocyte","brain"),
ROADMAP_type = c("PrimaryCell","PrimaryTissue"),
chromatin_states = c("TssA","Quies"),#NA,
R2_filter = 0.8, # Include LD SNPs at rsquared >= NUM [default: 0.8]
overlap_threshold = 1,
remove_tmps = F,
force_new_goshifter = F)
GS.RESULTS$SNP.Group <- group
return(GS.RESULTS)
}) %>% data.table::rbindlist()
## [1] "GoShifter:: testing enrichment for SNP Group: CS"
## [1] "++ GoShifter: Creating snpmap file..."
## [1] "+++ snpmap written to : ./Data/GWAS/Nalls23andMe_2019/LRRK2/GoShifter/snpmap.txt"
## [1] "++ GoShifter: Creating LD file(s)..."
## [1] "+++ LD file(s) written to : ./Data/GWAS/Nalls23andMe_2019/LRRK2/GoShifter/LD"
## [1] "++ GoShifter: Searching for Roadmap annotation BED files..."
## [1] "++ GoShifter: Found 15 annotation BED files matching search query."
## [1] "GoShifter:: testing enrichment for SNP Group: GWAS"
## [1] "++ GoShifter: Creating snpmap file..."
## [1] "+++ snpmap written to : ./Data/GWAS/Nalls23andMe_2019/LRRK2/GoShifter/snpmap.txt"
## [1] "++ GoShifter: Creating LD file(s)..."
## [1] "+++ LD file(s) written to : ./Data/GWAS/Nalls23andMe_2019/LRRK2/GoShifter/LD"
## [1] "++ GoShifter: Searching for Roadmap annotation BED files..."
## [1] "++ GoShifter: Found 15 annotation BED files matching search query."
## [1] "GoShifter:: testing enrichment for SNP Group: Random"
## [1] "++ GoShifter: Creating snpmap file..."
## [1] "+++ snpmap written to : ./Data/GWAS/Nalls23andMe_2019/LRRK2/GoShifter/snpmap.txt"
## [1] "++ GoShifter: Creating LD file(s)..."
## [1] "+++ LD file(s) written to : ./Data/GWAS/Nalls23andMe_2019/LRRK2/GoShifter/LD"
## [1] "++ GoShifter: Searching for Roadmap annotation BED files..."
## [1] "++ GoShifter: Found 15 annotation BED files matching search query."
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.