[BioPython] sequences description in Expasy

Alessandro S. Nascimento as_nascimento at yahoo.com.br
Wed Aug 30 15:58:15 EDT 2006


Hi all,


I am trying to write something to read a list of sequences and search 
some descriptions of them in expasy. I wrote something as follows:

def sequence_retriever(seq_file):
    from Bio.WWW import ExPASy
    infile=open(seq_file, 'r')
    infile.readline()
    result=[]
    for line in infile:
        i=0
        while line[i:i+1] != '/':
            i=i+1
           
        else:
            result.append(line[0:i])
    all_results=''
    for res in result:
        detail=ExPASy.get_sprot_raw(res)
==>      print detail.read()
        all_results=all_results+detail.read()
    print all_results


And it is working (at least until this moment!) but I would be very 
helpful if there was how to get something like detail.description that 
could print out the line that starts with DE and contains the 
informations about the sequence.... I've looked in documentation and 
tutorials but didn't find anything.  Does anyone have any clue?

Thanks


alessandro


More information about the BioPython mailing list