Entering edit mode
4.6 years ago
geethus2009
•
0
E_VALUE_THRESH = 0.04
for alignment in b_record.alignments:
for hsp in alignment.hsps:
if hsp.expect < E_VALUE_THRESH:
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] + '...'
[PYTHON 3.7] THIS OCCUR NOT ONLY IN CASE OF THIS CODE. HAPPENS FREQUENTLY WHENEVER I AM EXECUTING FOR , WHILE LOOP IN THE PROGRAM
If you're running this in Py3.x, you need to use
print("xyz")
with the brackets (and its generally a good idea to do that anyway).