NCBI search with ENTREZ biopython last refseq version tag
1
0
Entering edit mode
15 months ago

Hi! I'm trying to deal with ncbi research and reproduce it in ENTREZ through biopython.

This is my NCBI query : "Microbacterium"[Organism] AND "latest refseq"[filter] AND (all[filter] NOT partial[filter])

i then tried to reproduce it in biopython with :

query = "Microbacterium[Organism] AND latest refseq[Filter] NOT partial[filter]) " 
handle = Entrez.esearch(term=query, db="Assembly", retmax=900) 
ids = Entrez.read(handle)["IdList"] 
ids  
[]

if i'm trying with :

query = "Microbacterium[Organism] AND latest[Filter]"
handle = Entrez.esearch(term=query, db="Assembly", retmax=900)
ids = Entrez.read(handle)["IdList"]
len(ids) 
693

which is better but i still need the refseq version.. i don't understand what is the problem here. how can i add the tag of the refseq or genbank choice? thanks for your help!

ncbi biopython • 588 views
ADD COMMENT
1
Entering edit mode
15 months ago
vkkodali_ncbi ★ 3.7k

Try latest_refseq instead of latest refseq. Or, use quotes for it, like this: 'Microbacterium[Organism] AND "latest refseq"[Filter] NOT partial[filter])'. Apparently it matters which quotes are used where: use single quotes for the query and double quotes for Entrez terms that have spaces.

ADD COMMENT
0
Entering edit mode

ohh thanks, it was so simple.. i tried with double quote but it wasn't working.. thanks a lot you saved my day!

ADD REPLY

Login before adding your answer.

Traffic: 1536 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6