[Biopython-dev] Name problem in BLAST parser?

Sebastian Bassi sbassi at gmail.com
Sun Aug 3 22:35:56 UTC 2008


Hello,

>>> from Bio.Blast import NCBIXML
>>> blast_records = NCBIXML.parse(res)
>>> record = blast_records.next()
>>> record.database_length
>>> record.num_letters_in_database
39588516

So if we are going to retrieve the database length field, why call it
num_letters_in_database? I guess that the reply is: This field is
called '<Statistics_db-len>' in the XML but most people know it as
'Number of letters in database' as it is displayed in the HTML BLAST
output.
Thats OK but why having an empty "database_length" attribute?
I am thinking in two solutions for this:
1) Just delete the "database_length" attribute.
2) Make "database_length" another name for "num_letters_in_database".
Maybe there is another solution that I am not aware of.

Best,
SB.

-- 
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-dev mailing list