vendredi 27 novembre 2009

First Step "Replication"

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
Then we will form our 5' ADN branch randomly generated
for i in range(330): # randomly choosed 330 nucleotides
    • x=random.choice(nucleotide)  
    • ADN_5.append(x)
Now we will form the 3'ADN branch according to the 5' like this complementarity table:
  • A -> T
  • T -> A
  • C -> G
  • G -> C
The code source should look like this:
  • 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:



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