If MAF column is missing, download MAF from UK Biobank and use that instead.

get_UKB_MAF(
  dat,
  output_path = file.path(tempdir(), "Data/Reference/UKB_MAF"),
  force_new_maf = FALSE,
  download_method = "axel",
  nThread = 1,
  verbose = TRUE,
  conda_env = "echoR"
)

Arguments

dat

SNP-level data.

output_path

Path to store UKB_MAF file in.

force_new_maf

Download UKB_MAF file again.

download_method
  • "axel" : Multi-threaded

  • "wget" : Single-threaded

  • "download.file" : Single-threaded

  • "internal" : Single-threaded (passed to download.file)

  • "wininet" : Single-threaded (passed to download.file)

  • "libcurl" : Single-threaded (passed to download.file)

  • "curl" : Single-threaded (passed to download.file)

or "download.file" (single-threaded) .

nThread

Number of threads to parallelize over.

verbose

Print messages.

conda_env

Conda environment to use.

Source

UKB

Examples

data("BST1") dat <- data.frame(BST1)[, colnames(BST1) != "MAF"] BST1 <- get_UKB_MAF(dat = dat)
#> UKB MAF:: Extracting MAF from UKB reference.
#> Downloading with axel (using 1 cores).
#> + CONDA:: Identified axel executable in echoR env.
#> Time difference of 7.97836 secs