Entering edit mode
7.5 years ago
bio90029
▴
10
Can anyone help me to find the error on this, please? I am trying to count the numbers of hit in an xml file but I get the above errors:
TypeError: object of type 'generator' has no len()
from Bio import SearchIO
blast_qresults=SearchIO.parse('my_file.xml', 'blast-xml')
len(blast_qresults)
or
blast_qresults.hit
AttributeError: 'generator' object has no attribute 'hit'