knitr::opts_chunk$set( warning=FALSE, message=FALSE, comment="#>" )
This package gives you access to data from OpenSNP and NCBI's dbSNP SNP database.
rsnps
used to be ropensnp
This set of functions/package accesses data from:
openSNP.org
allgensnp()
, allphenotypes()
, annotations()
, download_users()
,
fetch_genotypes()
, genotypes()
, phenotypes()
, phenotypes_byid()
, users()
NCBI's dbSNP SNP database
ncbi_snp_query()
Install from CRAN
install.packages("rsnps")
Or dev version
install.packages("remotes") remotes::install_github("ropensci/rsnps")
library("rsnps")
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
.
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.
rsnsps
in R doing citation(package = 'rsnps')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.