Returns value error: Format required (lower case string) for line 25 in get_processor for searchIO_utils.py.
AtCBL1_CDS.txt is a file containing a protein sequence in fasta format.
I would like to know how to correctly access my BLAST output.
from Bio.Blast import NCBIWWW
from Bio.Blast import NCBIXML
from Bio import SearchIO
#open query file as fasta_file
fasta_file= open("AtCBL1_CDS.txt").read()
#set up blast parameters
result = NCBIWWW.qblast ("blastp", "prot", fasta_file)
#run and create my_blast as output file
with open("my_blast.xml", "w") as out_handle:
out_handle.write(result.read())
#close file
result.close()
out_handle.close()
result_handle=open("my_blast.xml")
blastp_result=SearchIO.read(result_handle)
print(blastp_result)
The second parameter to SearchIO.read should be a lowercase format parameter:
In your case the line should read:
blastp_result=SearchIO.read(result_handle,'blast-xml')