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];   %magenta
               
color = [1, 1, 3, 1,  1, 1, 1, 1, 1, 1, 1,  1, 1, 1,  1, 1, 1, 1, 1, 1,  1, 1, 1, 1,  1, 1, 1, 3, 3]; %1;Known; 3:Unknown
 

subplot(2,1,1)
plot([0, 30], [control_peaktime, control_peaktime], 'k:')
hold on
for param = 1:29
    plot(param, Ptime(param+34,  6), 'Color', colortype(color(param)+1, :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  5), 'Color', colortype(color(param)+1, :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  4), 'Color', colortype(color(param)+1, :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  3), 'Color', colortype(color(param)+1, :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  2), 'Color', colortype(color(param)+1, :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  1), 'Color', colortype(color(param)+1, :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  7), 'Color', colortype(color(param)  , :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  8), 'Color', colortype(color(param)  , :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34,  9), 'Color', colortype(color(param)  , :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34, 10), 'Color', colortype(color(param)  , :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34, 11), 'Color', colortype(color(param)  , :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Ptime(param+34, 12), 'Color', colortype(color(param)  , :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
end
axis([0 30 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 22 23 24 25 26 27 28 29])
set(gca,'XTickLabel','a1|a2|a3|a4|b1|b2|b3|b4|b5|b8|b9|c1|c2|c4|d1|d2|d3|d4|d5|d6|e2|e5|e7|e10|f1|f2|f3|f4|f5')
set(gca,'ytick',[0 100 200 300 400])
title('Peak time of IP3 time course')
xlabel('Parameter ID for dissociation and Michaelis constatns, Kd and Km')
ylabel('Time (ms)')


subplot(2,1,2)
plot([0, 30], [control_peakamplitude, control_peakamplitude], 'k:')
hold on
for param = 1:29
    plot(param, Pamp(param+34,  6), 'Color', colortype(color(param)+1, :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  5), 'Color', colortype(color(param)+1, :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  4), 'Color', colortype(color(param)+1, :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  3), 'Color', colortype(color(param)+1, :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  2), 'Color', colortype(color(param)+1, :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  1), 'Color', colortype(color(param)+1, :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  7), 'Color', colortype(color(param)  , :), 'Marker', 'o', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  8), 'Color', colortype(color(param)  , :), 'Marker', '^', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34,  9), 'Color', colortype(color(param)  , :), 'Marker', 'v', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34, 10), 'Color', colortype(color(param)  , :), 'Marker', 's', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34, 11), 'Color', colortype(color(param)  , :), 'Marker', 'd', 'LineStyle', 'none')
    hold on
    plot(param, Pamp(param+34, 12), 'Color', colortype(color(param)  , :), 'Marker', 'p', 'LineStyle', 'none')
    hold on
end
axis([0 30 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 22 23 24 25 26 27 28 29])
set(gca,'XTickLabel','a1|a2|a3|a4|b1|b2|b3|b4|b5|b8|b9|c1|c2|c4|d1|d2|d3|d4|d5|d6|e2|e5|e7|e10|f1|f2|f3|f4|f5')
set(gca,'ytick',[0 2 4 6 8 10])
title('Peak amplitude of IP3 time course')
xlabel('Parameter ID for dissociation and Michaelis constatns, Kd and Km')
ylabel('[IP3] (\muM)')
