This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Some SNP XML document not available via an eutils query

Why are some XML documents available using a SNP query, and others are not?

For the first time today, I came across a SNP eutils search that did not return an XML:

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=snp&id=13422&report=XML

Whereas other searches return XMLs just fine:

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=snp&id=3000&report=XML

snp xml eutils

I submitted a bug report to NCBI; I'll update this post when I get an answer.

FYI, I also tried executing this in R using the 'rentrez' package and the function 'entrez_fetch'; perhaps unsurprisingly, same result (see below).

entrez_fetch(db="snp", id = 13422, web_history = NULL, rettype = "FASTA", retmode = "XML",parsed = FALSE, config = NULL)

[1] "\n<ExchangeSet xmlns:xsi="\"&lt;a" href="https://www.w3.org/2001/XMLSchema-instance" rel="nofollow">https://www.w3.org/2001/XMLSchema-instance\" xmlns=\"https://www.ncbi.nlm.nih.gov/SNP/docsum\" xsi:schemaLocation=\"https://www.ncbi.nlm.nih.gov/SNP/docsum ftp://ftp.ncbi.nlm.nih.gov/snp/specs/docsum_eutils.xsd\" >\n</ExchangeSet>"

The reply from the NBCI help esk:

Thanks for reporting this to us.

I did reproduce this, but I am not quite sure the underlying cost. Given that the SNP database is in a transitioning phase (both in workflow and web presentation), I am not quite sure how the API support through EUtils is to be carried over. I will need to get some clarification from the group.

You can take a look at the new web presentation and the API link there to see the API provided json blobs: https://www.ncbi.nlm.nih.gov/snp/rs13422

You can use the Feedback button to provide your comments/input to the group directly.

1 answer

I did not notice previously the 'API' link in the new dbSNP view:

https://www.ncbi.nlm.nih.gov/snp/rs13422

When you click on this link, it give the new API form:

https://api.ncbi.nlm.nih.gov/variation/v0/beta/refsnp/13422

This returns information on the SNP as a JSON blob.

It is unclear to me if it is a long-term plan for dbSNP to transition-away from making its data accessible via efetch and eutils, but they are supplying this alternative API, and it's quite nice.

Log in to answer this question.