# we are just going to change all the parameters that begin with the phrase 'synthconst'
items = tc_allItems()
params = tc_getParameters(items)
p = "" #parameter name
#just count how many there are
total = 0for i in range(0,params.rows):p = tc_getRowName(params, i)if p.count('synthconst') > 0:total += 1
#for each parameterj = 0for i in range(0,params.rows):p = tc_getRowName(params, i)if p.count('synthconst') > 0: #check parameter nametc_showProgress("DREAM automation", int((100.0 * j)/total)) #progress meterj += 1#perturbs = ""FILE = open(p + '.perturb.txt','w+') #save to filep0 = tc_getMatrixValue(params, i, 0) #original parameter valuefor q in [100, 10, 2, 1]: #perturbationstc_setMatrixValue(params, i, 0, p0/q)tc_setParameters(params,0)m = tc_getSteadyState() #steady states += str(p0/q)for i in range(0,m.rows): #for each output valueif tc_getRowName(m,i).count('m') > 0: #if name starts with ms += "\t"s += str(tc_getMatrixValue(m, i, 0))s += "\n"FILE.write(s)FILE.close()#donetc_showProgress("DREAM automation", 100) #close progress meter
TinkerCell is a Computer-Aided Design software tool for Synthetic Biology that promotes collaboration through its plugin interface. This blog is used to keep notes on updates to the project.
Friday, May 6, 2011
Sample python script for doing perturbation experiments
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment