Extracts one or more SNPs from each signal cluster based on the posterior estimate of the effect size for A (largest effect size in the positive direction). After running this function, it is recommended to use trimClusters to remove signal clusters that are too highly correlated.

extractForSlope(
  res,
  niter = 0,
  plot = TRUE,
  label = "Effect size of",
  a = "eQTL",
  b = "GWAS"
)

Arguments

res

list with the following named elements:

  • beta_hat_a - list of point estimates of coefficients for A from colocalization

  • beta_hat_b - " " for B

  • sd_a - list of sampling SD for beta_hat_a (in practice original SE are provided here)

  • sd_b - " " for beta_hat_b " "

  • alleles (optional) list of data.frame with allele information

niter

number of iterations of EM to run for mclust, if set to 0, only the maximum variant (in terms of A effect size) per signal cluster is output. Default is to not run clustering, but to take the SNP with the largest effect size in A (in the positive direction)

plot

logical, draw a before after of which variants will be included for slope estimation

label

what preceeds a and b in the x- and y-axis labels

a

name of A experiment

b

name of B experiment

Value

list of vectors of the first four arguments, collapsed now across signal clusters, representing variants with positive effect on A. So the null variants have been removed (and any variants per cluster that indicated a negative effect on A). If alleles

data.frames were included in the input, they will also be passed through as a single data.frame with the selected SNPs per signal cluster