Quantcast
Channel: Post Feed
Viewing all articles
Browse latest Browse all 41826

How Do You Extract The Query Title From A Blast Xml Output Using Biopython

$
0
0

I would like to find the alignment title along with the query title and the expect value in a BLAST XML output file with many query sequences. I can get the alignment title and expect value but the query title is eluding me. How do I extract that?

blast_records = NCBIXML.parse(result_handle)
blast_record = blast_records.next()

for blast_record in blast_records:
    for alignment in blast_record.alignments:
        for hsp in alignment.hsps:
            print alignment.title, hsp.expect, blast_record.header.query

Viewing all articles
Browse latest Browse all 41826

Trending Articles