[Biopython] align sequence to genomic DNA

Peter Cock p.j.a.cock at googlemail.com
Tue Mar 3 09:01:00 UTC 2015


On Tue, Mar 3, 2015 at 1:31 AM, Horea Chrristian <h.chr at mail.ru> wrote:
> Hi again Peter,
>
> Thanks for the answer:
>
>> BLAST alignments include the start/end coordinates of the match on both
>> the query sequence and the match/hit sequence.
>
> Is there any convenient way to access these values from within biopython?
> Quite frankly I can't even find them by looking at the XML
> https://bpaste.net/show/3c2d54393feb (the output is huge, this is just the
> part that fit into my console).
>
> So, can you show me how to get those values?
>
> Best,
> Christian

Within Biopython, look at Bio.Blast.NCBIXML or the new Bio.SearchIO
module (both covered in the Tutorial).

http://biopython.org/DIST/docs/tutorial/Tutorial.html

Or, you can use any of the Python XML parsing libraries if you prefer.

Or, you could ask the NCBI to return the BLAST results as a plain
text tab separated table (tabular data) which much easier to parse
(and also supported in Bio.SearchIO).

Regards,

Peter


More information about the Biopython mailing list