coords_to_rsids: Get RSIDS from SNP coordinates

View source: R/coords_to_rsids.R

coords_to_rsidsR Documentation

Get RSIDS from SNP coordinates

Description

Get RSIDS from SNP coordinates using Bioconductor genome references.

Usage

coords_to_rsids(
  dat,
  genome_build = "hg19",
  drop_unannotated = TRUE,
  drop_duplicates = TRUE,
  SNPname = "SNP",
  verbose = TRUE
)

Arguments

dat

data.table or data.frame with SNP positions in the columns CHR and POS. Extra columns are allowed.

genome_build

Which genome build dat is in (e.g. "hg19" or "hg38").

drop_unannotated

Drop SNPs that RSIDs couldn't be found for.

drop_duplicates

Drop any duplicate SNPs rows.

SNPname

Name of the new column with RSIDs.

verbose

Print messages.

Value

data.table with new columns for RSIDs.

Examples

dat <- echodata::BST1[seq(5),]
data.table::setnames(dat,"SNP","SNP_old")
dat_annot <- coords_to_rsids(dat = dat)

RajLabMSSM/echodata documentation built on Nov. 21, 2023, 8 a.m.