file = '/Users/svetlana/Downloads/E.coli.sequence.txt'
window = 100000
step = 1000
sequence = with open(file, 'r') as fasta: if line[0] != '>': sumGCscew = 0 with open('out.txt', 'w') as out: if len(positionseq) < window:
Ccnt = 0 Gcnt = 0 for nucl in positionseq:
if Ccnt == 0 and Gcnt == 0:
elif nucl == 'G':
else:
sumGCscew += GCscew print(f'{i}\t{GCscew:.3f}\t{sumGCscew:.3f}', file=out)