clear

Pamp = load('PeakAmp_IP3.txt');
Ptime = load('PeakTime_IP3.txt') * 1000;
control_peaktime = 220;
control_peakamplitude = 3.16;

colortype = [0,   0,   1;    %blue
             0,   1,   1;    %cyan
             1,   0,   0;    %red
             1, 0.5,   1];   %pink
               
color = [1, 1, 1,  1, 1,  1, 1, 1,  1,  1, 3, 3, 3, 1, 1, 1,  1, 1, 1, 1, 1]; %1;Known; 3:Unknown
 
 
subplot(2,1,1)
plot([0, 22], [control_peaktime, control_peaktime], 'k:')
hold on
for param = 1:21
    plot(param, Ptime(param+75,  6), 'Color', colortype(color(param)+1, :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  5), 'Color', colortype(color(param)+1, :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  4), 'Color', colortype(color(param)+1, :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  3), 'Color', colortype(color(param)+1, :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  2), 'Color', colortype(color(param)+1, :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  1), 'Color', colortype(color(param)+1, :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  7), 'Color', colortype(color(param)  , :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  8), 'Color', colortype(color(param)  , :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75,  9), 'Color', colortype(color(param)  , :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75, 10), 'Color', colortype(color(param)  , :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75, 11), 'Color', colortype(color(param)  , :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+75, 12), 'Color', colortype(color(param)  , :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
end
axis([0 22 0 400])
set(gca,'xtick',[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21])
set(gca,'XTickLabel','Glu|mGluR|Gq|PIP2|PLC\beta|IP3|IP3 3-kinase|IP3 5-phosphatase|IP3R|[Ca2+]i|SERCA|PMCA|Na+/Ca2+|[Ca2+]ER|calreticulin|[Ca2+]ext|MgGreen|parvalbumin|calbindin-D28k|low-affinity buffer|low-affinity buffer 2')
set(gca,'ytick',[0 100 200 300 400])
title('Peak time of IP3 time course')
ylabel('Time (ms)')


subplot(2,1,2)
plot([0, 22], [control_peakamplitude, control_peakamplitude], 'k:')
hold on
for param = 1:21
    plot(param, Pamp(param+75,  6), 'Color', colortype(color(param)+1, :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  5), 'Color', colortype(color(param)+1, :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  4), 'Color', colortype(color(param)+1, :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  3), 'Color', colortype(color(param)+1, :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  2), 'Color', colortype(color(param)+1, :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  1), 'Color', colortype(color(param)+1, :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  7), 'Color', colortype(color(param)  , :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  8), 'Color', colortype(color(param)  , :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75,  9), 'Color', colortype(color(param)  , :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75, 10), 'Color', colortype(color(param)  , :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75, 11), 'Color', colortype(color(param)  , :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+75, 12), 'Color', colortype(color(param)  , :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
end
axis([0 22 0 10])
set(gca,'xtick',[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21])
set(gca,'XTickLabel','Glu|mGluR|Gq|PIP2|PLC\beta|IP3|IP3 3-kinase|IP3 5-phosphatase|IP3R|[Ca2+]i|SERCA|PMCA|Na+/Ca2+|[Ca2+]ER|calreticulin|[Ca2+]ext|MgGreen|parvalbumin|calbindin-D28k|low-affinity buffer|low-affinity buffer 2')
set(gca,'ytick',[0 2 4 6 8 10])
title('Peak amplitude of IP3 time course')
ylabel('[IP3] (\muM)')
