[Biopython] Entrez.efetch issue with the returning data type

Matej Repič Matej.Repic at ki.si
Tue Feb 28 14:12:31 UTC 2012


For me the script works without a problem (Biopython 1.58, Python 2.6). On
the other hand, some things were changed on the Pubmed side this month, so
maybe it would work for you if you edit your script according to this
table:

http://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.chapter4_table1/?
report=objectonly

The full documentation on Efetch 2.0 is available at:
http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.Efetch



Regards,



----------------------------------------------------------
Matej Repič
Junior Researcher

Laboratory for Biocomputing and Bioinformatics
National Institute of Chemistry
Hajdrihova 19
SI-1001 Ljubljana POB 660
Slovenia

tel: +386-1-4760457 <tel:%2B386-1-4760457>

e-mail: matej.repic at ki.si
----------------------------------------------------------






On 28.2.12 14:28, "Anna Kostikova" <anna.kostikova at gmail.com> wrote:

>Dear list,
>
>Since today I've started to have an issue with Entrez.efetch utility,
>and in particular with the rettype parameter. Essentially, the format
>of the data returned when I specify
>Entrez.efetch(db='nucleotide',id='JQ042818.1',rettype='gb') does not
>correspond anymore to a genbank datatype. Few days ago all was fine.
>What is going on?
>
>the script is:
>from Bio import Entrez
>Entrez.email = 'my.email at domain.com'
>
>local_file=open("test.gb", 'w')
>try:
>        handle =
>Entrez.efetch(db='nucleotide',id='JQ042818.1',rettype='gb') #download
>record with Entrez.efetch
>        local_file.write(handle.read()) #write to a file
>        handle.close()
>except:
>        print "Accsession id is not found"
>local_file.close()
>
>Thanks a lot for your ideas,
>Anna
>_______________________________________________
>Biopython mailing list  -  Biopython at lists.open-bio.org
>http://lists.open-bio.org/mailman/listinfo/biopython





More information about the Biopython mailing list