<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.8.5">
</HEAD>
<BODY>
Hi again, I am trying to align a sequence to the mouse genome, I am currently doing it thus:<BR>
<BR>
```<BR>
#!/usr/bin/env python<BR>
from __future__ import division<BR>
__author__ = 'Horea Christian'<BR>
<BR>
from Bio import Entrez<BR>
Entrez.email = "<A HREF="mailto:h.chr@mail.ru">h.chr@mail.ru</A>"<BR>
from Bio import pairwise2<BR>
from Bio.pairwise2 import format_alignment<BR>
<BR>
from Bio.Blast import NCBIWWW<BR>
from Bio import SeqIO<BR>
from Bio.Seq import Seq<BR>
from Bio.Alphabet import generic_dna<BR>
from Bio.Blast import NCBIXML<BR>
<BR>
my_seq = Seq("AATATGGCGAGGAACACTGAAAAATTGGAAAATTTANATGTCCACTGTANGACATGGAATATGGCAAGAAAACTGAAAATCATGGAAAATGANAAACATCCACGTGACGACTTGAAAAATGACGAAATCACTGAAAAACGTGAAAAATGANAAATGCACACTCTCGGACCTGGAATATGGCGAGAAAACTGAAAATCACGGAAAATGAGAAATACACACTTTANGACGTGAAATATGGANAGGAAAACTGAAAAAGTGGAAAATTTANAAATGTCCACTGTAGGACTGTTGGGAGCCGCGCGAGATATGGCA", generic_dna)<BR>
<BR>
result_handle = NCBI<A HREF="http://WWW.qblast">WWW.qblast</A>("blastn", "nt", my_seq)<BR>
blast_records = NCBIXML.read(result_handle)<BR>
<BR>
E_VALUE_THRESH = 1e-100<BR>
<BR>
for alignment in blast_records.alignments:<BR>
        for hsp in alignment.hsps:<BR>
                if hsp.expect < E_VALUE_THRESH:<BR>
                        print('****Alignment****')<BR>
                        print('sequence:', alignment.title)<BR>
                        print('length:', alignment.length)<BR>
                        print('e value:', hsp.expect)<BR>
                        print(hsp.query[0:75] + '...')<BR>
                        print(hsp.match[0:75] + '...')<BR>
                        print(hsp.sbjct[0:75] + '...')<BR>
```<BR>
<BR>
It seems to work quite well (you can run it yourselves), except of course that I get huge numbers of high-confidence hits. No matter, my issue right now is with using bipython. So how can I parse the position of the matching sequence on the genome from my NCBI<A HREF="http://WWW.qblast">WWW.qblast</A> results? I have tried to look at the raw XML of resut_handle, but I was not able to find any such tag? :-/ Can you help me out? Also, other suggestions regarding how I currently use bipython are welcome!<BR>
<BR>
Cheers,
</BODY>
</HTML>