return [ float('%1.4f'%(x/(vMax*1.0)*normalizeTo)) for x in L]

excelfile = sys.argv[1]
_selection_gradient_ = sys.argv[2]
_inducer_gradient_ = sys.argv[3]

expt1 = Experiment(excelfile)

CurveFit_params = {}
Residual_RMSD = {}

#plate_to_excel = ['A1','B2','C3','D4','E5','F6','G7','H8' ]

for keys in plate_to_excel:
    timepoints = []
    well = TimeCourse(keys, expt1.extract_timecourse(keys))
    y = np.array(normList(well.data()))# !!! normalizes to 1
#    y = np.array(well.data())
    for i in range(len(well.data())):
        timepoints.append(i+1)
    x = np.array(timepoints)

    fitdata = ModifiedRichards(x, y)
    fitdata.Plot_CurveFit(keys)
    if not CurveFit_params.has_key(keys):
        CurveFit_params[keys] = []
    CurveFit_params[keys] = fitdata.Get_Coefficients()
    if not Residual_RMSD.has_key(keys):
        Residual_RMSD[keys] = float('%5.4f'%fitdata.Get_Residuals_RMSD())

#print Residual_RMSD
Esempio n. 2
0
#print expt1.extract_timecourse('A1')
#A1 = TimeCourse('A1',expt1.extract_timecourse('A1'))
#A1.display()
#print A1.mean()

def sigmoid(x, x0, k):
    y = 1/(1 + np.exp(-k*(x-x0)))
    return y

#test_key_set = ['A1','A2','A3','A4']
test_key_set = ['D3']

plate_data_object_list = []
#for item in plate_to_excel.keys(): #turn on later
for item in test_key_set:
    tmp = TimeCourse(item,expt1.extract_timecourse(item))
    plate_data_object_list.append(tmp)




selection = []
inducer = []
OD = []


for item in plate_data_object_list:
    tmp1 = []
    tmp2 = []
    count = 1
    for ll in item.data():
def Help():
    print 'This script generates a plot of differences in mean/median growth rate across adjacent wells for a fixed selection or inducer value'
    print 'Usage: <excel sheet>'
    exit()

excelfile = sys.argv[1]
expt1 = Experiment(excelfile)

plate_row = ['A','B','C','D','E','F','G','H']
diff_data = {}
for items in plate_row:
    junk = []
    for i in range(12):
        if i+2<=12:
            first_well = '%s%s'%(items,i+2)
            second_well = '%s%s'%(items,i+1)
            tmp1 = TimeCourse(first_well,expt1.extract_timecourse(first_well))
            tmp2 = TimeCourse(second_well, expt1.extract_timecourse(second_well))
            diff = tmp2.median() - tmp1.median()
            junk.append(float('%1.4f'%diff))
    if not diff_data.has_key(items):
        diff_data[items] = []
    diff_data[items] = junk

for keys in diff_data:
    outfile = open('%s_outfile'%keys,'w')
    for items in diff_data[keys]:
        outfile.write('%s\n'%items)
    outfile.close()