Entering edit mode
5.4 years ago
maxininfa
•
0
Hi,
I want to make a seach using Biopython's Entrez API, i have the following code:
handle = Entrez.esearch(db='pubmed',
sort='relevance',
retmax='20',
retmode='xml',
term=name+" AND "+nombre)
That works fine, but if I try to add a filter, such as "has abstract"[FILT] like this:
term=name+" AND "+nombre+" AND has abstract"[FILT])
I get an error.
The syntax seems "fine" both pubmed's and python's. But maybe I'm awfully wrong, can you help? Thanks!!
Just in case (running python):
Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio import Entrez
>>> Entrez.email = 'myemail@bla.com'
>>> handle = Entrez.einfo(db="pubmed")
>>> record = Entrez.read(handle)
>>> record["DbInfo"].keys()
[u'Count', u'LastUpdate', u'MenuName', u'Description', u'LinkList', u'DbBuild', u'FieldList', u'DbName']
>>> for field in record["DbInfo"]["FieldList"]:
... print("%(Name)s, %(FullName)s, %(Description)s" % field)
...
ALL, All Fields, All terms from all searchable fields
UID, UID, Unique number assigned to publication
FILT, Filter, Limits the records
.
.
.
so FILT looks like the appropriate Key, right?
Seems you are right! Thx!!!