[BioPython] Problems with NCBIXML.py

Bruno Santos bsantos at biocant.pt
Fri Oct 26 09:13:58 UTC 2007


Peter Said
>I would suggest you install standalone blast, then give it the
>multi-record FASTA file as input.  You should then get multiple blast
>records back (in the same order).  This works fine with the XML output
>(but currently does not work for plain text output on recent versions
>of NCBI Blast).
>
>If you really want to make multiple blast submissions in parallel
>online, first check the NCBI's website for any usage restrictions -
>they don't want their servers to be abused.
>
>Peter

I have followed your advice and I decide to install standalone blast. As I
want to make blast against the nt databases I have downloaded it pre
compiled from the ncbi ftp server. And I have created I scrip to do this but
for some reason I'm not getting any results, because the programs does not
write anything to the XML file. 

Where is my script:
from Bio import SeqIO
from Bio.Blast import NCBIStandalone
from Bio.Blast import NCBIXML
import time
import math

my_blast_db = (r'e:/nt.00')
my_blast_file =
r'C:/FASTASeq/Results/well9/assembled_file_well9_V6_DIST.fna'
my_blast_exe = r'C:/BLAST/bin/'
save_file = open(r'C:/FASTASeq/Results/well9/V6_BLAST.xml', 'w')
result_handle, error_info = NCBIStandalone.blastall(my_blast_exe,
"blastn",my_blast_db, my_blast_file)
blast_results = result_handle.read() #Catch the results
save_file.write(blast_results) #Write all the information to an XML file
save_file.close()
print time.ctime()

As I have download the files from ncbi I have a lot of files in the database
directory theres is any way of perform a search against all of them?

Thanks in advance,
Bruno Santos 

Unidade de Bioinformática  

3060-197 Cantanhede  
Tel: 231 410 892
http://bioinformatics.biocant.pt







More information about the Biopython mailing list