Пример #1
0
def melki_rate_error_plot(figure):
#    results = data.load_data('results/melki_rate_sensitivities.dat')
    results = data.load_data('results/melki_cooperative_fit.dat')
    cooperativities, rates, min_rates, max_rates = results[:4]

    theoretical_rates = 1.0 / (HALFTIME * numpy.sqrt(cooperativities))
    errors = numpy.array(numpy.array(rates) - numpy.array(min_rates)) / theoretical_rates
    rates = numpy.array(rates) / theoretical_rates

#    with contexts.basic_figure('plots/melki_rate_errors.pdf',
    with contexts.subplot(figure, (2, 1, 2), title='B',
            x_label=r'Pi Dissociation Cooperativity, $\rho_d$',
            y_label=r'$r_d$ [Simulation / Theory]',
            logscale_x=True,
#            logscale_y=True
            ) as axes:
        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5)

        contexts.plot(axes, 'errorbar', cooperativities,
                rates, errors, fmt='k.')
        contexts.plot(axes, 'plot', cooperativities,
                [1 for c in cooperativities], 'r-', linewidth=0.5)

        axes.set_xlim([0.1, 10**12])

        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])
        

        axes.set_ylim([0, 1.2])
Пример #2
0
def tip_filaments():
    random_results = data.load_data('results/depolymerization_timecourses.dat')

    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    rtimes, rvalues = numpy.array(random_results[0]), random_results[1:]

    etimes, evals = numpy.array(expt[0]), expt[1]

    rtimes -= 300

#    with contexts.basic_figure('plots/depoly_tip_filaments.pdf',
    with contexts.subplot(figure, (2, 2, 3), title='A',
            x_label='Time [s]',
            y_label=r'Filament Length [$\mu$m]') as axes:
        for y in rvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(axes, 'plot', rtimes, y, '-', color='#FFA0A0',
                    linewidth=THIN_LINE)

        contexts.plot(axes, 'plot', etimes, evals, 'k', linewidth=0.7)
        axes.set_ylim(0, 15)
        axes.set_xlim(0, 1000)
Пример #3
0
def melki_sample_timecourses(figure):
    data_f_times, data_f = data.load_data("experimental_data/melki_fievez_carlier_1996/factin_concentration.dat")
    data_p_times, data_p = data.load_data("experimental_data/melki_fievez_carlier_1996/phosphate_concentration.dat")
    data_p = numpy.array(data_p)

    sim_f = data.load_data("results/melki_timecourses_f.dat")
    sim_p = data.load_data("results/melki_timecourses_p.dat")
    sf_times, sf_vals = sim_f[0], sim_f[1:]
    sp_times, sp_vals = sim_p[0], sim_p[1:]

    colors = ["b", "g", "r", "orange"]
    #    labels = [r'$\rho_d\to\,\infty$', r'$\rho_d =\,1$', r'$\rho_d =\,10^4$', r'$\rho_d =\,10^8$']

    with contexts.subplot(
        figure, (1, 1, 1), x_label=r"Time [s]", y_label=r"Concentrations [$\mu$M]"  # title='A',
    ) as axes:
        axes.fill_between(data_p_times, data_p * (1 - MELKI_ERROR), data_p * (1 + MELKI_ERROR), color="#CCCCCC")
        axes.plot(data_f_times, data_f, "k--")
        axes.plot(data_p_times, data_p, "k-", label="Data")

        for f, p, c in zip(sf_vals, sp_vals, colors):
            axes.plot(sf_times, f, color=c, linestyle="--")
            axes.plot(sp_times, p, color=c, linestyle="-")

        axes.set_ylim([0, 35])
        axes.set_xlim([0, 2500])

        inset_qof(figure)
Пример #4
0
def asymptotic_plot(figure):
    results = data.load_data('results/asymptotic_adppi_v_pi.dat')
    pis, fractions = results[0], results[1:]

    with contexts.subplot(figure, (2, 2, 2), title='C',
            x_label=r'Pi Concentration [$\mu$M]',
            y_label=r'Asymptotic Fraction [F-ADP-Pi-actin]',
            logscale_x=True) as axes:
#        for frac in fractions:
#            contexts.plot(axes, 'plot', pis, frac)
        contexts.plot(axes, 'plot', pis, fractions[0], 'b')

        axes.set_ylim(0, 1)

        axes.axhline(0.5, 0, 1, linestyle='-', linewidth=0.5, color='k')
        axes.axvline(HALF_CONCENTRATION, 0, 0.5,
                linestyle=':', linewidth=0.5, color='k')

        axes.annotate(r'$c^*$', xy=(HALF_CONCENTRATION, 0.001),
                xytext=(HALF_CONCENTRATION + 2000, 0.15),
                arrowprops={'facecolor': 'black',
                    'arrowstyle': '->'},
                size=settings.SMALL_FONT_SIZE)

        axes.text(4000, 0.8, r'$\rho_d =\,1$',
                horizontalalignment='right', # verticalalignment='bottom',
                size=settings.SMALL_FONT_SIZE)
Пример #5
0
def melki_rate_fit_quality(figure):
    results = data.load_data('results/melki_cooperative_fit.dat')
    (cooperativities, rates, min_rates, max_rates, rate_pe,
            chi2, min_chi2, max_chi2, chi2_pe) = results
    v_results = data.load_data('results/melki_vectorial_fit.dat')
    (v_rate, junk, junk, junk,
            v_chi2, v_min_chi2, v_max_chi2, junk) = zip(*v_results)[0]
    with contexts.subplot(figure, (2, 1, 2), title='B',
            x_label=r'$\rho_d$',
            y_label=r'$\chi^2$ Comparison To Data',
            logscale_x=True) as axes:
        axes.fill_between([0.1, 1.0e12],
                [v_min_chi2, v_min_chi2],
                v_max_chi2, color='#CCCCFF')
        axes.axhline(v_chi2, 0, 1, linestyle=':', color='b')
        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5)

        contexts.plot(axes, 'errorbar', cooperativities,
                chi2, [c - m for c, m in zip(chi2, min_chi2)],
                fmt='k.')

        axes.set_xlim([0.1, 10**12])
        axes.set_ylim([0, 14])

        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])
Пример #6
0
def melki_sample_timecourses(figure):
    data_f_times, data_f = data.load_data(
            'experimental_data/melki_fievez_carlier_1996/factin_concentration.dat')
    data_p_times, data_p = data.load_data(
            'experimental_data/melki_fievez_carlier_1996/phosphate_concentration.dat')
    data_p = numpy.array(data_p)

    sim_f = data.load_data('results/melki_timecourses_f.dat')
    sim_p = data.load_data('results/melki_timecourses_p.dat')
    sf_times, sf_vals = sim_f[0], sim_f[1:]
    sp_times, sp_vals = sim_p[0], sim_p[1:]

    colors = ['b', 'g', 'r', 'orange']
#    labels = [r'$\rho_d\to\,\infty$', r'$\rho_d =\,1$', r'$\rho_d =\,10^4$', r'$\rho_d =\,10^8$']

    with contexts.subplot(figure, (1, 1, 1), #title='A',
            x_label=r'Time [s]',
            y_label=r'Concentrations [$\mu$M]') as axes:
        axes.fill_between(data_p_times,
                data_p * (1 - MELKI_ERROR), data_p * (1 + MELKI_ERROR),
                color='#CCCCCC')
        axes.plot(data_f_times, data_f, 'k--')
        axes.plot(data_p_times, data_p, 'k-', label='Data')

        for f, p, c in zip(sf_vals, sp_vals, colors):
            axes.plot(sf_times, f, color=c, linestyle='--')
            axes.plot(sp_times, p, color=c, linestyle='-')

        axes.set_ylim([0, 35])
        axes.set_xlim([0, 2500])

        inset_qof(figure)
Пример #7
0
def cc_tip(figure):
    results = data.load_data('results/cc_d_tip.dat')

    pars, ccs, ds = results

    with contexts.subplot(figure, (2, 1, 1), title='A',
            y_label=r'Critical Concentration [$\mu$M]',
            logscale_x=False, logscale_y=False) as axes:
        contexts.plot(axes, 'plot', pars, ccs, 'k-')


    with contexts.subplot(figure, (2, 1, 2), title='B',
            y_label=r'Diffusion Coefficient [mon^2/s]',
            x_label=r'Barbed End Pi Dissociation Rate [s$^{-1}$]',
            logscale_x=False, logscale_y=False) as axes:
        contexts.plot(axes, 'plot', pars, ds, 'k-')
Пример #8
0
def tip_filaments():
    random_results = data.load_data('results/depolymerization_timecourses.dat')

    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    rtimes, rvalues = numpy.array(random_results[0]), random_results[1:]

    etimes, evals = numpy.array(expt[0]), expt[1]

    rtimes -= 300

    #    with contexts.basic_figure('plots/depoly_tip_filaments.pdf',
    with contexts.subplot(figure, (2, 2, 3),
                          title='A',
                          x_label='Time [s]',
                          y_label=r'Filament Length [$\mu$m]') as axes:
        for y in rvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(axes,
                          'plot',
                          rtimes,
                          y,
                          '-',
                          color='#FFA0A0',
                          linewidth=THIN_LINE)

        contexts.plot(axes, 'plot', etimes, evals, 'k', linewidth=0.7)
        axes.set_ylim(0, 15)
        axes.set_xlim(0, 1000)
Пример #9
0
def vec_tcs(figure):
    data_f_times, data_f = data.load_data(
            'experimental_data/melki_fievez_carlier_1996/factin_concentration.dat')
    data_p_times, data_p = data.load_data(
            'experimental_data/melki_fievez_carlier_1996/phosphate_concentration.dat')
    data_p = numpy.array(data_p)

    sim_p = data.load_data('results/melki_timecourses_p.dat')
    sp_times, sp_vals = sim_p[0], sim_p[1]

    nbesim_p = data.load_data('results/melki_nonbe_tc_p.dat')

    colors = ['b', 'g', 'r', 'orange']
    labels = ['Vectorial', 'Random', r'$\rho_d = 10^4$', r'$\rho_d = 10^8$']

    with contexts.subplot(figure, (1, 1, 1),
            x_label=r'Time [s]',
            y_label=r'Concentrations [$\mu$M]') as axes:
        axes.fill_between(data_p_times,
                data_p * (1 - MELKI_ERROR), data_p * (1 + MELKI_ERROR),
                color='#CCCCCC')
        axes.plot(data_f_times, data_f, 'k--')
        axes.plot(data_p_times, data_p, 'k-', label='Data')

        # BE included
        axes.plot(sp_times, sp_vals, color='b', linestyle='-', label='BE')
        # Non-BE
        axes.plot(nbesim_p[0], nbesim_p[1], color='r', linestyle='-', label='Non-BE')

        axes.set_ylim([0, 35])
        axes.set_xlim([0, 2500])

        axes.legend(loc=4)
Пример #10
0
def copoly_timecourse_plot(figure, xmax=1000, ymax=35):
    timecourses = data.load_data('results/copoly_timecourse.dat')

    with contexts.subplot(figure, (2, 1, 1), title='A',
            x_label='Time [s]',
            y_label=r'Concentrations [$\mu$M]') as axes:
        # factin
        contexts.plot(axes, 'plot', timecourses[0], timecourses[1], 'b-.')
        # pi
        contexts.plot(axes, 'plot', timecourses[0], timecourses[3], 'g-')

        axes.set_xlim(0, xmax)
        axes.set_ylim(0, ymax)

        # Lines to highlight halftime
        axes.axhline(15, 0, 1, linestyle='-', linewidth=0.5, color='k')
        axes.axvline(TIMECOURSE_HALFTIME, 0, 15.0 / 35,
                linestyle=':', linewidth=0.5, color='k')

        # Halftime label with arrow
#        axes.annotate('halftime', xy=(TIMECOURSE_HALFTIME, 0.05),
        axes.annotate(r'$t_{\frac{1}{2}}$', xy=(TIMECOURSE_HALFTIME, 0.05),
                xytext=(TIMECOURSE_HALFTIME + 200, 5),
                arrowprops={'facecolor': 'black',
                    'arrowstyle': '->'},
                size=settings.SMALL_FONT_SIZE)

        # Curve labels
        axes.text(0.5 * xmax, 30.5, '[F-actin]',
                horizontalalignment='center', verticalalignment='bottom',
                size=settings.SMALL_FONT_SIZE)
        axes.text(600, 20.5, '[Pi]',
                horizontalalignment='right', verticalalignment='bottom',
                size=settings.SMALL_FONT_SIZE)
Пример #11
0
def copoly_adp_only(figure):
    adp_halftimes = data.load_data('results/adp_copoly_halftimes.dat')
    adp_v_halftimes = data.load_data(
        'results/adp_copoly_halftimes_vectorial.dat')

    fractions, halftimes = adp_halftimes[0], adp_halftimes[1:]
    v_fractions, v_halftimes = adp_v_halftimes[0], adp_v_halftimes[1]

    with contexts.subplot(
            figure,
        (1, 1, 1),  #title='B',
            y_label=r'[Pi] Halftime [s]',
            x_label=r'% ADP-actin') as axes:
        for ht, lt, in zip(halftimes, LINETYPES):
            #            contexts.plot(axes, 'plot', fractions, numpy.array(ht)/ht[0], lt)
            contexts.plot(axes, 'plot', fractions, numpy.array(ht), lt)

#        contexts.plot(axes, 'plot', v_fractions, numpy.array(v_halftimes)/v_halftimes[0], 'k-')
        contexts.plot(axes, 'plot', v_fractions, numpy.array(v_halftimes),
                      'k-')

        new_x_tick_labels = [0, 5, 10, 15, 20]

        axes.set_xticks([0, 0.05, 0.1, 0.15, 0.2])
        axes.set_xticklabels(new_x_tick_labels)
Пример #12
0
def stacked_timecourses(figure):
    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    with contexts.subplot(
            figure, (1, 1, 1)
            #            x_label=r'Time [s]',
            #            y_label=r'Filament Length [$\mu$M]'
    ) as axes:
        plot_rv_traces(axes, expt)
        plot_be_traces(axes, expt)
        plot_coop_traces(axes, expt)
        plot_fast_traces(axes, expt)
        axes.set_xlim([0, 1100])
        axes.set_ylim([0, 30])
        axes.set_xticks([])
        #        axes.set_xticks([0, 200, 400, 600, 800, 1000])
        axes.set_yticks([])
        axes.set_frame_on(False)

        add_scale_bar(
            axes,
            (200, 2),
            #                scale_position=(0.875, 0.675))
            scale_position=(0.05, 0.45))
    inset_qof(figure)
Пример #13
0
def normal_timecourses(figure):
    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    with contexts.subplot(figure, (2, 2, 1),
                          title='A',
                          x_label=r'Time [s]',
                          y_label=r'Filament Length [$\mu$M]') as axes:
        # Random filaments
        plot_traces(axes,
                    'results/depoly_tc_random.dat',
                    color='#80CC80',
                    thickness=THIN_LINE)
        # Vectorial filaments
        plot_traces(
            axes,
            'results/depoly_tc_vectorial.dat',
            color='#BBBB80',
            #            color='#8080FF',
            thickness=THIN_LINE)
        # Vec non be
        #    plot_traces(top_left_axes,
        #            'results/depoly_nonbe_tc.dat',
        #            color='#80FF80', thickness=THIN_LINE)
        # Data on top
        axes.plot(expt[0], expt[1], 'k.', markersize=1, clip_on=False)
Пример #14
0
def normal_timecourses(figure):
    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    with contexts.subplot(figure, (2, 2, 1), title='A',
            x_label=r'Time [s]',
            y_label=r'Filament Length [$\mu$M]') as axes:
        # Random filaments
        plot_traces(axes,
                'results/depoly_tc_random.dat',
                color='#80CC80',
                thickness=THIN_LINE)
        # Vectorial filaments
        plot_traces(axes,
                'results/depoly_tc_vectorial.dat',
                color='#BBBB80',
    #            color='#8080FF',
                thickness=THIN_LINE)
        # Vec non be
    #    plot_traces(top_left_axes,
    #            'results/depoly_nonbe_tc.dat',
    #            color='#80FF80', thickness=THIN_LINE)
        # Data on top
        axes.plot(expt[0], expt[1], 'k.',
                markersize=1, clip_on=False)
Пример #15
0
def melki_rate_error_plot(figure):
    #    results = data.load_data('results/melki_rate_sensitivities.dat')
    results = data.load_data("results/melki_cooperative_fit.dat")
    cooperativities, rates, min_rates, max_rates = results[:4]

    theoretical_rates = 1.0 / (HALFTIME * numpy.sqrt(cooperativities))
    errors = numpy.array(numpy.array(rates) - numpy.array(min_rates)) / theoretical_rates
    rates = numpy.array(rates) / theoretical_rates

    #    with contexts.basic_figure('plots/melki_rate_errors.pdf',
    with contexts.subplot(
        figure,
        (2, 1, 2),
        title="B",
        x_label=r"Pi Dissociation Cooperativity, $\rho_d$",
        y_label=r"$r_d$ [Simulation / Theory]",
        logscale_x=True,
        #            logscale_y=True
    ) as axes:
        axes.axvline(RHO_CRIT, 0, 1, linestyle="--", color="g", linewidth=0.5)

        contexts.plot(axes, "errorbar", cooperativities, rates, errors, fmt="k.")
        contexts.plot(axes, "plot", cooperativities, [1 for c in cooperativities], "r-", linewidth=0.5)

        axes.set_xlim([0.1, 10 ** 12])

        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])

        axes.set_ylim([0, 1.2])
Пример #16
0
def cooperativity_plot(figure):
    x, y = data.load_data('results/rho_v_pi.dat')
    with contexts.subplot(figure, (2, 2, 4), title='D',
#            x_label=r'Asymptotic Fraction [F-ADP-Pi-actin]',
            x_label=r'[Pi]$_{\frac{1}{2}}$ [$\mu$M]',
            y_label=r'Pi Dissociation Cooperativity, $\rho_d$',
            logscale_x=True, logscale_y=True) as axes:
        contexts.plot(axes, 'plot', x, y, 'k')
Пример #17
0
def coop_timecourses(figure):
    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    with contexts.subplot(
            figure,
        (1, 2, 2),  #title='E',
            x_label=r'Time [s]') as axes:
        axes.plot(expt[0], expt[1], 'k.', markersize=1, clip_on=False)
Пример #18
0
def coop_timecourses(figure):
    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    with contexts.subplot(figure, (1, 2, 2), #title='E',
            x_label=r'Time [s]'
            ) as axes:
        axes.plot(expt[0], expt[1], 'k.',
                markersize=1, clip_on=False)
Пример #19
0
def linear_lagtime_plot(
        figure,
        coop_linestyles=[
            'k--',  # Random
            'r--',  # XXX Consider making green
            'b--',
            'g--'
        ],
        cooperative_filename='results/fnc_cooperative_lagtimes.dat',
        vectorial_filename='results/fnc_vectorial_lagtimes.dat',
        data_filename='experimental_data/carlier_1986/lagtimes.dat'):
    d_fncs, d_lagtimes = data.load_data(data_filename)
    d_norm_lagtimes = d_lagtimes[0] / numpy.array(d_lagtimes)

    coop_data = data.load_data(cooperative_filename)
    coop_fncs, coop_lagtimes = coop_data[0], coop_data[1:]
    coop_fncs = numpy.array(coop_fncs) * 1000

    v_fncs, v_lagtimes = data.load_data(vectorial_filename)
    v_fncs = numpy.array(v_fncs) * 1000
    # index 0 is at fnc = 1.1 nM
    v_lagtimes = v_lagtimes[0] / numpy.array(v_lagtimes)

    th_fncs = numpy.linspace(1, 20, 100)
    v_theory = th_fncs / 1.1

    r_theory = numpy.ones(len(th_fncs))

    with contexts.subplot(
            figure,
        (1, 1, 1),  #title='A',
            x_label=r'$n$ [nM]',
            y_label=r'$t_{lag}^{-1}$ [AU]') as axes:
        # Cooperative simulations
        for lagtimes, linestyle in zip(coop_lagtimes, coop_linestyles):
            # index 0 is at fnc = 1.1 nM
            y = lagtimes[0] / numpy.array(lagtimes)
            axes.plot(coop_fncs, y, linestyle, dashes=(3, 3.5))

        # Vectorial simulations
        axes.plot(v_fncs, v_lagtimes, 'k--', dashes=(3, 3.5))

        # Vectorial theory
        axes.plot(th_fncs, v_theory, 'k-', linewidth=0.5)

        # Random theory
        axes.plot(th_fncs, r_theory, 'k-', linewidth=0.5)

        # Carlier 1986 data
        axes.plot(d_fncs, d_norm_lagtimes, 'ko')

        axes.set_xlim([0, 22])
        x_ticks = [1.1, 5, 10, 15, 20]
        axes.set_xticks(x_ticks)
        axes.set_xticklabels(map(str, x_ticks))

        inset_qof_plot(figure)
Пример #20
0
def non_be_quality(figure):
    results = data.load_data('results/melki_cooperative_fit.dat')
    (cooperativities, rates, min_rates, max_rates, rate_pe, chi2, min_chi2,
     max_chi2, chi2_pe) = results
    nb_results = data.load_data('results/melki_non_be_coop_fit.dat')
    (nbc, nbr, nbminr, nbmaxr, nbrpe, nbchi2, nbminc2, nbmaxc2,
     nbcpe) = nb_results
    nop_results = data.load_data('results/melki_no_pointed_coop_fit.dat')
    (nbc, nopr, junk, junk, jukn, nopc2, nopminc2, nopmaxc2,
     junk) = nop_results

    v_results = data.load_data('results/melki_vectorial_fit.dat')
    (v_rate, junk, junk, junk, v_chi2, v_min_chi2, v_max_chi2,
     junk) = zip(*v_results)[0]
    v_nb_results = data.load_data('results/melki_non_be_vec_fit.dat')
    (v_nbr, v_nbminr, v_nbmaxr, v_nbrpe, v_nbchi2, v_nbminc2, v_nbmaxc2,
     v_nbcpe) = zip(*v_nb_results)[0]

    with contexts.subplot(figure, (2, 1, 2),
                          title='B',
                          x_label=r'Pi Dissociation Cooperativity, $\rho_d$',
                          y_label=r'$\chi^2$ Comparison To Data',
                          logscale_x=True) as axes:
        axes.fill_between([0.1, 1.0e12], [v_min_chi2, v_min_chi2],
                          v_max_chi2,
                          color='#AAAAAA')
        axes.fill_between([0.1, 1.0e12], [v_nbminc2, v_nbminc2],
                          v_nbmaxc2,
                          color='#CCCCFF')
        axes.axhline(v_chi2, 0, 1, linestyle=':', color='k')
        axes.axhline(v_nbchi2, 0, 1, linestyle=':', color='b')
        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5)

        contexts.plot(axes,
                      'errorbar',
                      cooperativities,
                      chi2, [c - m for c, m in zip(chi2, min_chi2)],
                      fmt='k.')

        contexts.plot(axes,
                      'errorbar',
                      cooperativities,
                      nbchi2, [c - m for c, m in zip(nbchi2, nbminc2)],
                      fmt='b.')

        contexts.plot(axes,
                      'errorbar',
                      cooperativities,
                      nopc2, [c - m for c, m in zip(nopc2, nopminc2)],
                      fmt='g.')

        axes.set_xlim([0.1, 10**12])
        axes.set_ylim([0, 14])

        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])
Пример #21
0
def cc_tip(figure):
    results = data.load_data('results/cc_d_tip.dat')

    pars, ccs, ds = results

    with contexts.subplot(figure, (2, 1, 1),
                          title='A',
                          y_label=r'Critical Concentration [$\mu$M]',
                          logscale_x=False,
                          logscale_y=False) as axes:
        contexts.plot(axes, 'plot', pars, ccs, 'k-')

    with contexts.subplot(
            figure, (2, 1, 2),
            title='B',
            y_label=r'Diffusion Coefficient [mon^2/s]',
            x_label=r'Barbed End Pi Dissociation Rate [s$^{-1}$]',
            logscale_x=False,
            logscale_y=False) as axes:
        contexts.plot(axes, 'plot', pars, ds, 'k-')
Пример #22
0
def melki_rate_plot(figure):
#    results = data.load_data('results/melki_rates.dat')
    results = data.load_data('results/melki_cooperative_fit.dat')
    v_results = data.load_data('results/melki_vectorial_fit.dat')

#    results = data.load_data('results/melki_rate_sensitivities.dat')
#    cooperativities, rates, statistical_errors, halftimes, hte = results
#    cooperativities, rates, errors = results[:3]
    cooperativities, rates = results[:2]
    v_rate_pack = zip(*v_results)[0][:3]

#    with contexts.basic_figure('plots/melki_rates.pdf',
    with contexts.subplot(figure, (1, 1, 1), #title='A',
            x_label=r'$\rho_d$',
#            y_label=r'Non-Boundary Pi Dissociation Rate, $r_d$ [$s^{-1}$]',
            y_label=r'$r_d$ [$s^{-1}$]',
            logscale_x=True, logscale_y=True) as axes:
        contexts.plot(axes, 'plot', cooperativities, rates, 'k.')
#        contexts.plot(axes, 'errorbar', cooperativities, rates,
#                errors, fmt='k.')

        cooperativities = numpy.array(cooperativities)
        contexts.plot(axes, 'plot',
                cooperativities, 1.0 / (HALFTIME * numpy.sqrt(cooperativities)),
                'r-', linewidth=0.5)

        axes_2 = axes.twinx()
        axes_2.set_yscale('log')
        axes_2.set_ylabel(r'$R_d$ [$s^{-1}$]',
                size=settings.LABEL_FONT_SIZE)
        for label in axes_2.get_yticklabels():
            label.set_size(settings.TICK_FONT_SIZE)

        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5,
            dashes=(3, 3))

        axes.set_yticks([1.0e-9, 1.0e-8, 1.0e-7, 1.0e-6, 1.0e-5, 1.0e-4, 1.0e-3])
        axes.minorticks_off()


        contexts.plot(axes_2, 'plot', cooperativities,
                cooperativities * rates, 'k.', markerfacecolor='None')

        axes_2.axhline(v_rate_pack[0], 0, 1, linestyle=':', color='b')
        axes_2.set_ylim([1.0e-4, 100])
        axes_2.set_yticks([1.0e-3, 1.0e-2, 1.0e-1, 1, 1.0e1])
        axes_2.minorticks_off()

        axes.set_xlim([0.1, 10**11])

        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])

        inset_error_plot(figure)
Пример #23
0
def crit_conc(figure):
    results = data.load_data('results/cc_d_cooperative.dat')
    v_results = data.load_data('results/cc_d_vectorial.dat')

    coops, ccs, ds = results
    vcc, vd = v_results[0][0], v_results[1][0]

    with contexts.subplot(figure, (2, 1, 1), title='A',
            y_label=r'Critical Concentration [$\mu$M]',
            logscale_x=True, logscale_y=False) as axes:
        contexts.plot(axes, 'plot', coops, ccs, 'k-')

        axes.axhline(vcc, 0, 1, linestyle=':', linewidth=0.5, color='k')
        axes.set_ylim(0.1, 0.2)

    with contexts.subplot(figure, (2, 1, 2), title='B',
            y_label=r'Diffusion Coefficient [mon^2/s]',
            logscale_x=True, logscale_y=False) as axes:
        contexts.plot(axes, 'plot', coops, ds, 'k-')
        axes.axhline(vd, 0, 1, linestyle=':', linewidth=0.5, color='k')
Пример #24
0
def timecourse_plot(figure, xmax=3600, ymax=35):
    timecourses = data.load_data('results/pi_saturation_timecourse.dat')

    with contexts.subplot(figure, (2, 2, 1),
                          title='A',
                          x_label='Time [s]',
                          y_label=r'Concentrations [$\mu$M]') as axes:
        # factin
        contexts.plot(axes, 'plot', timecourses[0], timecourses[1], 'b-.')
        # adp-pi
        contexts.plot(axes, 'plot', timecourses[0], timecourses[3], 'g-')
        # pi
        contexts.plot(axes, 'plot', timecourses[0], timecourses[5], 'r-')

        axes.set_xlim(0, xmax)
        axes.set_ylim(0, ymax)

        # Lines to highlight halftime
        axes.axhline(15,
                     0,
                     float(TIMECOURSE_HALFTIME) / xmax,
                     linestyle=':',
                     linewidth=0.5,
                     color='k')
        axes.axvline(TIMECOURSE_HALFTIME,
                     0,
                     15.0 / 35,
                     linestyle=':',
                     linewidth=0.5,
                     color='k')

        # Halftime label with arrow
        axes.annotate('halftime',
                      xy=(TIMECOURSE_HALFTIME, 0.05),
                      xytext=(TIMECOURSE_HALFTIME + 200, 5),
                      arrowprops={
                          'facecolor': 'black',
                          'arrowstyle': '->'
                      },
                      size=settings.SMALL_FONT_SIZE)

        # Curve labels
        axes.text(0.5 * xmax,
                  30.5,
                  '[F-actin]',
                  horizontalalignment='center',
                  verticalalignment='bottom',
                  size=settings.SMALL_FONT_SIZE)
        axes.text(600,
                  20.5,
                  '[ADP-Pi-actin]',
                  horizontalalignment='right',
                  verticalalignment='bottom',
                  size=settings.SMALL_FONT_SIZE)
Пример #25
0
def linear_lagtime_plot(figure,
        coop_linestyles=['k--', # Random
                         'r--', # XXX Consider making green
                         'b--',
                         'g--'
                         ],
        cooperative_filename='results/fnc_cooperative_lagtimes.dat',
        vectorial_filename='results/fnc_vectorial_lagtimes.dat',
        data_filename='experimental_data/carlier_1986/lagtimes.dat'):
    d_fncs, d_lagtimes = data.load_data(data_filename)
    d_norm_lagtimes = d_lagtimes[0] / numpy.array(d_lagtimes)

    coop_data = data.load_data(cooperative_filename)
    coop_fncs, coop_lagtimes = coop_data[0], coop_data[1:]
    coop_fncs = numpy.array(coop_fncs) * 1000

    v_fncs, v_lagtimes = data.load_data(vectorial_filename)
    v_fncs = numpy.array(v_fncs) * 1000
    # index 0 is at fnc = 1.1 nM
    v_lagtimes = v_lagtimes[0] / numpy.array(v_lagtimes)

    th_fncs = numpy.linspace(1, 20, 100)
    v_theory = th_fncs / 1.1

    r_theory = numpy.ones(len(th_fncs))

    with contexts.subplot(figure, (1, 1, 1), #title='A',
            x_label=r'$n$ [nM]',
            y_label=r'$t_{lag}^{-1}$ [AU]') as axes:
        # Cooperative simulations
        for lagtimes, linestyle in zip(coop_lagtimes, coop_linestyles):
            # index 0 is at fnc = 1.1 nM
            y = lagtimes[0] / numpy.array(lagtimes)
            axes.plot(coop_fncs, y, linestyle, dashes=(3,3.5))

        # Vectorial simulations
        axes.plot(v_fncs, v_lagtimes, 'k--', dashes=(3,3.5))

        # Vectorial theory
        axes.plot(th_fncs, v_theory, 'k-', linewidth=0.5)

        # Random theory
        axes.plot(th_fncs, r_theory, 'k-', linewidth=0.5)
        
        # Carlier 1986 data
        axes.plot(d_fncs, d_norm_lagtimes, 'ko')

        axes.set_xlim([0, 22])
        x_ticks = [1.1, 5, 10, 15, 20]
        axes.set_xticks(x_ticks)
        axes.set_xticklabels(map(str, x_ticks))

        inset_qof_plot(figure)
Пример #26
0
def cooperativity_plot(figure):
    x, y = data.load_data('results/rho_v_pi.dat')
    with contexts.subplot(
            figure,
        (2, 2, 4),
            title='D',
            #            x_label=r'Asymptotic Fraction [F-ADP-Pi-actin]',
            x_label=r'[Pi]$_{\frac{1}{2}}$ [$\mu$M]',
            y_label=r'Pi Dissociation Cooperativity, $\rho_d$',
            logscale_x=True,
            logscale_y=True) as axes:
        contexts.plot(axes, 'plot', x, y, 'k')
Пример #27
0
def melki_rate_plot(figure):
    #    results = data.load_data('results/melki_rates.dat')
    results = data.load_data("results/melki_cooperative_fit.dat")
    v_results = data.load_data("results/melki_vectorial_fit.dat")

    #    results = data.load_data('results/melki_rate_sensitivities.dat')
    #    cooperativities, rates, statistical_errors, halftimes, hte = results
    #    cooperativities, rates, errors = results[:3]
    cooperativities, rates = results[:2]
    v_rate_pack = zip(*v_results)[0][:3]

    #    with contexts.basic_figure('plots/melki_rates.pdf',
    with contexts.subplot(
        figure,
        (1, 1, 1),  # title='A',
        x_label=r"$\rho_d$",
        #            y_label=r'Non-Boundary Pi Dissociation Rate, $r_d$ [$s^{-1}$]',
        y_label=r"$r_d$ [$s^{-1}$]",
        logscale_x=True,
        logscale_y=True,
    ) as axes:
        contexts.plot(axes, "plot", cooperativities, rates, "k.")
        #        contexts.plot(axes, 'errorbar', cooperativities, rates,
        #                errors, fmt='k.')

        cooperativities = numpy.array(cooperativities)
        contexts.plot(
            axes, "plot", cooperativities, 1.0 / (HALFTIME * numpy.sqrt(cooperativities)), "r-", linewidth=0.5
        )

        axes_2 = axes.twinx()
        axes_2.set_yscale("log")
        axes_2.set_ylabel(r"$R_d$ [$s^{-1}$]", size=settings.LABEL_FONT_SIZE)
        for label in axes_2.get_yticklabels():
            label.set_size(settings.TICK_FONT_SIZE)

        axes.axvline(RHO_CRIT, 0, 1, linestyle="--", color="g", linewidth=0.5, dashes=(3, 3))

        axes.set_yticks([1.0e-9, 1.0e-8, 1.0e-7, 1.0e-6, 1.0e-5, 1.0e-4, 1.0e-3])
        axes.minorticks_off()

        contexts.plot(axes_2, "plot", cooperativities, cooperativities * rates, "k.", markerfacecolor="None")

        axes_2.axhline(v_rate_pack[0], 0, 1, linestyle=":", color="b")
        axes_2.set_ylim([1.0e-4, 100])
        axes_2.set_yticks([1.0e-3, 1.0e-2, 1.0e-1, 1, 1.0e1])
        axes_2.minorticks_off()

        axes.set_xlim([0.1, 10 ** 11])

        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])

        inset_error_plot(figure)
Пример #28
0
def random_vectorial_timecourse(figure):
    random_results = data.load_data('results/depoly_timecourse_random.dat')
    vectorial_results = data.load_data(
        'results/depoly_timecourse_vectorial.dat')

    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    rtimes, rvalues = numpy.array(random_results[0]), random_results[1:]
    vtimes, vvalues = numpy.array(vectorial_results[0]), vectorial_results[1:]

    etimes, evals = numpy.array(expt[0]), expt[1]

    rtimes -= 300
    vtimes -= 300

    #    with contexts.basic_figure('plots/depoly_rv_timecourses.pdf',
    with contexts.subplot(
            figure,
        (2, 2, 1),
            title='A',
            #            x_label='Time [s]',
            y_label=r'Filament Length [$\mu$m]') as axes:
        for y in rvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(
                axes,
                'plot',
                rtimes,
                y,
                '-',
                color='#FF8080',
                #                    color='#FFA0A0',
                linewidth=THIN_LINE)

        for y in vvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(
                axes,
                'plot',
                vtimes,
                y,
                '-',
                color='#8080FF',
                #                    color='#A0A0FF',
                linewidth=THIN_LINE)

        contexts.plot(axes, 'plot', etimes, evals, 'k', linewidth=0.7)
        axes.set_ylim(0, 15)
        axes.set_xlim(0, 1000)
Пример #29
0
def halftime_plot(figure, data_filename='results/halftime_v_rho.dat'):
    results = data.load_data(data_filename)
    pis, halftimes = results[0], results[1:]
    pis = numpy.array(pis) / 1000.0

#    with contexts.subplot(figure, (2, 2, 3), title='B',
    with contexts.subplot(figure, (1, 1, 1), #title='B',
            x_label=r'Pi Concentration [mM]',
            y_label=r'[Pi] Halftime [s]',
            logscale_x=True, logscale_y=False) as axes:
        for ht in halftimes:
            contexts.plot(axes, 'plot', pis, ht)
        axes.set_xlim(0, 1000)
        axes.set_ylim(0, 3000)
Пример #30
0
def non_be_quality(figure):
    results = data.load_data('results/melki_cooperative_fit.dat')
    (cooperativities, rates, min_rates, max_rates, rate_pe,
            chi2, min_chi2, max_chi2, chi2_pe) = results
    nb_results = data.load_data('results/melki_non_be_coop_fit.dat')
    (nbc, nbr, nbminr, nbmaxr, nbrpe, nbchi2, nbminc2,
            nbmaxc2, nbcpe) = nb_results
    nop_results = data.load_data('results/melki_no_pointed_coop_fit.dat')
    (nbc, nopr, junk, junk, jukn,
            nopc2, nopminc2, nopmaxc2, junk) = nop_results

    v_results = data.load_data('results/melki_vectorial_fit.dat')
    (v_rate, junk, junk, junk,
            v_chi2, v_min_chi2, v_max_chi2, junk) = zip(*v_results)[0]
    v_nb_results = data.load_data('results/melki_non_be_vec_fit.dat')
    (v_nbr, v_nbminr, v_nbmaxr, v_nbrpe, v_nbchi2, v_nbminc2,
            v_nbmaxc2, v_nbcpe) = zip(*v_nb_results)[0]

    with contexts.subplot(figure, (2, 1, 2), title='B',
            x_label=r'Pi Dissociation Cooperativity, $\rho_d$',
            y_label=r'$\chi^2$ Comparison To Data',
            logscale_x=True) as axes:
        axes.fill_between([0.1, 1.0e12],
                [v_min_chi2, v_min_chi2],
                v_max_chi2, color='#AAAAAA')
        axes.fill_between([0.1, 1.0e12],
                [v_nbminc2, v_nbminc2],
                v_nbmaxc2, color='#CCCCFF')
        axes.axhline(v_chi2, 0, 1, linestyle=':', color='k')
        axes.axhline(v_nbchi2, 0, 1, linestyle=':', color='b')
        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5)

        contexts.plot(axes, 'errorbar', cooperativities,
                chi2, [c - m for c, m in zip(chi2, min_chi2)],
                fmt='k.')

        contexts.plot(axes, 'errorbar', cooperativities,
                nbchi2, [c - m for c, m in zip(nbchi2, nbminc2)],
                fmt='b.')

        contexts.plot(axes, 'errorbar', cooperativities,
                nopc2, [c - m for c, m in zip(nopc2, nopminc2)],
                fmt='g.')

        axes.set_xlim([0.1, 10**12])
        axes.set_ylim([0, 14])

        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])
Пример #31
0
def crit_conc(figure):
    results = data.load_data('results/cc_d_cooperative.dat')
    v_results = data.load_data('results/cc_d_vectorial.dat')

    coops, ccs, ds = results
    vcc, vd = v_results[0][0], v_results[1][0]

    with contexts.subplot(figure, (2, 1, 1),
                          title='A',
                          y_label=r'Critical Concentration [$\mu$M]',
                          logscale_x=True,
                          logscale_y=False) as axes:
        contexts.plot(axes, 'plot', coops, ccs, 'k-')

        axes.axhline(vcc, 0, 1, linestyle=':', linewidth=0.5, color='k')
        axes.set_ylim(0.1, 0.2)

    with contexts.subplot(figure, (2, 1, 2),
                          title='B',
                          y_label=r'Diffusion Coefficient [mon^2/s]',
                          logscale_x=True,
                          logscale_y=False) as axes:
        contexts.plot(axes, 'plot', coops, ds, 'k-')
        axes.axhline(vd, 0, 1, linestyle=':', linewidth=0.5, color='k')
Пример #32
0
def halftime_plot(figure, data_filename='results/halftime_v_rho.dat'):
    results = data.load_data(data_filename)
    pis, halftimes = results[0], results[1:]
    pis = numpy.array(pis) / 1000.0

    #    with contexts.subplot(figure, (2, 2, 3), title='B',
    with contexts.subplot(
            figure,
        (1, 1, 1),  #title='B',
            x_label=r'Pi Concentration [mM]',
            y_label=r'[Pi] Halftime [s]',
            logscale_x=True,
            logscale_y=False) as axes:
        for ht in halftimes:
            contexts.plot(axes, 'plot', pis, ht)
        axes.set_xlim(0, 1000)
        axes.set_ylim(0, 3000)
Пример #33
0
def non_be_rates(figure):
    results = data.load_data('results/melki_cooperative_fit.dat')
    nb_results = data.load_data('results/melki_non_be_coop_fit.dat')
    nop_results = data.load_data('results/melki_no_pointed_coop_fit.dat')
    cooperativities, rates, min_rates, max_rates = results[:4]
    nbc, nbr, nb_minr, nb_maxr = nb_results[:4]
    nopc, nopr, nopminr, nopmaxr = nop_results[:4]

    theoretical_rates = 1.0 / (HALFTIME * numpy.sqrt(cooperativities))
    errors = numpy.array(numpy.array(rates) - numpy.array(min_rates)) / theoretical_rates
    rates = numpy.array(rates) / theoretical_rates

    nberrors = numpy.array(numpy.array(nbr) - numpy.array(nb_minr)) / theoretical_rates
    nbrates = numpy.array(nbr) / theoretical_rates

    noperrors = numpy.array(numpy.array(nopr) - numpy.array(nopminr)) / theoretical_rates
    noprates = numpy.array(nopr) / theoretical_rates

    with contexts.subplot(figure, (2, 1, 1), title='A',
#            x_label=r'Pi Dissociation Cooperativity, $\rho_d$',
            y_label=r'$r_d$ [Simulation / Theory]',
            logscale_x=True,
            ) as axes:
        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5)

        # With enhanced BE dissociation rate
        contexts.plot(axes, 'errorbar', cooperativities,
                rates, errors, fmt='k.')

        # Without enhanced BE dissociation rate
        contexts.plot(axes, 'errorbar', cooperativities,
                nbrates, nberrors, fmt='b.')

        # No pointed end kinetics
        contexts.plot(axes, 'errorbar', cooperativities,
                noprates, noperrors, fmt='g.')

        contexts.plot(axes, 'plot', cooperativities,
                [1 for c in cooperativities], 'r-', linewidth=0.5)
        axes.set_xlim([0.1, 10**12])

        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])
        

        axes.set_ylim([0, 1.2])
Пример #34
0
def melki_rate_fit_quality(figure):
    results = data.load_data("results/melki_cooperative_fit.dat")
    (cooperativities, rates, min_rates, max_rates, rate_pe, chi2, min_chi2, max_chi2, chi2_pe) = results
    v_results = data.load_data("results/melki_vectorial_fit.dat")
    (v_rate, junk, junk, junk, v_chi2, v_min_chi2, v_max_chi2, junk) = zip(*v_results)[0]
    with contexts.subplot(
        figure, (2, 1, 2), title="B", x_label=r"$\rho_d$", y_label=r"$\chi^2$ Comparison To Data", logscale_x=True
    ) as axes:
        axes.fill_between([0.1, 1.0e12], [v_min_chi2, v_min_chi2], v_max_chi2, color="#CCCCFF")
        axes.axhline(v_chi2, 0, 1, linestyle=":", color="b")
        axes.axvline(RHO_CRIT, 0, 1, linestyle="--", color="g", linewidth=0.5)

        contexts.plot(axes, "errorbar", cooperativities, chi2, [c - m for c, m in zip(chi2, min_chi2)], fmt="k.")

        axes.set_xlim([0.1, 10 ** 12])
        axes.set_ylim([0, 14])

        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])
Пример #35
0
def cooperative_timecourse(figure):
    filament_results = data.load_data(
        'results/depoly_timecourse_rho_200000.dat')
    mean_results = data.load_data('results/depoly_mean_tc.dat')

    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    ftimes, fvalues = numpy.array(filament_results[0]), filament_results[1:]
    mtimes, mvalues = (numpy.array(mean_results[0]),
                       0.0027 * numpy.array(mean_results[1]))

    etimes, evals = numpy.array(expt[0]), expt[1]

    ftimes -= 300
    mtimes -= 300

    #    with contexts.basic_figure('plots/depoly_coop_timecourses.pdf',
    with contexts.subplot(figure, (2, 2, 4),
                          title='D',
                          x_label='Time [s]'
                          #            y_label=r'Filament Length [$\mu$m]'
                          ) as axes:
        for y in fvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(
                axes,
                'plot',
                ftimes,
                y,
                '-',
                #                    color='#FF8080',
                #                    color='#80FF80',
                color='#8080FF',
                linewidth=THIN_LINE)

        contexts.plot(axes, 'plot', etimes, evals, 'k-', linewidth=0.7)
        contexts.plot(axes, 'plot', mtimes, mvalues, 'r-', linewidth=0.7)

        axes.set_ylim(0, 15)
        axes.set_xlim(0, 1000)
Пример #36
0
def tip_fit(figure):
    best_tc = data.load_data('results/depoly_timecourse.dat')

    times, values = numpy.array(best_tc[0]), numpy.array(best_tc[1])
    times -= 300
    values *= 0.0027

    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')
    etimes, evals = numpy.array(expt[0]), expt[1]

#    with contexts.basic_figure('plots/depoly_tip_fit_timecourse.pdf',
    with contexts.subplot(figure, (2, 2, 2), title='B'
#            x_label='Time [s]',
#            y_label=r'Filament Length [$\mu$m]'
            ) as axes:
        contexts.plot(axes, 'plot', times, values, 'r-')
        contexts.plot(axes, 'plot', etimes, evals, 'k-')

        axes.set_xlim(0, 1000)
        axes.set_ylim(0, 15)
Пример #37
0
def copoly_adp_only(figure):
    adp_halftimes = data.load_data('results/adp_copoly_halftimes.dat')
    adp_v_halftimes = data.load_data('results/adp_copoly_halftimes_vectorial.dat')

    fractions, halftimes = adp_halftimes[0], adp_halftimes[1:]
    v_fractions, v_halftimes = adp_v_halftimes[0], adp_v_halftimes[1]

    with contexts.subplot(figure, (1, 1, 1), #title='B',
            y_label=r'[Pi] Halftime [s]',
            x_label=r'% ADP-actin') as axes:
        for ht, lt, in zip(halftimes, LINETYPES):
#            contexts.plot(axes, 'plot', fractions, numpy.array(ht)/ht[0], lt)
            contexts.plot(axes, 'plot', fractions, numpy.array(ht), lt)

#        contexts.plot(axes, 'plot', v_fractions, numpy.array(v_halftimes)/v_halftimes[0], 'k-')
        contexts.plot(axes, 'plot', v_fractions, numpy.array(v_halftimes), 'k-')

        new_x_tick_labels = [0, 5, 10, 15, 20]

        axes.set_xticks([0, 0.05, 0.1, 0.15, 0.2])
        axes.set_xticklabels(new_x_tick_labels)
Пример #38
0
def vec_tcs(figure):
    data_f_times, data_f = data.load_data(
        'experimental_data/melki_fievez_carlier_1996/factin_concentration.dat')
    data_p_times, data_p = data.load_data(
        'experimental_data/melki_fievez_carlier_1996/phosphate_concentration.dat'
    )
    data_p = numpy.array(data_p)

    sim_p = data.load_data('results/melki_timecourses_p.dat')
    sp_times, sp_vals = sim_p[0], sim_p[1]

    nbesim_p = data.load_data('results/melki_nonbe_tc_p.dat')

    colors = ['b', 'g', 'r', 'orange']
    labels = ['Vectorial', 'Random', r'$\rho_d = 10^4$', r'$\rho_d = 10^8$']

    with contexts.subplot(figure, (1, 1, 1),
                          x_label=r'Time [s]',
                          y_label=r'Concentrations [$\mu$M]') as axes:
        axes.fill_between(data_p_times,
                          data_p * (1 - MELKI_ERROR),
                          data_p * (1 + MELKI_ERROR),
                          color='#CCCCCC')
        axes.plot(data_f_times, data_f, 'k--')
        axes.plot(data_p_times, data_p, 'k-', label='Data')

        # BE included
        axes.plot(sp_times, sp_vals, color='b', linestyle='-', label='BE')
        # Non-BE
        axes.plot(nbesim_p[0],
                  nbesim_p[1],
                  color='r',
                  linestyle='-',
                  label='Non-BE')

        axes.set_ylim([0, 35])
        axes.set_xlim([0, 2500])

        axes.legend(loc=4)
Пример #39
0
def random_vectorial_timecourse(figure):
    random_results = data.load_data('results/depoly_timecourse_random.dat')
    vectorial_results = data.load_data('results/depoly_timecourse_vectorial.dat')

    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    rtimes, rvalues = numpy.array(random_results[0]), random_results[1:]
    vtimes, vvalues = numpy.array(vectorial_results[0]), vectorial_results[1:]

    etimes, evals = numpy.array(expt[0]), expt[1]

    rtimes -= 300
    vtimes -= 300

#    with contexts.basic_figure('plots/depoly_rv_timecourses.pdf',
    with contexts.subplot(figure, (2, 2, 1), title='A',
#            x_label='Time [s]',
            y_label=r'Filament Length [$\mu$m]') as axes:
        for y in rvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(axes, 'plot', rtimes, y, '-',
                    color='#FF8080',
#                    color='#FFA0A0',
                    linewidth=THIN_LINE)

        for y in vvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(axes, 'plot', vtimes, y, '-',
                    color='#8080FF',
#                    color='#A0A0FF',
                    linewidth=THIN_LINE)

        contexts.plot(axes, 'plot', etimes, evals, 'k', linewidth=0.7)
        axes.set_ylim(0, 15)
        axes.set_xlim(0, 1000)
Пример #40
0
def asymptotic_plot(figure):
    results = data.load_data('results/asymptotic_adppi_v_pi.dat')
    pis, fractions = results[0], results[1:]

    with contexts.subplot(figure, (2, 2, 2),
                          title='C',
                          x_label=r'Pi Concentration [$\mu$M]',
                          y_label=r'Asymptotic Fraction [F-ADP-Pi-actin]',
                          logscale_x=True) as axes:
        #        for frac in fractions:
        #            contexts.plot(axes, 'plot', pis, frac)
        contexts.plot(axes, 'plot', pis, fractions[0], 'b')

        axes.set_ylim(0, 1)

        axes.axhline(0.5, 0, 1, linestyle='-', linewidth=0.5, color='k')
        axes.axvline(HALF_CONCENTRATION,
                     0,
                     0.5,
                     linestyle=':',
                     linewidth=0.5,
                     color='k')

        axes.annotate(r'$c^*$',
                      xy=(HALF_CONCENTRATION, 0.001),
                      xytext=(HALF_CONCENTRATION + 2000, 0.15),
                      arrowprops={
                          'facecolor': 'black',
                          'arrowstyle': '->'
                      },
                      size=settings.SMALL_FONT_SIZE)

        axes.text(
            4000,
            0.8,
            r'$\rho_d =\,1$',
            horizontalalignment='right',  # verticalalignment='bottom',
            size=settings.SMALL_FONT_SIZE)
Пример #41
0
def qof_plot(figure):
    coop_qof = data.load_data('results/fnc_cooperative_qof.dat')
    vec_qof = data.load_data('results/fnc_vectorial_qof.dat')
    coops, qof, min_qof, max_qof, pct_err = coop_qof
    err = [m - q for m, q in zip(max_qof, qof)]
    with contexts.subplot(figure, (2, 1, 2),
                          title='B',
                          x_label=r'$\rho_d$',
                          y_label=r'Lag-time Quality of Fit, $\chi^2$',
                          logscale_x=True,
                          logscale_y=False) as axes:
        axes.fill_between([0.1, 1.0e12], [vec_qof[1][0], vec_qof[1][0]],
                          vec_qof[2][0],
                          color='#CCCCFF')
        axes.axhline(0, 0, 1, color='k', linestyle='-', linewidth=0.5)
        axes.axhline(vec_qof[0], 0, 1, color='b', linestyle=':')
        axes.axvline(RHO_CRIT, 0, 1, color='g', linestyle='--', linewidth=0.5)

        axes.errorbar(coops, qof, err, fmt='k.')

        axes.set_ylim([-5, None])
        axes.set_xlim([0.1, 10**12])
        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])
Пример #42
0
def tip_fit(figure):
    best_tc = data.load_data('results/depoly_timecourse.dat')

    times, values = numpy.array(best_tc[0]), numpy.array(best_tc[1])
    times -= 300
    values *= 0.0027

    expt = data.load_data(
        'experimental_data/jegou_2011/sample_filament_timecourse.dat')
    etimes, evals = numpy.array(expt[0]), expt[1]

    #    with contexts.basic_figure('plots/depoly_tip_fit_timecourse.pdf',
    with contexts.subplot(
            figure, (2, 2, 2),
            title='B'
            #            x_label='Time [s]',
            #            y_label=r'Filament Length [$\mu$m]'
    ) as axes:
        contexts.plot(axes, 'plot', times, values, 'r-')
        contexts.plot(axes, 'plot', etimes, evals, 'k-')

        axes.set_xlim(0, 1000)
        axes.set_ylim(0, 15)
Пример #43
0
def coop_qof(figure):
    coop_data = data.load_data('results/depoly_cooperative_qof.dat')
    vec_data = data.load_data('results/depoly_vectorial_qof.dat')

    rhos, chis, minchis, maxchis, pct_chis = coop_data
    errs = numpy.array(chis) - numpy.array(minchis)

    vchi, vminchi, vmaxchi, vpct_chi = zip(*vec_data)[0]

    with contexts.subplot(figure, (2, 2, 3), title='E',
            x_label=r'$\rho_d$',
            y_label=r'Quality of Fit, $\Delta^2$',
            logscale_x=True) as axes:
        axes.fill_between([0.1, 1.0e12], [vminchi, vminchi],
                vmaxchi, color='#CCCCFF')
        axes.axhline(vchi, 0, 1, color='b', linestyle=':')

        axes.plot(rhos, chis, 'k.')
        axes.errorbar(rhos, chis, errs, fmt='k.')
        axes.set_ylim([0, 8])
        axes.set_xlim([0.1, 10**12])
        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])
Пример #44
0
def stacked_timecourses(figure):
    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    with contexts.subplot(figure, (1, 1, 1)
#            x_label=r'Time [s]',
#            y_label=r'Filament Length [$\mu$M]'
            ) as axes:
        plot_rv_traces(axes, expt)
        plot_be_traces(axes, expt)
        plot_coop_traces(axes, expt)
        plot_fast_traces(axes, expt)
        axes.set_xlim([0, 1100])
        axes.set_ylim([0, 30])
        axes.set_xticks([])
#        axes.set_xticks([0, 200, 400, 600, 800, 1000])
        axes.set_yticks([])
        axes.set_frame_on(False)

        add_scale_bar(axes, (200, 2),
#                scale_position=(0.875, 0.675))
                scale_position=(0.05, 0.45))
    inset_qof(figure)
Пример #45
0
def qof_plot(figure):
    coop_qof = data.load_data('results/fnc_cooperative_qof.dat')
    vec_qof = data.load_data('results/fnc_vectorial_qof.dat')
    coops, qof, min_qof, max_qof, pct_err = coop_qof
    err = [m - q for m, q in zip(max_qof, qof)]
    with contexts.subplot(figure, (2, 1, 2), title='B',
            x_label=r'$\rho_d$',
            y_label=r'Lag-time Quality of Fit, $\chi^2$',
            logscale_x=True, logscale_y=False) as axes:
        axes.fill_between([0.1, 1.0e12],
                [vec_qof[1][0], vec_qof[1][0]],
                vec_qof[2][0],
                color='#CCCCFF')
        axes.axhline(0, 0, 1, color='k', linestyle='-', linewidth=0.5)
        axes.axhline(vec_qof[0], 0, 1, color='b', linestyle=':')
        axes.axvline(RHO_CRIT, 0, 1, color='g', linestyle='--', linewidth=0.5)

        axes.errorbar(coops, qof, err, fmt='k.')

        axes.set_ylim([-5, None])
        axes.set_xlim([0.1, 10**12])
        axes.set_xticks([1, 100, 10000, 1000000,
            100000000, 10000000000])
Пример #46
0
def coop_qof(figure):
    coop_data = data.load_data('results/depoly_cooperative_qof.dat')
    vec_data = data.load_data('results/depoly_vectorial_qof.dat')

    rhos, chis, minchis, maxchis, pct_chis = coop_data
    errs = numpy.array(chis) - numpy.array(minchis)

    vchi, vminchi, vmaxchi, vpct_chi = zip(*vec_data)[0]

    with contexts.subplot(figure, (2, 2, 3),
                          title='E',
                          x_label=r'$\rho_d$',
                          y_label=r'Quality of Fit, $\Delta^2$',
                          logscale_x=True) as axes:
        axes.fill_between([0.1, 1.0e12], [vminchi, vminchi],
                          vmaxchi,
                          color='#CCCCFF')
        axes.axhline(vchi, 0, 1, color='b', linestyle=':')

        axes.plot(rhos, chis, 'k.')
        axes.errorbar(rhos, chis, errs, fmt='k.')
        axes.set_ylim([0, 8])
        axes.set_xlim([0.1, 10**12])
        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])
Пример #47
0
def cooperative_timecourse(figure):
    filament_results = data.load_data(
            'results/depoly_timecourse_rho_200000.dat')
    mean_results = data.load_data('results/depoly_mean_tc.dat')

    expt = data.load_data(
            'experimental_data/jegou_2011/sample_filament_timecourse.dat')

    ftimes, fvalues = numpy.array(filament_results[0]), filament_results[1:]
    mtimes, mvalues = (numpy.array(mean_results[0]),
            0.0027 * numpy.array(mean_results[1]))

    etimes, evals = numpy.array(expt[0]), expt[1]

    ftimes -= 300
    mtimes -= 300

#    with contexts.basic_figure('plots/depoly_coop_timecourses.pdf',
    with contexts.subplot(figure, (2, 2, 4), title='D',
            x_label='Time [s]'
#            y_label=r'Filament Length [$\mu$m]'
            ) as axes:
        for y in fvalues:
            y = numpy.array(y)
            y *= 0.0027
            contexts.plot(axes, 'plot', ftimes, y, '-',
#                    color='#FF8080',
#                    color='#80FF80',
                    color='#8080FF',
                    linewidth=THIN_LINE)

        contexts.plot(axes, 'plot', etimes, evals, 'k-', linewidth=0.7)
        contexts.plot(axes, 'plot', mtimes, mvalues, 'r-', linewidth=0.7)

        axes.set_ylim(0, 15)
        axes.set_xlim(0, 1000)
Пример #48
0
def non_be_rates(figure):
    results = data.load_data('results/melki_cooperative_fit.dat')
    nb_results = data.load_data('results/melki_non_be_coop_fit.dat')
    nop_results = data.load_data('results/melki_no_pointed_coop_fit.dat')
    cooperativities, rates, min_rates, max_rates = results[:4]
    nbc, nbr, nb_minr, nb_maxr = nb_results[:4]
    nopc, nopr, nopminr, nopmaxr = nop_results[:4]

    theoretical_rates = 1.0 / (HALFTIME * numpy.sqrt(cooperativities))
    errors = numpy.array(numpy.array(rates) -
                         numpy.array(min_rates)) / theoretical_rates
    rates = numpy.array(rates) / theoretical_rates

    nberrors = numpy.array(numpy.array(nbr) -
                           numpy.array(nb_minr)) / theoretical_rates
    nbrates = numpy.array(nbr) / theoretical_rates

    noperrors = numpy.array(numpy.array(nopr) -
                            numpy.array(nopminr)) / theoretical_rates
    noprates = numpy.array(nopr) / theoretical_rates

    with contexts.subplot(
            figure,
        (2, 1, 1),
            title='A',
            #            x_label=r'Pi Dissociation Cooperativity, $\rho_d$',
            y_label=r'$r_d$ [Simulation / Theory]',
            logscale_x=True,
    ) as axes:
        axes.axvline(RHO_CRIT, 0, 1, linestyle='--', color='g', linewidth=0.5)

        # With enhanced BE dissociation rate
        contexts.plot(axes,
                      'errorbar',
                      cooperativities,
                      rates,
                      errors,
                      fmt='k.')

        # Without enhanced BE dissociation rate
        contexts.plot(axes,
                      'errorbar',
                      cooperativities,
                      nbrates,
                      nberrors,
                      fmt='b.')

        # No pointed end kinetics
        contexts.plot(axes,
                      'errorbar',
                      cooperativities,
                      noprates,
                      noperrors,
                      fmt='g.')

        contexts.plot(axes,
                      'plot',
                      cooperativities, [1 for c in cooperativities],
                      'r-',
                      linewidth=0.5)
        axes.set_xlim([0.1, 10**12])

        axes.set_xticks([1, 100, 10000, 1000000, 100000000, 10000000000])

        axes.set_ylim([0, 1.2])