knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(mrpipeline)

Introduction

The pipeline also has the ability to automate colocalisation analyses using a variety of methods. These include:

By default, coloc is used by the pipeline due to the extra data required for the other colocalisation methods. Please see the XXX vignette for points of consideration when selecting the correct method for your analysis.

Performing colocalisation

The colocalisation analyses require a harmonised dataset like the MR analyses. Let us use the same example as before:

exp_dat <- read_exposure("eqtl-a-ENSG00000167207")
out_dat <- read_outcome("ieu-a-7", rsids = exp_dat$SNP)
dat <- harmonise(exp_dat, out_dat)

head(data.frame(dat))

Running colocalisation using the default parameters is easy:

cres <- do_coloc(dat)

head(data.frame(cres$res))

There are a few things to note when reading the output of the do_coloc function:

cres <- do_coloc(dat, coloc_window = 5e4)

cres$plot

N.B. This example has reduced the coloc_window size to limit the number of SNPs in the region and demonstrate the plotting functionality of the pipeline. We do not advise changing the coloc_window in this way without understanding how it changes the underlying analysis.

Reading the results

Reading the results can differ slightly for each method.

Coloc.abf

head(data.frame(cres$res))

The results data.frame will contain a row for each combination of exposure and outcome pairs in your harmonised dataset. The data.frame will also tell you how many SNPs are present in your analysis, which can be important for knowing when your analyses may be underpowered. Finally, the PP for each coloc hypothesis are given.

Coloc.susie

Unimplemented

PWCoCo

Under construction



jwr-git/mrpipeline documentation built on Oct. 2, 2022, 3:41 p.m.