dot-read_dataset: Read datasets

.read_datasetR Documentation

Read datasets

Description

Helper function that is called from read_exposure and read_outcome. Extracts exposure and outcome data according to arguments. Should not be called directly.

Usage

.read_dataset(
  ids,
  rsids = NULL,
  pval = 5e-08,
  proxies = TRUE,
  proxy_rsq = 0.8,
  proxy_kb = 5000,
  proxy_nsnp = 5000,
  plink = NULL,
  bfile = NULL,
  clump_r2 = 0.01,
  clump_kb = 10000,
  pop = "EUR",
  type = "exposure",
  cores = 1,
  cores_proxy = 1,
  verbose = TRUE
)

Arguments

ids

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

rsids

List of SNP rsIDs to extract

pval

Threshold to extract SNPs (Optional)

proxies

Whether to search for proxies (Optional, boolean)

proxy_rsq

R2 threshold to use when searching for proxies (Optional)

proxy_kb

kb threshold to use when searching for proxies (Optional)

proxy_nsnp

Number of SNPs when searching for proxies (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)

type

Type of data (Optional, "exposure" or "outcome")

cores

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

cores_proxy

Number of cores for multi-threaded proxy searching (Optional) NB: Unavailable on Windows machines NB: Should not be more than 'cores' argument!

verbose

Display verbose information (Optional, boolean)

Value

Data.frame of datasets

See Also

[read_exposure()], [read_outcome()]


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