[Biopython] (no subject)

Stefanie Lück lueck at ipk-gatersleben.de
Wed May 27 03:06:34 EDT 2009


Hi David!

I found the problem. I got allways the same start for the hsp.query_start 
and was wonder whats happened.  I had a mistake in my code. Sorry for your 
waste of time!

S.
----- Original Message ----- 
From: "David Winter" <winda002 at student.otago.ac.nz>
To: <biopython at biopython.org>
Sent: Wednesday, May 27, 2009 3:18 AM
Subject: [Biopython] (no subject)


Stefanie Lück wrote:
 > Hi!
 >
 > Is there a way to get the query start information of the hit in the
xml output?
 > Alternatively I can find the hit on the query

Hi Stefanie,

The query_start is in the "hsp" instance for each alignment in each
blast record, if you have a record called b_record you can do this:

 >>>for alignment in b_record.alignments:
 >>>    for hsp in alignment.hsps:
 >>>        print "hit '%s' matches query '%s' starting a query position
%i"  % (alignment.title, b_record.query, hsp.query_start )
hit 'gene1' matches query 'my_query1' from query position 841
hit 'gene2' matches query 'my_query1' from query position 190

There is a nice diagram of all the 'stuff' in the blast record class in
the tutorial here:
http://www.biopython.org/DIST/docs/tutorial/Tutorial.html#fig:blastrecord

Hope that helps you do what you want to,
David
_______________________________________________
Biopython mailing list  -  Biopython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython



More information about the Biopython mailing list