[BioPython] How to produce html report with biopython blast

Christof Winter winter at biotec.tu-dresden.de
Wed Apr 16 14:05:50 UTC 2008


Bruno Santos wrote:
[...]

> Another  question I want to ask is in which method of blast_record I can get
> the  hsp.align-len, that is basically the length of the aligned hit? This
> value is  present in the xml file but in the class diagram available in
> Biopython  tutorial and cookbook I can’t see a method that returns this
> value.

You probably want:

alignment.length = total length of unaligned hit sequence
len(hsp.query) = len(hsp.match) = len(hsp.sbjct) = length of alignment

using

from Bio.Blast import NCBIXML
blast_records = NCBIXML.parse(open("my_blast.xml"))

for blast_record in blast_records:
     for alignment in blast_record.alignments:
         for hsp in alignment.hsps:
             # do s.th.

HTH,
Christof

> Thank you  very much in advance,
> 
> Bruno  Santos
> 
> 
> 
> P.S.-I am  having lots of problems with sending messages to biopython lists
> it always say  the message is awaiting approval because it contain a
> suspicious header. Can  anyone tell me what I need to do to change this
> behavior? _______________________________________________ BioPython mailing

Sorry, no idea about that. Never happened to me.



More information about the Biopython mailing list