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"
)
#> Using rsid
#> Lifting build: 37 to 38
#> Loading chainfile
#> Converting chromosome codings
#> Organising
#> Lifting
#> Organising again
#> Reordering
#> Removing duplicates
#> Done