file = '/Users/svetlana/Downloads/E.coli.sequence.txt' with open(file, 'r') as fasta:
- stops = {'TTA': 0,
- 'TTG': 0, 'CTA': 0, 'CTC': 0, 'CTG': 0, 'CTT': 0}
sec = for line in fasta:
if line[0] != '>':
- sec += line.strip()
- if sec[i:i+3] in stops:
- stops[sec[i:i+3]] += 1
- print(key, val, sep=' ')
file = '/Users/svetlana/Downloads/Candidatus_Gracilibacteria_bacterium.sequence.txt' with open(file, 'r') as fasta:
- stops = {'TTA': 0,
- 'TTG': 0, 'CTA': 0, 'CTC': 0, 'CTG': 0, 'CTT': 0}
sec = for line in fasta:
if line[0] != '>':
- sec += line.strip()
- if sec[i:i+3] in stops:
- stops[sec[i:i+3]] += 1
- print(key, val, sep=' ')
file = '/Users/svetlana/Downloads/Mycoplasma_pneumoniae.sequence.txt' with open(file, 'r') as fasta:
- stops = {'TTA': 0,
- 'TTG': 0, 'CTA': 0, 'CTC': 0, 'CTG': 0, 'CTT': 0}
sec = for line in fasta:
if line[0] != '>':
- sec += line.strip()
- if sec[i:i+3] in stops:
- stops[sec[i:i+3]] += 1
- print(key, val, sep=' ')