read_exposure: Read exposures

View source: R/data_loading.r

read_exposureR Documentation

Read exposures

Description

Read a dataset (or datasets) as exposure. Can accept both OpenGWAS IDs or file paths. Accepts only gwasvcf file formats. This function can clump data locally, if supplied with the 'plink' and 'bfile' arguments. If these are not supplied, clumping will take place on the OpenGWAS servers only for OpenGWAS IDs. If you would like to clump local files, please provide paths to Plink and bfiles.

Usage

read_exposure(
  ids,
  pval = 5e-08,
  plink = NULL,
  bfile = NULL,
  clump_r2 = 0.01,
  clump_kb = 10000,
  pop = "EUR",
  cores = 1,
  verbose = TRUE
)

Arguments

ids

List of OpenGWAS IDs or file paths (to gwasvcf files)

pval

Threshold to extract SNPs (Optional)

plink

Path to Plink binary (Optional)

bfile

Path to Plink .bed/.bim/.fam files (Optional)

clump_r2

r2 threshold for clumping SNPs (Optional)

clump_kb

Distance outside of which SNPs are considered in linkage equilibrium (Optional)

pop

Population (Optional, used only for clumping on OpenGWAS)

cores

Number of cores for multi-threaded tasks (Optional) NB: Unavailable on Windows machines

verbose

Display verbose information (Optional, boolean)

Value

Data.frame of exposure datasets


jwr-git/mrpipeline documentation built on Oct. 2, 2022, 3:41 p.m.