Learn R Programming

coloc

Most of the questions I get relate to misunderstanding the assumptions behind coloc (dense genotypes across a single genomic region) and/or the data structures used. Please read vignette("a02_data",package="coloc") before starting an issue.

version 5

This update (version 5) supercedes previously published version 4 by introducing use of the SuSiE approach to deal with multiple causal variants rather than conditioning or masking. See

  • Wang, G., Sarkar, A., Carbonetto, P., & Stephens, M. (2020). A simple new approach to variable selection in regression, with application to genetic fine mapping. Journal of the Royal Statistical Society: Series B (Statistical Methodology). https://doi.org/10.1111/rssb.12388

for the full SuSiE paper and

for a description of its use in coloc.

To install from R, do

if(!require("remotes"))
   install.packages("remotes") # if necessary
library(remotes)
install_github("chr1swallace/coloc@main",build_vignettes=TRUE)

Note that in all simulations, susie outperforms the earlier conditioning approach, so is recommended. However, it is also new code, so please consider the code "beta" and let me know of any issues that arise - they may be a bug on my part. If you want to use it, the function you want to look at is coloc.susie. It can take raw datasets, but the time consuming part is running SuSiE. coloc runs SuSiE and saves a little extra information using the runsusie function before running an adapted colocalisation on the results. So please look at the docs for runsusie too. I found a helpful recipe is

  1. Run runsusie on dataset 1, storing the results
  2. Run runsusie on dataset 2, storing the results
  3. Run coloc.susie on the two outputs from above

More detail is available in the vignette a06_SuSiE.html accessible by

vignette("a06_SuSiE",package="coloc")

Background reading

For usage, please see the vignette at https://chr1swallace.github.io/coloc

Key previous references are:

Frequently Asked Questions

see FAQ

Notes to self

to generate website: https://chr1swallace.github.io/coloc/

Rscript -e "pkgdown::build_site()"

Copy Link

Version

Install

install.packages('coloc')

Monthly Downloads

1,368

Version

5.2.3

License

GPL

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

October 3rd, 2023

Functions in coloc (5.2.3)

finemap.bf

Finemap data through Bayes factors
logsum

logsum
logbf_to_pp

logbf 2 pp
coloc.signals

Coloc with multiple signals per trait
logdiff

logdiff
print.coloc_abf

print.coloc_abf
plot_dataset

plot a coloc dataset
map_cond

find the next most significant SNP, conditioning on a list of sigsnps
subset_dataset

subset_dataset
findpeaks

trim a dataset to only peak(s)
finemap.abf

Bayesian finemapping analysis
findends

trim a dataset to central peak(s)
find.best.signal

Pick out snp with most extreme Z score
sdY.est

Estimate trait variance, internal function
sensitivity

Prior sensitivity for coloc
process.dataset

process.dataset
runsusie

Run susie on a single coloc-structured dataset
finemap.signals

Finemap multiple signals in a single dataset
map_mask

find the next most significant SNP, masking a list of sigsnps
plot.coloc_abf

plot a coloc_abf object
check_alignment

check alignment
approx.bf.p

Internal function, approx.bf.p
bin2lin

binomial to linear regression conversion
annotate_susie

annotate susie_rss output for use with coloc_susie
approx.bf.estimates

Internal function, approx.bf.estimates
Var.data.cc

Var.data
coloc.abf

Fully Bayesian colocalisation analysis using Bayes Factors
coloc-package

Colocalisation tests of two genetic traits
check_dataset

check_dataset
Var.data

Var.data
coloc.process

Post process a coloc.details result using masking
combine.abf

combine.abf
coloc_test_data

Simulated data to use in testing and vignettes in the coloc package
coloc.susie

run coloc using susie to detect separate signals
coloc.susie_bf

run coloc using susie to detect separate signals
coloc.bf_bf

Coloc data through Bayes factors
coloc.detail

Bayesian colocalisation analysis with detailed output
est_cond

generate conditional summary stats
estgeno.1.ctl

estgeno1