This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get data from dbSNP in Java

I want to access dbSNP with Java and after collect the data.

I read this post and I did everything as explained but the function rs.getAssembly() always returns an empty list. I checked the link manually link and it has the assembly data. Is the problem in the connection?

dbsnp java

1 answer

it doesn't work anymore because the XML schema associated to dbSNp has changed since 2 years. The previous namespace/schema was

ftp://ftp.ncbi.nlm.nih.gov/snp/specs/docsum_3.3.xsd

and now the head of http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=snp&id=25&retmode=xml shows that it is now:

ftp://ftp.ncbi.nlm.nih.gov/snp/specs/docsum_eutils.xsd

$ xjc "ftp://ftp.ncbi.nlm.nih.gov/snp/specs/docsum_eutils.xsd"
parsing a schema...
compiling a schema...
https/www_ncbi_nlm_nih_gov/snp/docsum/Assay.java
https/www_ncbi_nlm_nih_gov/snp/docsum/Assembly.java
https/www_ncbi_nlm_nih_gov/snp/docsum/BaseURL.java
https/www_ncbi_nlm_nih_gov/snp/docsum/Component.java
https/www_ncbi_nlm_nih_gov/snp/docsum/ExchangeSet.java
https/www_ncbi_nlm_nih_gov/snp/docsum/FxnSet.java
https/www_ncbi_nlm_nih_gov/snp/docsum/MapLoc.java
https/www_ncbi_nlm_nih_gov/snp/docsum/ObjectFactory.java
https/www_ncbi_nlm_nih_gov/snp/docsum/PrimarySequence.java
https/www_ncbi_nlm_nih_gov/snp/docsum/Rs.java
https/www_ncbi_nlm_nih_gov/snp/docsum/RsLinkout.java
https/www_ncbi_nlm_nih_gov/snp/docsum/RsStruct.java
https/www_ncbi_nlm_nih_gov/snp/docsum/Ss.java
https/www_ncbi_nlm_nih_gov/snp/docsum/package-info.java

I don't have the time to check if the previous java code is affected.

Log in to answer this question.