sorgerlab / indra

INDRA (Integrated Network and Dynamical Reasoning Assembler) is an automated model assembly system interfacing with NLP systems and databases to collect knowledge, and through a process of assembly, produce causal graphs and dynamical models.
http://indra.bio
BSD 2-Clause "Simplified" License
177 stars 68 forks source link

New function: Get Substance MeSH ID's for given PMID #1357

Closed samuelbunga closed 2 years ago

samuelbunga commented 2 years ago

This PR consists of a new function to the pubmed_client module. It takes PubMed ID as an input and returns back a list of substance MeSH ID as an output.

from indra.literature.pubmed_client import get_substance_mesh_id
mesh_ids = get_substance_mesh_id('27959613')
Out[4]: 
['D009570',
 'D010879',
 'D047428',
 'D011725',
 'D011960',
 'D014230',
 'D000077289',
 'D018844',
 'C500026']
bgyori commented 2 years ago

@samuelbunga thanks, looks good! But this function should rather be in indra.literature.pubmed_client. Could you move it there?

samuelbunga commented 2 years ago

@samuelbunga thanks, looks good! But this function should rather be in indra.literature.pubmed_client. Could you move it there?

Sure @bgyori I will move it. Thanks!