Esempio n. 1
0
# of the buffer/well.
no_nbd_lipo_well_names = ['B12', 'D12', 'F12'] # Ignoring H12 as an outlier
no_nbd_lipo_wells = extract(no_nbd_lipo_well_names, timecourse_wells)

# NBD-Bax but no lipos
no_lipo_well_names = ['A12', 'C12', 'E12', 'G12']
no_lipo_wells = extract(no_lipo_well_names, timecourse_wells)

bg_layout = collections.OrderedDict([
         ('NBD, No lipos', ['A12', 'C12', 'E12', 'G12']),
         ('No NBD or lipos', ['B12', 'D12', 'F12']),
         ('NBD and lipos', ['G9', 'G10', 'G11']),
        ])
# Produces average timecourses across replicates for the three background
# conditions
(bg_averages, bg_std) = averages(timecourse_wells, bg_layout)

# To do the correct background subtraction we need to account for the
# fluorescence of both the buffer itself and the liposomes. However, I
# unfortunately neglected to include a control condition with liposomes and no
# NBD-Bax. Fortunately, I can back-calculate the fluorescence of the liposomes
# alone by sutracting the NBD-Bax + buffer condition from the NBD-Bax + lipos +
# buffer condition. This value can then be added back to the buffer only
# condition to get the background vector (buffer + lipos) that will be
# subtracted from all NBD-Bax timecourses.
#
# However, note that since the NBD-Bax + lipos + buffer condition will include
# fluorescence increases due to spontaneous activation and insertion of Bax,
# whereas the NBD-Bax + buffer (no liposomes) will not incorporate this
# increase. Therefore ONLY the initial timepoints (say, the average of the
# first three timepoints) should be used to establish the liposome-only
Esempio n. 2
0
data_path = dirname(sys.modules['tbidbaxlipo.data'].__file__)
timecourse_file = abspath(join(data_path,
                               '140320_NBD_Bax_BimBH3_unlab_Bax_titration.txt'))

# Assemble all the wells included in the layout
# http://stackoverflow.com/questions/406121/
# flattening-a-shallow-list-in-python
wells_to_read = list(itertools.chain(*layout.values()))

# Timecourse wells
timecourse_wells = read_flexstation_kinetics(timecourse_file)
"""The raw (unnormalized) timecourses."""
timecourse_wells = extract(wells_to_read, timecourse_wells)

# Averaged
(timecourse_averages, timecourse_stds) = averages(timecourse_wells, layout)

bax_bg_conditions = [
        'Bax 590 nM',
        'Bax 393 nM',
        'Bax 262 nM',
        'Bax 175 nM',
        'Bax 116 nM',
        'Bax 78 nM',
        'Bax 52 nM',
        'Bax 35 nM',
        'Bax 23 nM',
        'Bax 15 nM',
        'Bax 10 nM',
        'Bax 0 nM']
Esempio n. 3
0
        'Bax 185 nM, Lipos 0.063 mg/ml',
        'Bax 185 nM, Lipos 0.031 mg/ml',
        'Bax 185 nM, Lipos 0.016 mg/ml',
        'Bax 185 nM, Lipos 0.008 mg/ml',
        'Bax 185 nM, Lipos 0.004 mg/ml',
        'Bax 185 nM, Lipos 0.002 mg/ml',
        'Bax 185 nM, Lipos 0.001 mg/ml',
        'Bax 185 nM, Lipos 0 mg/ml', ]
bax_lipo_layout = extract(bax_lipo_conditions, layout)
bax_lipo_wells = extract([layout[cond][0] for cond in bax_lipo_conditions],
                         timecourse_wells)

# Normalized and background subtracted
bgsub_wells = subtract_background_set(bax_lipo_wells, lipo_bg_wells)

(bgsub_averages, bgsub_sds) = averages(bgsub_wells, bax_lipo_layout)

# First timepoint shifted to 0 (better for fitting)
#reset_bgsub_means = reset_first_timepoint_to_zero(bgsub_norm_averages)
"""Timecourses normalized, BG-subtracted, averaged, then with first point
shifted to t = 0."""
#reset_bgsub_sds = reset_first_timepoint_to_zero(bgsub_norm_stds)

lipo_conc_conv_factor = 15.502 # 1 mg/ml ~= 15.502 nM liposomes
bg_tc = bgsub_averages['Bax 185 nM, Lipos 0 mg/ml'][VALUE]
bg_time = bgsub_averages['Bax 185 nM, Lipos 0 mg/ml'][TIME]
lipo_concs_to_fit = []
lipo_mgs_to_fit = [1., 0.5, 0.25, 0.125, 0.063, 0.031, 0.016, 0.008]
# Initialize numpy data matrix
data_to_fit = np.zeros((len(lipo_mgs_to_fit), 1, len(bg_time)))
# Initialize matrix of experimental error values