[Biopython-dev] SearchIO HSP indexing

Markus Piotrowski Markus.Piotrowski at ruhr-uni-bochum.de
Sat Feb 9 15:12:12 UTC 2013


Mmh, at least Bio.Blast.NCBIXML returns the exact values given in the 
xml result. So query_start and sbjct_start (BTW, not hit_start) return 
the values from <Hsp_query-from> and <Hsp_hit-from>.
Thus, my first guess would be that a search function that can return an 
entity 'query_start' will return the value that is written in the file.

Markus

Am 2013-02-09 15:30, schrieb Peter Cock:
> On Sat, Feb 9, 2013 at 1:54 PM, Colin Archer <colin.aibn at gmail.com> 
> wrote:
>> Hi Peter,
>>              Thanks for getting back to me so quickly.
>>
>
> Thank you - the main reason for including SearchIO in Biopython 1.61
> as 'experimental code' is to get wider testing and feedback 
> (hopefully
> an approach that will work well and we can use this more in future 
> for
> other new code).
>
>> I'm curious about the benefits of having these values in Python 
>> string
>> slicing format? I haven't come across this very often, I'm used to 
>> seeing
>> values systematically zero or one-based.
>
> Once you're used to Python slicing it becomes very natural.
>
>> Would it be easier to keep the range variables hit_range and 
>> hit_range_all
>> in slicing format and the start and end variables in sequence 
>> position
>> format so that they represent the actual BLAST results?
>
> One reason for this is to be consistent across all the formats 
> supported
> in SearchIO, and since Biopython is a Python library following Python
> norms seems most natural.
>
>> I had a look at some of the code and I can't see the slicing format
>> mentioned anywhere (Hsp.py, Hit.py, or blast_xml.py). It would 
>> probably be
>> helpful to explain the values in Hsp.py as a ** mark on hsp_start, 
>> hsp_end,
>> query_start, and query_end so that if people are interested they can 
>> have a
>> look at the files and see what they mean.
>>
>> Thanks
>> Colin
>
> OK, so some clarification with examples in the docstrings is needed.
> How about the Tutorial chapter?
>
> Thanks,
>
> Peter
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev



More information about the Biopython-dev mailing list