extract_instruments: Find instruments for use in MR from the MR Base database

View source: R/instruments.R

extract_instrumentsR Documentation

Find instruments for use in MR from the MR Base database

Description

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 = TRUE,
  p2 = 5e-08,
  r2 = 0.001,
  kb = 10000,
  access_token = ieugwasr::check_access_token(),
  force_server = FALSE
)

Arguments

outcomes

Array of outcome IDs (see available_outcomes()).

p1

Significance threshold. The default is 5e-8.

clump

Logical; whether to clump results. The default is TRUE.

p2

Secondary clumping threshold. The default is 5e-8.

r2

Clumping r2 cut off. The default is 0.001.

kb

Clumping distance cutoff. The default is 10000.

access_token

Google OAuth2 access token. Used to authenticate level of access to data. The default is ieugwasr::check_access_token().

force_server

Force the analysis to extract results from the server rather than the MRInstruments package.

Value

data frame


MRCIEU/TwoSampleMR documentation built on March 26, 2024, 6:11 a.m.