[Biopython-dev] Name problem in BLAST parser?

Peter biopython at maubp.freeserve.co.uk
Mon Aug 4 09:54:33 UTC 2008


>> 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.
>
> Regarding idea (2), as the plain text parser fills in both
> "num_letters_in_database" and "database_length"  and
> "database_letters" (from different parts of the file), I think for
> consistency one could argue that the XML parser should also fill in
> all three!  On the other hand, having the same information in three
> places is crazy and un-pythonic.
>
> In the long run perhaps we should deprecate the "database_length"  and
> "database_letters" properties of the Record class (and just make the
> plain text parser just check all three agree)?  This is a variation on
> your idea (1).

Actually, until four months ago the XML parser didn't publicly expose
the database length at all, until as you pointed out I changed the
private record._num_letters_in_database to
record.num_letters_in_database - so maybe we could standardise on the
more natural "database_length" instead?

Peter



More information about the Biopython-dev mailing list