"""read: this function read the information in the blast_file; for each sequenceID from the query it will get the matching reference and the percentage of identity with it, if there is a match, the reference ID will be 'NONE' if there was no match and the identity will be 0. """
blast_file=open(self.filename,'r')
# read the file line by line from the start
blast_line=blast_file.readline()
whileblast_line:
# the seqID of the query is extracted and a new item is initialized in the dictionary 'self.dict'
ifblast_line[0:6]=='Query=':
seqID=blast_line.split('ry= ')[1].replace('\n','')# extract sequence ID
self.dict[seqID]=['','']
#pass three lines
foriinrange(0,3):
blast_file.readline()
blast_line=blast_file.readline()
# if 'Sequences is in the line, there is a match
if'Sequences 'inblast_line:
# pass for line and extract the refID of the matching reference