library(echolocatoR)
Lopes, K.d.P., Snijders, G.J.L., Humphrey, J. et al. Genetic analysis of the human microglial transcriptome across brain regions, aging and disease pathologies. Nat Genet 54, 4–17 (2022). https://doi.org/10.1038/s41588-021-00976-y
This data is actually merged GWAS-QTL colocalization results, but it contains all of the necessary columns from the original eQTL summary stats that we need to perform eQTL fine-mapping.
coloc_res <- echodata::get_Kunkle2019_coloc(return_path = TRUE)
colmap
Prepare a column mapping object for the summary statistics.
We'll reuse this for both the import_topSNPs
and finemap_loci
steps.
colmap <- echodata::construct_colmap( CHR = "chr", POS = "pos", N = "qtl.N", SNP = "snp", P = "qtl.pvalues", Effect = "qtl.beta", StdErr = "qtl.varbeta", MAF = "qtl.MAF", Locus = "Locus", Gene = "gene")
top_SNPs
data.framegrouping_vars=c("Locus","Gene")
so that you get top SNPs for each eGene-locus pair (not just one SNP per locus). topSNPs <- echodata::import_topSNPs( topSS = coloc_res$path, colmap = colmap, ## Important for QTLs: group by both Locus and Gene grouping_vars = c("Locus","Gene")) head(topSNPs)
res <- echolocatoR::finemap_loci(fullSS_path = coloc_res$path, topSNPs = topSNPs, ## Let's just fine-map 1 locus for demo purposes loci = topSNPs$Locus[1], dataset_name = "Kunkle_2019.microgliaQTL", dataset_type = "QTL", bp_distance = 1000, colmap = colmap, show_plot = TRUE, finemap_methods = c("ABF","FINEMAP","SUSIE") )
utils::sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.