[Biopython] Querying NCBI

Michael S. Koeris michael.koeris at gmail.com
Fri Oct 23 13:11:45 UTC 2009


I am submitting 80 single queries - alternatively i can batch them but  
then when I try to parse them out from the records object I get:

 >>> records
<addinfourl at 24146048 whose fp = <socket._fileobject object at  
0x12bc8f0>>

I don't know if this is a different object because it's batched

 >>> parser = GenBank.RecordParser()
 >>> recordGenBank = parser.parse(records)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/Bio/GenBank/__init__.py", line 172, in parse
     self._scanner.feed(handle, self._consumer)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/Bio/GenBank/Scanner.py", line 380, in feed
     misc_lines, sequence_string = self.parse_footer()
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/Bio/GenBank/Scanner.py", line 762, in  
parse_footer
     raise ValueError("Premature end of file in sequence data")
ValueError: Premature end of file in sequence data



--
Michael S. Koeris
michael.koeris at gmail.com

On Oct 23, 2009, at 5:08 AM, Peter wrote:

> On Fri, Oct 23, 2009 at 1:56 AM, Michael S. Koeris
> <michael.koeris at gmail.com> wrote:
>> I don't know if it's the servers today but when I ran this query as a
>> regular efetch with 80+ gi numbers it ran for 30+min before i  
>> stopped it
>>
>> handle = Entrez.efetch(db='nucleotide',id=AccNo,rettype='gb')
>>
>> anyone else experiencing problems?
>
> I was asleep, so no ;)
>
> Are you sending one single efetch call with 80+ GI numbers, or
> are your sending 80+ individual efetch calls, or something in
> between? That may make a difference.
>
>> I also noted that my outbound packet rate dropped to about 4kbp
>
> That suggests a local network issue.
>
> Did you include your email address as the NCBI request?
> If they have blocked or throttled your access (if they felt it
> was excessive), I would expect them to email you about it.
>
> Peter




More information about the Biopython mailing list