library(echolocatoR) 

QTL pipeline

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

Import QTL data

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)

Prepare 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")

Prepare top_SNPs data.frame

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)

Run fine-mapping pipeline

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") )

Session info

utils::sessionInfo()



RajLabMSSM/echolocatoR documentation built on Jan. 29, 2023, 6:04 a.m.