file = '/Users/svetlana/Downloads/E.coli.sequence.txt' with open(file, 'r') as fasta:
- names = {} stops = {'TGA': 0,
- 'TAA': 0, 'TAG': 0}
sec = for line in fasta:
if line[0] == '>':
- header = line.strip()[1:]
names[header] =
- header = line.strip()[1:]
- names[header] += line.strip()
- if val[-3:] in stops:
- stops[val[-3:]] += 1
- print(key, val, sep=' ')
file = '/Users/svetlana/Downloads/Candidatus_Gracilibacteria_bacterium.sequence.txt' with open(file, 'r') as fasta:
- names = {} stops = {'TGA': 0,
- 'TAA': 0, 'TAG': 0}
sec = for line in fasta:
if line[0] == '>':
- header = line.strip()[1:]
names[header] =
- header = line.strip()[1:]
- names[header] += line.strip()
- if val[-3:] in stops:
- stops[val[-3:]] += 1
- print(key, val, sep=' ')
file = '/Users/svetlana/Downloads/Mycoplasma_pneumoniae.sequence.txt' with open(file, 'r') as fasta:
- names = {} stops = {'TGA': 0,
- 'TAA': 0, 'TAG': 0}
sec = for line in fasta:
if line[0] == '>':
- header = line.strip()[1:]
names[header] =
- header = line.strip()[1:]
- names[header] += line.strip()
- if val[-3:] in stops:
- stops[val[-3:]] += 1
- print(key, val, sep=' ')