[BioPython] Parsing BLAST for ClustalW

Bruce Southey bsouthey at gmail.com
Thu Aug 21 13:27:34 UTC 2008


Allan Kamau wrote:
> Hi Alex,
> I haven't yet used BioPython (therefore my suggestion may be quite 
> wrong).
> To generate CSV from XML may require use of general XML SAX parser 
> solution (unless BioPython has a package to output CSV from XML of 
> that particular structure).
> I prefer to use SAX (in many cases) as opposed to other more memory 
> resident XML parsing solutions (DOM etc) due to memory issues 
> especially if your XML is large.
> Have a look at 
> "http://www.devarticles.com/c/a/XML/Parsing-XML-with-SAX-and-Python/"
>
Note that the Elementtree XML parser is now standard in Python 2.5 see 
one of many examples: 
http://www.learningpython.com/2008/05/07/elegant-xml-parsing-using-the-elementtree-module/

As I understand things, elementtree does not fit into BioPython since it 
was not standard for earlier versions of Python supported by BioPython. 
This may change once BioPython supports Python 3K.

Bruce




More information about the Biopython mailing list