rsnps

knitr::opts_chunk$set(
  warning=FALSE,
  message=FALSE,
  comment="#>"
)

R build status Build status Codecov test coverage cran version rstudio mirror downloads

This package gives you access to data from OpenSNP and NCBI's dbSNP SNP database.

NOTE

rsnps used to be ropensnp

Data sources

This set of functions/package accesses data from:

Install

Install from CRAN

install.packages("rsnps")

Or dev version

install.packages("remotes")
remotes::install_github("ropensci/rsnps")
library("rsnps")

Usage

NCBI dbSNP data

snps <- c("rs332", "rs420358", "rs1837253", "rs1209415715", "rs111068718")
ncbi_snp_query(snps)

The ncbi_snp_query() function can be used with an NCBI API which gives access higher numbers of API requests per second. More information about setting this up can be found in the package help accessed via ?rsnps.

openSNP data

genotypes() function

genotypes('rs9939609', userid='1,6,8', df=TRUE)

phenotypes() function

out <- phenotypes(userid=1)
out$phenotypes$`Hair Type`

For more detail, see the vignette: rsnps tutorial.

Meta

ropensci_footer



ropensci/rsnps documentation built on July 31, 2023, 11:11 a.m.