read_outcome: Read outcomes

View source: R/data_loading.r

read_outcomeR Documentation

Read outcomes

Description

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

Usage

read_outcome(
  ids,
  rsids,
  proxies = TRUE,
  proxy_rsq = 0.8,
  proxy_kb = 5000,
  proxy_nsnp = 5000,
  plink = NULL,
  bfile = NULL,
  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

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)

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 outcome datasets


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