lundi 21 août 2017

Python- Script to insert x- amount of mutations in to FASTA

I need to create a program with Python that inserts a nucleotide mutation into a sequence (so changes the A, T, G or C into A, T, G or C randomly) for X amount of nucleotide on the data. After this, the program should print the original nucleotide on top of new one. I'm a beginner with python, so this is all I have created so far:

import random
f = open('elenchusfasta.txt', 'w')
nucleotides = ('A', 'T', 'G', 'C')
for random.choice() in f:
    print(random.choice(nucleotides))

Output should be like:

A

T




Aucun commentaire:

Enregistrer un commentaire