Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

coloc.abf

Fully Bayesian colocalisation analysis using Bayes Factors


Description

Bayesian colocalisation analysis

Usage

coloc.abf(dataset1, dataset2, MAF = NULL, p1 = 1e-04, p2 = 1e-04,
  p12 = 1e-05)

Arguments

dataset1

a list with the following elements

pvalues

P-values for each SNP in dataset 1

N

Number of samples in dataset 1

MAF

minor allele frequency of the variants

beta

regression coefficient for each SNP from dataset 1

varbeta

variance of beta

type

the type of data in dataset 1 - either "quant" or "cc" to denote quantitative or case-control

s

for a case control dataset, the proportion of samples in dataset 1 that are cases

sdY

for a quantitative trait, the population standard deviation of the trait. if not given, it can be estimated from the vectors of varbeta and MAF

snp

a character vector of snp ids, optional. If present, it will be used to merge dataset1 and dataset2. Otherwise, the function assumes dataset1 and dataset2 contain results for the same SNPs in the same order.

Some of these items may be missing, but you must give

  • alwaystype

  • if type=="cc"s

  • if type=="quant" and sdY knownsdY

  • if type=="quant" and sdY unknownbeta, varbeta, N, MAF and then either

  • pvalues, MAF

  • beta, varbeta

dataset2

as above, for dataset 2

MAF

Common minor allele frequency vector to be used for both dataset1 and dataset2, a shorthand for supplying the same vector as parts of both datasets

p1

prior probability a SNP is associated with trait 1, default 1e-4

p2

prior probability a SNP is associated with trait 2, default 1e-4

p12

prior probability a SNP is associated with both traits, default 1e-5

Details

This function calculates posterior probabilities of different causal variant configurations under the assumption of a single causal variant for each trait.

If regression coefficients and variances are available, it calculates Bayes factors for association at each SNP. If only p values are available, it uses an approximation that depends on the SNP's MAF and ignores any uncertainty in imputation. Regression coefficients should be used if available.

Value

a list of two data.frames:

  • summary is a vector giving the number of SNPs analysed, and the posterior probabilities of H0 (no causal variant), H1 (causal variant for trait 1 only), H2 (causal variant for trait 2 only), H3 (two distinct causal variants) and H4 (one common causal variant)

  • results is an annotated version of the input data containing log Approximate Bayes Factors and intermediate calculations, and the posterior probability SNP.PP.H4 of the SNP being causal for the shared signal

Author(s)

Claudia Giambartolomei, Chris Wallace


coloc

Colocalisation Tests of Two Genetic Traits

v3.2-1
GPL
Authors
Chris Wallace [aut, cre], Claudia Giambartolomei [aut], Vincent Plagnol [ctb]
Initial release
2019-05-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.