[BioPython] Need help parsing Blastoutput

Halima Rabiu halima at mancala.cbio.uct.ac.za
Tue Apr 18 15:06:02 UTC 2006


thanks
please see the attchment a copy of my script and copy of my Blast output
Thanks


On Thu, 13 Apr 2006, Michiel De Hoon wrote:

> Could you send us the script you were using?
> 
> --Michiel.
> 
> Michiel de Hoon
> Center for Computational Biology and Bioinformatics
> Columbia University
> 1150 St Nicholas Avenue
> New York, NY 10032
> 
> 
> 
> -----Original Message-----
> From: biopython-bounces at lists.open-bio.org on behalf of Halima Rabiu
> Sent: Thu 4/13/2006 11:07 AM
> To: biopython at lists.open-bio.org
> Subject: [BioPython] Need help parsing Blastoutput
>  
> Hi All,
> I have a BLAST output from a local blast
> I need to calculate my % alignment coverage as regard to my subject
> I try parsed the blast output and wanted to print the
> sbjct Start and Sbjct end. but I could not is there anyway I could this 
> try to get mach coverage between my querry and subject I dont need 
> Identities,but total % alignment for querry or subject.
> Thanks
> Halimah
> 
> _______________________________________________
> BioPython mailing list  -  BioPython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
> 
> 
-------------- next part --------------
#! /usr/local/bin/python2.4

#halimah

#16-04-2006

from string import split

from Bio.Blast import NCBIStandalone

b_out = open('Enterococcus_out','r')

b_parser = NCBIStandalone.BlastParser()

b_iterator = NCBIStandalone.Iterator(b_out,b_parser)



E_VALUE_THRESH = 1.0



while 1:

	b_record = b_iterator.next()

	print "The following results are for query " + b_record.query

	print 'len of query:',b_record.query_letters

	if b_record is None:

	       	break

	

     	

	

     	for alignment in b_record.alignments:

        	

             		for hsp in alignment.hsps:

               			if hsp.expect <= E_VALUE_THRESH:

                     			print '****Alignment****'

                   			print 'title:', alignment.title

                    			print 'length:', alignment.length

                    			print 'e value:', hsp.expect

              		                print 'subjectstart:',hsp.sbjct_start

					print 'subject end:', hsp.sbject_end

		     			  



More information about the Biopython mailing list