if (!requireNamespace("R.utils", quietly = TRUE)) {
  message("Please install the R.utils package to run the code in this vignette")
}

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(GwasDataImport)
library(data.table)

There are three ways to determine the build of a dataset:

The liftover_gwas() function determines the build using each of those options, and then performs the liftover automatically.

filename <-
  system.file(package = "GwasDataImport", "extdata/pos_0002.txt.gz")
dat <- data.table::fread(filename)
a <-
  liftover_gwas(
    dat,
    to = 38,
    chr_col = "CHROM",
    pos_col = "POS",
    snp_col = "RSID",
    ea_col = "ALT",
    oa_col = "REF"
  )


MRCIEU/EbiDataImport documentation built on May 9, 2023, 6 a.m.