[BioPython] Is query_length really the length of query?

Peter biopython at maubp.freeserve.co.uk
Tue Apr 14 10:25:40 EDT 2009


On Wed, Apr 1, 2009 at 11:59 AM, Peter <biopython at maubp.freeserve.co.uk> wrote:
>>
>> Should I test the length of the query before the blast result? O did I
>> miss-interpreted the meaning of query_length and query_letters?
>>
>> Thanks for your time
>>
>> Is query_length really the length of query?
>
> You can use query_letters (although it wouldn't hurt to double check
> this if you have the query sequence available). With the current BLAST
> XML parser query_length is always None (but I think we should fix so
> they are both populated).
>
> Its an unfortunate historical accident dating back to the plain text
> BLAST parser. [...]
>
> This seems like a timely reminder that we could perhaps tidy up a
> little of this ready for Biopython 1.50 ...

This was fixed in Biopython 1.50 beta, so you can now use either the
query_length or the query_letters property when parsing BLAST XML
output.  For older versions of Biopython as noted above, query_length
was left as None when parsing XML.

Peter


More information about the Biopython mailing list