ncbi_snp_query: Query NCBI's refSNP for information on a set of SNPs via the...

Description Usage Arguments Details Value References Examples

View source: R/ncbi_snp_api.R

Description

This function queries NCBI's refSNP for information related to the latest dbSNP build and latest reference genome for information on the vector of snps submitted.

Usage

1

Arguments

snps

(character) A vector of SNPs (rs numbers).

Details

This function currently pulling data for Assembly 38 - in particular note that if you think the BP position is wrong, that you may be hoping for the BP position for a different Assembly.

Note that you are limited in the to a max of one query per second and concurrent queries are not allowed. If users want to set curl options when querying for the SNPs they can do so by using httr::set_config/httr::with_config

Value

A dataframe with columns:

References

https://www.ncbi.nlm.nih.gov/projects/SNP/

https://pubmed.ncbi.nlm.nih.gov/31738401/ SPDI model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
## an example with both merged SNPs, non-SNV SNPs, regular SNPs,
## SNPs not found, microsatellite
SNPs <- c("rs332", "rs420358", "rs1837253", "rs1209415715", "rs111068718")
ncbi_snp_query(SNPs)
# ncbi_snp_query("123456") ##invalid: must prefix with 'rs'
ncbi_snp_query("rs420358")
ncbi_snp_query("rs332") # warning that its merged into another, try that
ncbi_snp_query("rs121909001")
ncbi_snp_query("rs1837253")
ncbi_snp_query("rs1209415715")
ncbi_snp_query("rs111068718")
ncbi_snp_query(snps='rs9970807')

ncbi_snp_query("rs121909001")
ncbi_snp_query("rs121909001", verbose = TRUE)

## End(Not run)

rsnps documentation built on Jan. 28, 2022, 5:07 p.m.