[Biopython] Searching for and downloading sequences using the history
Carlos Javier Borroto
carlos.borroto at gmail.com
Fri Sep 18 16:59:58 UTC 2009
Hi all,
I'm trying to download all of the EST from a specie, I'm following the
example on the tutorial which seems to be exactly what I need. But I
running into this problem:
>>> from Bio import Entrez
>>> Entrez.email = "carlos.borroto at gmail.com"
>>> dbname = "nucest"
>>> query_term = "Genus specie"
>>> search_handle = Entrez.esearch(db=dbname,term=query_term,usehistory="y")
>>> search_results = Entrez.read(search_handle)
>>> search_handle.close()
>>> len(search_results["IdList"])
20
>>> print search_results["Count"]
193951
So the assert statement if failing:
>>> gi_list = search_results["IdList"]
>>> count = int(search_results["Count"])
>>> assert count == len(gi_list)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AssertionError
And most important I'm not getting all of the ids.
Did someone knows what I'm doing wrong?
thanks in advance
--
Carlos Javier Borroto
Baltimore, MD
Phone: (410) 929 4020
More information about the Biopython
mailing list