Collections:
Search for Related Items in NCBI with Bio.Entrez.elink()
How to Search for Related Items in NCBI with Bio.Entrez.elink() function?
✍: FYIcenter.com
Bio.Entrez.elink() function allows you to find related items in a NCBI database for a given record. It uses the Entrez Web services provided by www.ncbi.nlm.nih.gov.
Here is an example on how to find related items with the Bio.Entrez.efetch() function.
fyicenter$ python >>> from Bio import Entrez >>> Entrez.email = "A.N.Other@example.com" >>> handle = Entrez.elink(db="pubmed", id="19304878") >>> record = Entrez.read(handle) >>> len(record) 1 >>> record[0]["DbFrom"] 'pubmed' >>> record[0]["IdList"] ['19304878'] >>> len(record[0]["LinkSetDb"]) 8 >>> len(record[0]["LinkSetDb"]) 8 >>> for linksetdb in record[0]["LinkSetDb"]: ... print(linksetdb["DbTo"], linksetdb["LinkName"], len(linksetdb["Link"])) pubmed pubmed_pubmed 195 pubmed pubmed_pubmed_alsoviewed 36 pubmed pubmed_pubmed_citedin 1640 pubmed pubmed_pubmed_combined 6 pubmed pubmed_pubmed_five 6 pubmed pubmed_pubmed_refs 17 pubmed pubmed_pubmed_reviews 17 pubmed pubmed_pubmed_reviews_five 9
Get a list of those 17 PubMed IDs referenced by the given article found in pubmed_pubmed_refs database.
>>> ids = record[0]["LinkSetDb"][5]["Link"] >>> ids [{'Id': '21585727'}, {'Id': '18689808'}, {'Id': '17562476'}, {'Id': '17202161'}, {'Id': '17148479'}, {'Id': '17142230'}, {'Id': '16381881'}, {'Id': '16377612'}, {'Id': '15117750'}, {'Id': '14871861'}, {'Id': '14681378'}, {'Id': '14630660'}, {'Id': '12368254'}, {'Id': '11975335'}, {'Id': '10827456'}, {'Id': '7984417'}, {'Id': '3162770'}]
⇒ Global Query on All NCBI Databases with Bio.Entrez.egquery()
⇐ Fetch Sequences from NCBI with Bio.Entrez.efetch()
2023-08-25, 407🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1006497 Names: InChIKey: LJPCBEWTALOSFV-UHFFFAOYS A-NSMILES: O=C4COc1c(ccc...
Molecule Summary: ID: FYI-1004772 Names: InChIKey: CEHRXGZEXGZQPZ-WDFWOJRIS A-NSMILES: Cc2cc(/C(N)=N...
What are SMARTS expressions? SMARTS expressions are divided into 3 types: 1. Atom Expressions - An e...
Molecule Summary: ID: FYI-1003449 Names: InChIKey: WXNXCEHXYPACJF-ZETCQYMHS A-NSMILES: CC(=O)N[C@@H]...
Molecule Summary: ID: FYI-1006524 Names: InChIKey: OCKPCBLVNKHBMX-UHFFFAOYS A-NSMILES: CCCCc1ccccc1 ...