Edit 2: There is no photo. It can\'t be blurry. EDIT: We\'re going from Matlab t
ID: 3704691 • Letter: E
Question
Edit 2: There is no photo. It can't be blurry.
EDIT: We're going from Matlab to Python, and the purpose of the code is to
Part a: Perform linear regression analysis for the relevant 28 wells (against time) to obtain the slopes. - For each concentration (e.g. 10 µL), calculate the average slope and the standard deviation of the slope based on the four replicates. - Create a calibration curve by plotting the average slopes ± standard deviation (the command errorbar might help). Also use linear regression and add the line to the plot. Please report the coefficients.
Part b) Perform linear regression analysis on the relevant dataset and calculate the average slope for the 4 ‘DI’-wells. - Use the calibration curve you created in b) to calculate what number of cells (volume equivalent) was alive in the DI-wells. - Calculate the percentage of cells killed considering that initially 200 µL of cells were in the wells.
And finally: Complete the same calculation that was done for DI for the 16 new formulations. Present the ‘percent killed’ for the 16 formulations in a bar graph.
The assignment file is just an excel sheet of all the data we need.
Convert this code to python:
Explanation / Answer
data = xlsread(mstring('Assignments3.xls')) data = data(mslice[39:end], mslice[:]) data = data(mslice[1:end - 4], mslice[:]) a = ones(96, 2) for i in mslice[1:96]: a(i, mslice[:]).lvalue = polyfit(data(mslice[:], 2), data(mslice[:], 3 + i), 1) plot(data(mslice[:], 2), data(mslice[:], 3 + i)) end for i in mslice[1:24]: average_slopes(i).lvalue = mean(a(mslice[1 + 4 * (i - 1):4 + 4 * (i - 1)])) std_slopes(i).lvalue = std(a(mslice[1 + 4 * (i - 1):4 + 4 * (i - 1)])) end c_bacteria = mcat([0, 10, 20, 30, 40, 50, 60]) errorbar(c_bacteria, average_slopes(mslice[1:7]), std_slopes(mslice[1:7]), mstring('x')) P = polyfit(c_bacteria, average_slopes(mslice[1:7]), 1); print P hold(mstring('on')) plot(mcat([min(c_bacteria), max(c_bacteria)]), polyval(P, mcat([min(c_bacteria), max(c_bacteria)]))) hold(mstring('off')) # DI C_DI = (average_slopes(8) - P(2)) / P(1) DI_percent_killed = 100 - C_DI / 200 * 100; print DI_percent_killed # formulations C_Fn = (average_slopes(mslice[9:24]) - P(2)) /eldiv/ P(1) Fn_percent_killed = 100 - C_Fn / 200 * 100; print Fn_percent_killed figure(2) bar(Fn_percent_killed)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.