[BioPython] Problems with NCBIXML.py

Peter biopython at maubp.freeserve.co.uk
Fri Oct 26 14:37:45 UTC 2007


> But now I'm mailing you with another doubt it is possible to pass the
> result_handle to blast_results line by line or something like that because
> I'm having a memory error in the step described below
> 
> result_handle, error_info = NCBIStandalone.blastall(my_blast_exe,
> "blastn",my_blast_db, my_blast_file)
> blast_results = result_handle.read() #Catch the results 
> 
> Maybe if I pass one line at a time and write it immediately to the xml file
> it will work. 

XML files are big.  Lots of query sequences will also make things 
bigger.  And the default expectation threshold will also give lots of 
results - setting this to something harsher will help by giving less 
matches.

Unless you want to keep the XML file for other analysis, it might be 
simpler to parse the output from blast directly with Biopython - 
avoiding having the large XML file on disk.

Keeping the XML intermediate file can be a good idea when working on 
smaller datasets, where you want to tweak your analysis (without 
re-running blast each time).

Peter



More information about the Biopython mailing list