[Biopython] converting unigene list in gene name list

francesco chiani francesco.chiani at gmail.com
Thu May 30 12:40:21 EDT 2013


Hi Peter,
Dont worry, I've just managed in that way:

import Bio
from Bio import Entrez
import xlrd
import xlwt

name_list=["M75161","Z26634","X02308"]


Entrez.email="youremaiil at something.XXX"
id_list=[]

for a in range(0, len(name_list)):

    handle=Entrez.esearch(db="unigene", term=listanomi[a])
    record=Entrez.read(handle)
    id_list.append(record["IdList"])
gene_symbol_list=[]
for i in range(0, len(id_list)):
    handle=Entrez.esummary(db='unigene',id=id_list[i])
    record=Entrez.read(handle)
    gene_symbol_list.append(record[0]["GENE"])
    print record[0]["GENE"]

It may need some improvement for sure (for example  a try/raise function
for the wrong unigenes at list) but it works.
Thanks anyway for your help
Francesco



2013/5/30 Peter Cock <p.j.a.cock at googlemail.com>

> On Mon, May 27, 2013 at 6:58 PM, francesco chiani
> <francesco.chiani at gmail.com> wrote:
> > Hi Peter,
> > As you said the input is a list look like
> > unigene_list=[" Z26634","....",".."]
> > The output another list gene_symbol =["ANK2", "...",".."]
> >
>
> Sorry, I've not had a change to try this - but I would start
> by looking at the NCBI Entrez elink functionality.
>
> Peter
>



-- 
PhD Francesco Chiani
CNR -- National Research Council of Italy
Cell Biology and Neurobiology Institute (IBCN)
Campus "A. Buzzati-Traverso"
32 via E. Ramarini
00015 Monterotondo Scalo (Roma) Italy

tel:     +39-0690091308
fax:     +39-0690091260


More information about the Biopython mailing list