This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MESH terms for list of pubmed IDs

I have a list of pubmed IDs and am trying to use literally any tool to access any 1) paper authors 2) date of publication and 3) MESH terms (or other identifying characteristics, e.g. field of study etc) for each paper. Ideally would end up with everything in csv or JSON format, but I'll take whatever.

Looking here (How do I get full text AND MeSH terms from Entrez on the PMC database in biopython?) but having a hard time reproducing the solution. Can anyone out there assist? Been playing with biopython entrez library but having limited luck. Example code to get list of 10 random IDs:

get list of IDs

def search(query):
Entrez.email = 'your.email@example.com'
handle = Entrez.esearch(db='pubmed', 
                        sort='relevance', 
                        retmax='10',
                        retmode='xml', 
                        term=query)
results = Entrez.read(handle)
return(results)

id_list = search('infectious disease')

mesh terms text mining pubmed esearch entrez

1 answer

If you have a lot of pubmed IDs, maybe you can consider downloading all available pubmed data from ftp://ftp.ncbi.nlm.nih.gov/pubmed/baseline. It's a really huge directory, but every pmid and their annotation (author, citation, MeSH, title, etc ...) are in.

Hope it helps !

This is magnificent, thank you so much.

Log in to answer this question.