[BioPython] Syntax error while parsing Blast output
    Peter 
    biopython at maubp.freeserve.co.uk
       
    Tue Oct 23 21:45:38 UTC 2007
    
    
  
David Garfield wrote:
> Hey list,
> 
>     I'm having an issue with the BlastParser and Iterator from  
> NCBIStandalone.  I assume its because NCBI has gone and changed the  
> output file (again)...or I'm an idiot....but maybe there's a real  
> problem here.
The code you gave uses the NCBIStandalone parser/iterator, which expects 
plain text output - yet you say later the raw file looks like a 
perfectly good XML file.  If you have an XML file (which we recommend 
over the plain text) then you should use the NCBIXML module instead.
Also, a style point - I personally much prefer this:
b_iterator = NCBIStandalone.Iterator(blast_results, b_parser)
for b_record in b_iterator :
     #etc
over this:
b_iterator = NCBIStandalone.Iterator(blast_results, b_parser)
while 1:
     b_record = b_iterator.next()
     if b_record is None: break
     #etc
Peter
    
    
More information about the Biopython
mailing list