Wonderful! I was trying live[Status] but alive[Prop] it was! Thank you!
Exclude Replaced or Discontinued UIDs from an reutils.esearch operation
Hi,
I'm using reutils to programmatically query NCBI's Gene database. Sometimes, I get multiple matches for a search (duh) and this list of results includes entries that have been discontinued or replaced (as shown in the Status filter on the Web UI below)

My question is:
How can I add a filter to my esearch call (or to the search term), so the search is restricted to only live/Current items? I can filter once I get the results when I make an esummary call, but can I do it at the esearch level?
My query term is UNQ6494[Gene Name] AND Homo sapiens[ORGN], and the r command is esearch(term="UNQ6494[Gene Name] AND Homo sapiens[ORGN]", db="gene")
Thank you!
• 2,064 views
•
link
1 answer
$ esearch -db gene -query "UNQ6494[Gene Name] AND Homo sapiens[ORGN] AND ALIVE[PROP]" | efetch -format acc
1. UNQ6494
uncharacterized LOC100129066 [Homo sapiens (human)]
Chromosome: 9; Location: 9q22.2
Annotation: Chromosome 9 NC_000009.12 (89639783..89719759)
ID: 100129066
• 1 views
•
link
• 1 views
•
link
Log in to answer this question.