Retreive associated DOI from PDB
3
0
Entering edit mode
7.0 years ago
Joe 21k

Does anyone know if it's possible (and if so how) to obtain a DOI number associated with a PDB ID, through a script - preferably in python.

The idea is this:

  1. Existing script trawls HMMs, returns a closest PDB ID match.
  2. Results of script in 1 are tabulated by my own script.
  3. For each PDB hit that's returned, I'd like to 'look up' the DOI of the paper responsible for depositing it, and append that DOI to the end of the line in the table.

Cheers

PDB python doi • 1.6k views
ADD COMMENT
4
Entering edit mode
7.0 years ago
emmahe ▴ 40

Check out the PDBe REST API: http://www.ebi.ac.uk/pdbe/api/doc/

Simple python example:

import requests

res = requests.get("https://www.ebi.ac.uk/pdbe/api/pdb/entry/publications/5m98")
data = res.json()

print(data["5m98"][0]['doi'])
ADD COMMENT
0
Entering edit mode

Oh perfect, thanks very much! Python continues to amaze.

ADD REPLY
2
1
Entering edit mode

Interesting, this was the approach a colleague suggested, I'll give it a go!

ADD REPLY
0
Entering edit mode

Thanks Pierre, the following worked for me:

esearch -db pubmed -query "4MIX" | esummary | xtract -pattern DocumentSummary -block ArticleId -sep "\t" -tab "\n" -element IdType,Value | grep doi | cut -f 2
ADD REPLY
0
Entering edit mode

I'm surprised you didn't choose genomax2's answer

ADD REPLY
0
Entering edit mode

My experience with XML and web querying is pretty limited so chose the path of least resistance!

ADD REPLY
0
Entering edit mode

using a xsltstylesheet:


<xsl:stylesheet xmlns:xsl="&lt;a href=" <a="" href="http://www.w3.org/1999/XSL/Transform" rel="nofollow">http://www.w3.org/1999/XSL/Transform" "="" rel="nofollow">http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="dataset/record"/>
</xsl:template>
<xsl:template match="record">
    <xsl:variable name="acn" select="dimStructure.structureId/text()"/>
    <xsl:for-each select="dimStructure.doi">
        <xsl:value-of select="$acn"/>
        <xsl:text> </xsl:text>
        <xsl:value-of select="./text()"/>
        <xsl:text>
</xsl:text>
    </xsl:for-each>
</xsl:template>
</xsl:stylesheet>

execute:

curl -s  'http://www.rcsb.org/pdb/rest/customReport.xml?pdbids=1stp,2jef,1cdg&customReportColumns=structureId,doi&primaryOnly=1' |\
xsltproc stylesheet.xsl -

1STP null
2JEF 10.1074/jbc.M700656200
1CDG 10.1006/jmbi.1994.1168
ADD REPLY
2
Entering edit mode
7.0 years ago
GenoMax 141k

See the example 2 for PDB API here.

ADD COMMENT

Login before adding your answer.

Traffic: 2822 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6