User talk:Hossein Azari Soufiani

From OpenWetWare
Jump to navigationJump to search

Report of Second Homework

The paper "Foundations for the Engineering Biology" was really interesting.

Code for Third Homework

import random import numpy as np

print print

Code='cggagcagctcactattcacccgatgagaggggaggagagagagagaaaatgtcctttaggccggttcctcttacttggcagagggaggc tgctattctccgcctgcatttctttttctggattacttagttatggcctttgcaaaggcaggggtatttgttttgatgcaaacctcaatccctccc cttctttgaatggtgtgccccaccccccgggtcgcctgcaacctaggcggacgctaccatggcgtagacagggagggaaagaagtgtgcagaaggc aagcccggaggcactttcaagaatgagcatatctcatcttcccggagaaaaaaaaaaaagaatggtacgtctgagaatgaaattttgaaagagtgc aatgatgggtcgtttgataatttgtcgggaaaaacaatctacctgttatctagctttgggctaggccattccagttccagacgcaggctgaacgtc gtgaagcggaaggggcgggcccgcaggcgtccgtgtggtcctccgtgcagccctcggcccgagccggttcttcctggtaggaggcggaactcgaat tcatttctcccgctgccccatctcttagctcgcggttgtttcattccgcagtttcttcccatgcacctgccgcgtaccggccactttgtgccgtac ttacgtcatctttttcctaaatcgaggtggcatttacacacagcgccagtgcacacagcaagtgcacaggaagatgagttttggcccctaaccgct ccgtgatgcctaccaagtcacagacccttttcatcgtcccagaaacgtttcatcacgtctcttcccagtcgattcccgaccccacctttattttga tctccataaccattttgcctgttggagaacttcatatagaatggaatcaggatgggcgctgtggctcacgcctgcactttggctcacgcctgcact ttgggaggccgaggcgggcggattacttgaggataggagttccagaccagcgtggccaacgtggtg' RCCode=Code TempCode=Code

print 'Code=',Code print print


pro1=range(1,339) pro2=range(1,339) pro3=range(1,339) prom1=range(1,339) prom2=range(1,339) prom3=range(1,339)

  1. ----------------------Problem one --------------------------------------------


GCcontent=0 for i in range(0,len(Code)-1):

if Code[i]=='c': GCcontent=GCcontent+1 elif Code[i]=='g': GCcontent=GCcontent+1



print 'GC Content=',GCcontent print print print print

  1. ----------------------Problem two---------------------------------------------

for i in range(0,len(Code)-1):

if Code[len(Code)-1-i]=='c': RCCode=RCCode[:i]+'g'+RCCode[i+1:] if Code[len(Code)-1-i]=='g': RCCode=RCCode[:i]+'c'+RCCode[i+1:] if Code[len(Code)-1-i]=='t': RCCode=RCCode[:i]+'a'+RCCode[i+1:] if Code[len(Code)-1-i]=='a': RCCode=RCCode[:i]+'t'+RCCode[i+1:]

print 'Recerse Complement=:', RCCode print print

  1. ----------------------Problem Three---------------------------------------------

Here we put the table That I didn't put because it doesn't look good!!!

for i in range(0,338):

Temp1=Code[3*i]+Code[3*i+1]+Code[3*i+2] Temp2=Code[3*i+1]+Code[3*i+2]+Code[3*i+3] Temp3=Code[3*i+2]+Code[3*i+3]+Code[3*i+4]

pro1[i]=standard[Temp1] pro2[i]=standard[Temp2] pro3[i]=standard[Temp3]

Temp1=RCCode[3*i]+RCCode[3*i+1]+RCCode[3*i+2] Temp2=RCCode[3*i+1]+RCCode[3*i+2]+RCCode[3*i+3] Temp3=RCCode[3*i+2]+RCCode[3*i+3]+RCCode[3*i+4]

prom1[i]=standard[Temp1] prom2[i]=standard[Temp2] prom3[i]=standard[Temp3]


print 'Sequence of (+1) frame' print pro1

print 'Sequence of (+2) frame' print pro2

print 'Sequence of (+3) frame' print pro3

print 'Sequence of (-1) frame' print prom1

print 'Sequence of (-2) frame' print prom2

print 'Sequence of (-3) frame' print prom3


  1. -----------------------------Problem Four---------------------------

counter=0 for j in range(0,1000):

       Code=TempCode
       for i in range(0,10):
               Te=random.random()
               Te=np.fix(100*Te)
               Te2=random.random()
               Te2=int(np.fix(10*Te2))%3
               
               


               if   (Code[100*i+int(Te)]=='c') and (Te2==1):
                     Code=Code[:100*i+int(Te)]+'g'+Code[100*i+int(Te)+1:]
                     
               
               
               elif   (Code[100*i+int(Te)]=='c') and (Te2==2):
                     Code=Code[:100*i+int(Te)]+'t'+Code[100*i+int(Te)+1:]


               elif   (Code[100*i+int(Te)]=='c') and (Te2==0):
                     Code=Code[:100*i+int(Te)]+'a'+Code[100*i+int(Te)+1:]



               elif   (Code[100*i+int(Te)]=='t') and (Te2==1):
                     Code=Code[:100*i+int(Te)]+'g'+Code[100*i+int(Te)+1:]
               
               
               elif   (Code[100*i+int(Te)]=='t') and (Te2==2):
                     Code=Code[:100*i+int(Te)]+'c'+Code[100*i+int(Te)+1:]


               elif   (Code[100*i+int(Te)]=='t') and (Te2==0):
                     Code=Code[:100*i+int(Te)]+'a'+Code[100*i+int(Te)+1:]



               elif   (Code[100*i+int(Te)]=='g') and (Te2==1):
                     Code=Code[:100*i+int(Te)]+'c'+Code[100*i+int(Te)+1:]
               
               
               elif   (Code[100*i+int(Te)]=='g') and (Te2==2):
                     Code=Code[:100*i+int(Te)]+'t'+Code[100*i+int(Te)+1:]


               elif   (Code[100*i+int(Te)]=='g') and (Te2==0):
                     Code=Code[:100*i+int(Te)]+'a'+Code[100*i+int(Te)+1:]



               elif   (Code[100*i+int(Te)]=='a') and (Te2==1):
                     Code=Code[:100*i+int(Te)]+'g'+Code[100*i+int(Te)+1:]
               
               
               elif   (Code[100*i+int(Te)]=='a') and (Te2==2):
                     Code=Code[:100*i+int(Te)]+'t'+Code[100*i+int(Te)+1:]


               elif   (Code[100*i+int(Te)]=='a') and (Te2==0):
                     Code=Code[:100*i+int(Te)]+'c'+Code[100*i+int(Te)+1:]



       pro21=range(1,339)
       pro22=range(1,339)
       pro23=range(1,339)



       for i in range(0,338):
               Temp1=Code[3*i]+Code[3*i+1]+Code[3*i+2]
               Temp2=Code[3*i+1]+Code[3*i+2]+Code[3*i+3]   
               Temp3=Code[3*i+2]+Code[3*i+3]+Code[3*i+4]
               pro21[i]=standard[Temp1]
               pro22[i]=standard[Temp2]
               pro23[i]=standard[Temp3]


       for i in range(0,len(pro21)-1):
               if   pro21[i]=='*' and pro1[i]!='*':
                       counter=counter+1
   

print 'Percent of Premature Termination=',counter,'/1000' print print

print 'Before Mutation:', pro1 print print

print 'After Mutation:', pro21

input()




December report for project

During this project we started from looking at the dogma of biological systems and we tried to discus on the evolutionary development.

After dividing into groups we as mathematical modeling started to look at a model which encompass the evolutionary notion of development in it. Basically it uses Control theory ideas to design a system which will use a feedback system which optimally will use the experiment results as much as possible.

After proposing our system and having discussion in the class we went forward to an numerical example. After discussions with biology group and infrastructure we got two examples as eye-color and height.

So far we are working on the logistic modeling and we will use this method on the results that infrastructure part will give us from online resources.

Details of our group discussion is on the wiki.

This was a very good initiative for bio processing for me and the way we started to understand the details of this evolving path and start to think together to overcome the problems.

Thanks George a lot for shedding light in this way for us and thanks Harris and Sasha for their helps.

With all the best, Hossein