Pubmed API: What are systemID and publicID?

조회 수: 21 (최근 30일)
Jessie Poquerusse
Jessie Poquerusse 2016년 12월 17일
답변: Robert Snoeberger 2017년 6월 28일
The Matlab script I'd written in April 2016 to interface with the Pubmed API to automatically extract a bunch of gene info is no longer working. Something about needing both a SystemID and PublicID. Any ideas?
Simplified version of the code:
baseSearchURL = ['http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed'];
gene = 'pten';
termOptTOTAL = ['&term=', gene]; 
searchURL = [baseSearchURL,termOptTOTAL];
Full error message:
[Fatal Error] esearch.fcgi?db=pubmed&term=pten:1:50: White spaces are required between publicId and systemId.
Error using xmlread (line 97)
Java exception occurred:
org.xml.sax.SAXParseException; systemId: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=pten; lineNumber:
1; columnNumber: 50; White spaces are required between publicId and systemId.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)

답변 (2개)

Star Strider
Star Strider 2016년 12월 17일
I use PubMed frequently, but not to do what you’re doing. When I plugged ‘http://eutils.ncbi.nlm.nih.gov/entrez/eutils/’ into the URL bar, I got ‘Page has moved here’ and was vectored to Entrez Programming Utilities Help. You might see if that page has the information you need.

Robert Snoeberger
Robert Snoeberger 2017년 6월 28일
It is possible to avoid XML by using webread and setting the retmode parameter to 'json'. JSON is easier to work with because webread will parse it and give you a struct.
Example:
>> result = webread('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi','db','pubmed','term','pten','retmode','json')
result =
struct with fields:
header: [1×1 struct]
esearchresult: [1×1 struct]
>>
You can find some information about the retmode parameter in [1].
  1. https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch

카테고리

Help CenterFile Exchange에서 JSON Format에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by