Get RSIDS from SNP coordinates using Bioconductor genome references.
coords_to_rsids(
dat,
genome_build = "hg19",
drop_unannotated = TRUE,
drop_duplicates = TRUE,
SNPname = "SNP",
verbose = TRUE
)
data.table or
data.frame with SNP positions in the columns
CHR
and POS
. Extra columns are allowed.
Which genome build dat
is in
(e.g. "hg19" or "hg38").
Drop SNPs that RSIDs couldn't be found for.
Drop any duplicate SNPs rows.
Name of the new column with RSIDs.
Print messages.
data.table with new columns for RSIDs.
dat <- echodata::BST1[seq(5),]
data.table::setnames(dat,"SNP","SNP_old")
dat_annot <- coords_to_rsids(dat = dat)
#> Searching for RSIDs using: hg19
#> Loading required namespace: SNPlocs.Hsapiens.dbSNP144.GRCh37
#> Warning: replacing previous import ‘utils::findMatches’ by ‘S4Vectors::findMatches’ when loading ‘SNPlocs.Hsapiens.dbSNP144.GRCh37’
#> 5 / 5 SNPs annotated with RSIDs.