fixed skip on cran usage in new tests.
This package gives you access to data from OpenSNP and NCBI’s dbSNP SNP database.
rsnps used to be ropensnp
rsnps
ropensnp
This set of functions/package accesses data from:
allgensnp()
allphenotypes()
annotations()
download_users()
fetch_genotypes()
genotypes()
phenotypes()
phenotypes_byid()
users()
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)
#> # A tibble: 4 × 16 #> query chromosome bp class rsid gene alleles ancestral_allele #> <chr> <chr> <dbl> <chr> <chr> <chr> <chr> <chr> #> 1 rs332 7 117559593 del rs1219… "CFT… TTT, d… TTT #> 2 rs420358 1 40341239 snv rs4203… "" A,C,G,T A #> 3 rs1837253 5 111066174 snv rs1837… "" T,C T #> 4 rs1209415715 9 41782316 snv rs1209… "" T,A,C T #> # ℹ 8 more variables: variation_allele <chr>, seqname <chr>, hgvs <chr>, #> # assembly <chr>, ref_seq <chr>, minor <chr>, maf <dbl>, #> # maf_population <list>
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.
?rsnps
genotypes() function
genotypes('rs9939609', userid='1,6,8', df=TRUE)
#> snp_name snp_chromosome snp_position user_name user_id #> 1 rs9939609 16 53786615 Bastian Greshake Tzovaras 1 #> 2 rs9939609 16 53786615 Nash Parovoz 6 #> 3 rs9939609 16 53786615 Samantha B. Clark 8 #> genotype_id genotype #> 1 9 AT #> 2 5 AT #> 3 2 TT
phenotypes() function
out <- phenotypes(userid=1) out$phenotypesNSCCN/r-rsnps:用于从多个公共数据库(如NCBI、OpenSNP)获取和解析单核苷酸多态性(SNP)数据的R包Hair Type`
#> $phenotype_id #> [1] 16 #> #> $variation #> [1] "straight"
For more detail, see the vignette: rsnps tutorial.
rsnsps
citation(package = 'rsnps')
用于从多个公共数据库(如NCBI、OpenSNP)获取和解析单核苷酸多态性(SNP)数据的R包
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
rsnps
This package gives you access to data from OpenSNP and NCBI’s dbSNP SNP database.
NOTE
rsnpsused to beropensnpData sources
This set of functions/package accesses data from:
allgensnp(),allphenotypes(),annotations(),download_users(),fetch_genotypes(),genotypes(),phenotypes(),phenotypes_byid(),users()ncbi_snp_query()Install
Install from CRAN
Or dev version
Usage
NCBI dbSNP data
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()functionphenotypes()functionFor more detail, see the vignette: rsnps tutorial.
Meta
rsnspsin R doingcitation(package = 'rsnps')