Skip to main content

Command line tool the takes one or a list of Pubmed IDs or DOIs, searches Pubmed for corresponding author affiliations and outputs the information to file

Command line options

-h, --help

Show help text

-i PUBMEDID, --pubmedid PUBMEDID

Search for author affiliations for single Pubmed ID

-d doi, --doi doi

Search for author affiliations for a single DOI

-f file, --infile file

File with a list of Pubmed IDs and DOIs (they can be mixed). One entry per line.

-x format, --format format

Output format. Choices=[‘json’ (default),’text’]. ‘text’ option produces tab separated table, denormalised in the sense that the pubmed ID/DOI is repeated on multiple rows if there are multiple authors with related affiliations.

Example runs

Pubmed input and JSON output:

python pubmedAuthorAffiliation.py -i 27863242

Output:

{'articleTitle': 'Decoding Mammalian Ribosome-mRNA States by Translational GTPase Complexes.', 'journalTitle': 'Cell', 'authorList': [{'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Shao', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK.', 'country': 'UK', 'initials': 'S'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Murray', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK.', 'country': 'UK', 'initials': 'J'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Brown', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK.', 'country': 'UK', 'initials': 'A'}, {'firstName': 'n/a', 'institute': 'University of California', 'lastName': 'Taunton', 'affiliation': 'Department of Cellular and Molecular Pharmacology, University of California, San Francisco, San Francisco, CA 94158, USA.', 'country': 'USA', 'initials': 'J'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Ramakrishnan', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK. Electronic address: ramak@mrc-lmb.cam.ac.uk.', 'country': 'UK', 'initials': 'V'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Hegde', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK. Electronic address: rhegde@mrc-lmb.cam.ac.uk.', 'country': 'UK', 'initials': 'RS'}], 'pubmedId': '27863242', 'error': False}
{'articleTitle': 'Decoding Mammalian Ribosome-mRNA States by Translational GTPase Complexes.', 'journalTitle': 'Cell', 'authorList': [{'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Shao', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK.', 'country': 'UK', 'initials': 'S'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Murray', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK.', 'country': 'UK', 'initials': 'J'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Brown', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK.', 'country': 'UK', 'initials': 'A'}, {'firstName': 'n/a', 'institute': 'University of California', 'lastName': 'Taunton', 'affiliation': 'Department of Cellular and Molecular Pharmacology, University of California, San Francisco, San Francisco, CA 94158, USA.', 'country': 'USA', 'initials': 'J'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Ramakrishnan', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK. Electronic address: ramak@mrc-lmb.cam.ac.uk.', 'country': 'UK', 'initials': 'V'}, {'firstName': 'n/a', 'institute': 'MRC-LMB', 'lastName': 'Hegde', 'affiliation': 'MRC-LMB, Francis Crick Avenue, Cambridge CB2 0QH, UK. Electronic address: rhegde@mrc-lmb.cam.ac.uk.', 'country': 'UK', 'initials': 'RS'}], 'pubmedId': '27863242', 'error': False}

DOI input and text output:

python pubmedAuthorAffiliation.py -d 10.1016/j.molcel.2016.11.013 -x text

Output:

27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     L       Tafur   European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany.  Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     Y       Sadian  European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany.  Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     NA      Hoffmann        European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany.  Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     AJ      Jakobi  European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany; European Molecular Biology Laboratory (EMBL), Hamburg Unit, Notkestrasse 85, 22607 Hamburg, Germany.     Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     R       Wetzel  European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany.  Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     WJH     Hagen   European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany.  Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     C       Sachse  European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany.  Germany European Molecular Biology Laboratory (EMBL)
27867008    Molecular cell  Molecular Structures of Transcribing RNA Polymerase I.  n/a     CW      Müller  European Molecular Biology Laboratory (EMBL), Structural and Computational Biology Unit, Meyerhofstrasse 1, 69117 Heidelberg, Germany. Electronic address: cmueller@embl.de.    Germany European Molecular Biology Laboratory (EMBL)

Input file with mixed DOI and Pubmed. Text output written to a file:

python pubmedAuthorAffiliation.py -f emdb-2010.txt -x text > /tmp/out.txt

In this case unrecognized lines are ignored, e.g.:

WARNING:root:processList: id not recognized: id

Code testing

This will go through lists of selected Pubmed and DOI known to work:

python test_pubmedAuthorAffiliation.py

Release files for pubmed-author-affiliation 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pubmed-author-affiliation 0.3
File Size Uploaded
pubmed-author-affiliation-0.3.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pubmed-author-affiliation 0.3
File Interpreter ABI Platform
pubmed_author_affiliation-0.3-py2-none-any.whl Python 2 none any Details

Total release size: 35.0 kB

Release files / pubmed-author-affiliation-0.3.tar.gz

Download URL pubmed-author-affiliation-0.3.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6b58f6574ab5ec0320854c5c69b08431c9b9a33f5cf67610bff9d3145494565f
BLAKE2b-256 checksum
How to use checksums
ecb25f2d5288f3f93441e65ee8c39364254f8f5d323c2732a88f4ee8dbaa270b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pubmed_author_affiliation-0.3-py2-none-any.whl

Download URL pubmed_author_affiliation-0.3-py2-none-any.whl
Size 19.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d3c46d00fe0d07286396fdda6ee3bb8c22c6ead639302c6ffcf0f7755069ab94
BLAKE2b-256 checksum
How to use checksums
628ab8a0d9d815edab7b186821c1139f5f85cfbc5a32d7b5c2da60e1c2f4ea18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page