logo       

[BioPython] retrieve genbank record: msg#00032

python.bio.general

Subject: [BioPython] retrieve genbank record

Hello
I have not used that procedure for quite a long time, but I remember that for getting a particular genbank record, I could simply do the following :

/gb_acc='AB013427'
gi_list=GenBank.search_for(gb_acc)


/

This does not work anymore, although it works with plain text : the full exemple below
(done under windows & python 2.3, because I run onto some problems with install of biopython on my new mandrake10, hope to solve that prettysoon)
note 'Beta proteobacterium ML6' is the Organism line content corresponding to the acc number used thereafter.

I looked in the biopython threads, tried to do some changes, but could not find the solution ...
If anybody has a clues, I will be very happy, in the meantime, I guess that cgi will work :-)


########################################
from Bio import GenBank

gi_list = GenBank.search_for("Opuntia AND rpl16")
for i in gi_list:
print i
print '*'*30

gb_acc='Beta proteobacterium ML6'
gi_list=GenBank.search_for(gb_acc)
for i in gi_list:
print i
print '-'*30
gb_acc='AB013427'
gi_list=GenBank.search_for(gb_acc)
for i in gi_list:
print i


and the results :
>c:\python23\python -u "tmp.py"
6273291
6273290
6273289
6273287
6273286
6273285
6273284
******************************
4049571
------------------------------
Traceback (most recent call last):
File "tmp.py", line 14, in ?
gi_list=GenBank.search_for(gb_acc)
File "C:\Python23\Lib\site-packages\Bio\GenBank\__init__.py", line 1398, in search_for
retstart = start_id, retmax = max_ids)
File "C:\Python23\Lib\site-packages\Bio\EUtils\DBIdsClient.py", line 294, in search
searchinfo = parse.parse_search(infile, [None])
File "C:\Python23\Lib\site-packages\Bio\EUtils\parse.py", line 201, in parse_search
for ele in pom["TranslationStack"]:
File "C:\Python23\Lib\site-packages\Bio\EUtils\POM.py", line 355, in __getitem__
raise IndexError, "no item matches"
IndexError: no item matches
>Exit code: 1
##############################################

thanks in advance



Attachment: christen.vcf
Description: Vcard

_______________________________________________
BioPython mailing list - BioPython@xxxxxxxxxxxxx
http://biopython.org/mailman/listinfo/biopython
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise