문제

I currently have the following code which queries pubmed:

from Bio import Entrez
Entrez.email = "kuharrw@hiram.edu"     # Always tell NCBI who you are
handle = Entrez.esearch(db="pubmed", term="bacteria")
record = Entrez.read(handle)
list = record["IdList"]
print len(list)
for index in range(0, len(list)):
    listId = list[index]
    handle = Entrez.esummary(db="pubmed", id=listId)
    record = Entrez.read(handle)
    print index
    print record[0]["Title"]
    print record[0]["HasAbstract"]

This code is able to tell me if the article has an abstract but I can't find any documentation on how to actually return the abstract. Is it possible using biopython? if it isn't is there another way?

도움이 되었습니까?

해결책

Yes, it's obviously possible using BioPython. If you follow exactly this section, you should be able to get the abstract from pubmed: http://www.biopython.org/DIST/docs/tutorial/Tutorial.html#sec142

If you don't find this link helpful, please let me know. I will get back to you soon.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top