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:
determine_build
- Lookup build against a selected number of HM3 SNPs, matching by rsiddetermine_build_position
- Lookup build against a selected number of HM3 SNPs, matching by chromosome and positiondetermine_build_biomart
- Lookup positions on biomaRtThe 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" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.