[BioPython] parsing the blastoutput and printing the alingment
Michiel Jan Laurens de Hoon
mdehoon at c2b2.columbia.edu
Wed Jun 14 21:55:17 UTC 2006
Muthuraman, Manickam wrote:
> b_parser=NCBIXML.BlastParser()
> b_iterator1=NCBIStandalone.Iterator(blast_out,b_parser)
> for alignment in b_iterator1.alignments:
> for hsp in alignment.hsps:
> print 'seq:',alignment.title
>
> Traceback (most recent call last):
> File "<input>", line 1, in ?
> AttributeError: Iterator instance has no attribute 'alignments'
>
Use:
b_record = b_iterator1.next()
for alignment in b_record.alignments:
...
Just like the example in the tutorial.
--Michiel.
--
Michiel de Hoon
Center for Computational Biology and Bioinformatics
Columbia University
1130 St Nicholas Avenue
New York, NY 10032
More information about the Biopython
mailing list