In this step we will begin with our 4 nucleotides "ACGT"
nucleotide= list('ACGT')
This will create a list with 4 nucleotids that we will manipulate
To use the random generator we must call the random module in the beginning of the source code:- import random
for i in range(330): # randomly choosed 330 nucleotides
- x=random.choice(nucleotide)
- ADN_5.append(x)
- A -> T
- T -> A
- C -> G
- G -> C
- for i in range(len(ADN_5)):
- if ADN_5[i]=="A":
- ADN_3.append("T")
- elif ADN_5[i]=="T":
- ADN_3.append("A")
- elif ADN_5[i]=="C":
- ADN_3.append("G")
- elif ADN_5[i]=="G":
- ADN_3.append("C")
this loop will test each nucleotid in the ADN_5 branch tand assign to ADN_3 branch the right nucleotid according to the complementarity table.
The result look like this in the pytho shell:
The result look like this in the pytho shell:
With this part of code we have formed our entire ADN portion that we will work in the next phase: The Transcription
Aucun commentaire:
Enregistrer un commentaire