is_snp: Determine if the string is a SNP in HGVS sequence

View source: R/is_snp.R

is_snpR Documentation

Determine if the string is a SNP in HGVS sequence

Description

Determine if the string is a SNP in HGVS sequence

Usage

is_snp(s)

Arguments

s

string in HVGS format to be parsed, for example, NP_000585.2:p.Gly144Asp

Examples

# These are SNPs
is_snp("NP_001771.1:p.Ser91Pro")
is_snp("NP_001254627.1:p.Val237Met")
is_snp("NP_055635.3:p.Ala55Gly")
# Also a mutation at the terminator is a SNP
is_snp("NP_005124.1:p.Ter330Cys")

# A synonymous mutation at the DNA level is no SNP
is_snp(s = "NP_001771.1:p.Phe89=")

# A deletion is no SNP
is_snp("NP_001771.1:p.Leu64_Gly74del")

# A frame shift at the DNA level is no SNP
is_snp("NP_001771.1:p.Asp167fs")

richelbilderbeek/ncbi documentation built on July 9, 2023, 3:51 a.m.