Hello.I am new to biopython and I am trying to do BLAST search for a single query sequence. This is the script I wrote:
""" BLAST OVER INTERNET """
from Bio.Blast import NCBIWWW
file_name=input("enter the file name:")
filename = open(file_name).read()
result=NCBIWWW.qblast("blastn", "nt", "filename")
from Bio.Blast import NCBIXML
blast_record = NCBIXML.read(result)
print(len(blast_record.alignments))
evalue = 0.01
for alignment in blast_record.alignments:
for hsp in alignment.hsps:
if hsp.expect < evalue:
print("****Alignment****")
print("sequence:", alignment.title)
print("length:", alignment.length)
print("e value:", hsp.expect)
print(hsp.query[0:75] + "...")
print(hsp.match[0:75] + "...")
print(hsp.sbjct[0:75] + "...")
So the issue I am getting is, no result is being generated. The length of the "blast_record_allignments" returns 0 value. Can anyone please help me with it? Thanks in advance
Please use 101010 button to format the code. Could you provide a samples fasta sequence you're using for this script?