[BioPython] Need help parsing Blastoutput

Michiel De Hoon mdehoon at c2b2.columbia.edu
Tue Apr 18 16:40:05 UTC 2006


Could you also send us the file Enterococcus_out so we can run the script?

>From the script, it looks like you're trying to parse text output from Blast.
While this is possible (in theory), the format of Blast text output tends to
change a lot, thereby breaking the parser in Biopython. It is more reliable
to have Blast generate output in XML format, and use the XML parser:

blast_out = open('my_blast.xml', 'r')

from Bio.Blast import NCBIXML

b_parser = NCBIXML.BlastParser()
b_record = b_parser.parse(blast_out)

See section 3.1.2 in the Biopython cookbook, and section 3.1.4 on how to
generate Blast output in XML.

--Michiel.



Michiel de Hoon
Center for Computational Biology and Bioinformatics
Columbia University
1150 St Nicholas Avenue
New York, NY 10032



-----Original Message-----
From: Halima Rabiu [mailto:halima at cbio.uct.ac.za]
Sent: Tue 4/18/2006 11:06 AM
To: Michiel De Hoon
Cc: biopython at lists.open-bio.org
Subject: RE: [BioPython] Need help parsing Blastoutput
 
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
> 
> 





More information about the Biopython mailing list