[BioPython] Why _num_letters_in_database XMLBLAST parser?

Sebastian Bassi sbassi at gmail.com
Mon Mar 31 01:28:26 UTC 2008


Hello,

I am working at the xml formater (to format BLAST xml to html).
I found that the num_letters_in_database data is stored as a "private"
attribute.

When I want to retrieve the num_letters_in_database I have to do:

>>> fr=NCBIXML.parse(open(f_in)).next()
>>> fr._num_letters_in_database    # SEE THE _ before num_letter_in_database
4662239

Instead of:

>>> fr.num_letters_in_database
[]

Like this one:

>>> fr.num_sequences_in_database
400

Here is the code with highlighting:
http://www.pastecode.com.ar/f542368d4

Original sourcecode from here:
http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/Blast/NCBIXML.py?rev=1.14&cvsroot=biopython&content-type=text/vnd.viewcvs-markup
(short URL http://tinyurl.com/3dk5mw)


-- 
Curso Biologia Molecular para programadores: http://tinyurl.com/2vv8w6
Bioinformatics news: http://www.bioinformatica.info
Tutorial libre de Python: http://tinyurl.com/2az5d5



More information about the Biopython mailing list