Skip to contents

This function searches for GWAS significant SNPs (for a given p-value) for a specified set of outcomes. It then performs LD based clumping to return only independent significant associations.

Usage

extract_instruments(
  outcomes,
  p1 = 5e-08,
  clump = 1,
  r2 = 0.001,
  kb = 10000,
  opengwas_jwt = ieugwasr::get_opengwas_jwt(),
  force_server = FALSE
)

Arguments

outcomes

Array of outcome IDs (see available_outcomes()).

p1

Significance threshold. The default is 5e-8.

clump

Whether to clump results (1) or not (0). Default is 1. (TRUE and FALSE are also allowed for backwards compatibility.)

r2

Clumping r2 cut off. The default is 0.001.

kb

Clumping distance cutoff. The default is 10000.

opengwas_jwt

Used to authenticate protected endpoints. Login to https://api.opengwas.io to obtain a jwt. Provide the jwt string here, or store in .Renviron under the keyname OPENGWAS_JWT.

force_server

Whether to search through pre-clumped dataset or to re-extract and clump directly from the server. The default is FALSE.

Value

data frame