library(echolocatoR) 

Full pipeline

All examples below use data from the Parkinson's disease GWAS by Nalls et al. (2019).

Prepare top_SNPs data.frame

#### Load example top SNPs (pre-formatted) ####
topSS <- echodata::topSNPs_Nalls2019_raw
#### construct a column mapping object ####
colmap <- echodata::construct_colmap(P = "P, all studies",
                                     Effect = "Beta, all studies",
                                     Locus = "Nearest Gene",
                                     Gene = "QTL Nominated Gene (nearest QTL)")
#### Import top SNPs ####
topSNPs <- echodata::import_topSNPs(
    topSS = echodata::topSNPs_Nalls2019_raw,
    colmap = colmap,
    grouping_vars = "Locus Number")
head(topSNPs)

Path to full summary stats file

Here's an example of how to munge your full summary stats file:

fullSS_path <- echodata::example_fullSS(munged = FALSE)
fullSS_path <- MungeSumstats::format_sumstats(path = fullSS_path, ref_genome = "GRCH37")

We have already munged the following example summary stats for you.

fullSS_path <- echodata::example_fullSS(dataset = "Nalls2019")

Run fine-mapping pipeline

For a full description of all arguments, see ?finemap_loci.

Here are some key arguments:

Note: Please use the full absolute paths (instead of relative paths) wherever possible (e.g. results_dir). This is especially important for the tool FINEMAP.

results <- echolocatoR::finemap_loci(
 fullSS_path = fullSS_path,
 topSNPs = topSNPs,
 loci = c("BST1","MEX3C"),
 LD_reference = "1KGphase3",
 dataset_name = "Nalls23andMe_2019",
 fullSS_genome_build = "hg19",
 bp_distance = 1000,
 finemap_methods = c("ABF","SUSIE","FINEMAP"),
 munged = TRUE)

Session info

utils::sessionInfo()




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