current_snp: Converts a SNP id to its current SNP id.

Description Usage Arguments Value

Description

refSNP(rs) evolve in time and may be merged to earlier reference ids. This function allows to resolve a SNP id to its current id. This function uses information provided in columns 1 and 7, i.e., rsHigh and rsCurrent, respectively, in file RsMergeArch.bcp.gz for Homo sapiens, from NCBI's dbSNP, build 149, Genome Reference Consortium 38, patch 7. Source data was originally downloaded from dbSNP ftp: RsMergeArch.bcp.gz.

Usage

1
current_snp(snps, mapping = FALSE, keep.orig.snp.if.not.merged = TRUE)

Arguments

snps

A numeric vector of SNP reference ids (without the 'rs').

mapping

If FALSE (default), return a vector of current ids; if TRUE, return a data frame with two columns,

keep.orig.snp.if.not.merged

If TRUE (default), the returned vector of current SNP ids will contain original SNP ids for those SNPs that were not found in the translation table, otherwise, NAs will be returned instead.

Value

Either a vector of current SNP ids or a data frame of original SNPs and current SNPs.


maialab/MergedSNPs.Hsapiens.dbSNP149.GRCh38p7 documentation built on Dec. 21, 2021, 1:43 p.m.