Browse Source

Upload Files to 'Figure 5'

Jerry Chen Lab 1 year ago
parent
commit
3299680b7c

+ 23 - 0
Figure 5/FIG5c.m

@@ -0,0 +1,23 @@
+load('FIG5c.mat')
+
+t = [1:size(ASAP3onepuff,2)]
+t = t-1600;
+t = t/803.3179;
+
+figure
+hold on
+temp4 = -ASAP3onepuff;
+ccc=temp4(:,1200:1400);
+confplot(t,nanmean(temp4,1)-nanmean(ccc(:)), nanstd(temp4,1)/sqrt(size(temp4,1)), nanstd(temp4,1)/sqrt(size(temp4,1)));
+
+hold on
+temp4 = SpikeyGionepuff;
+ccc=temp4(:,1200:1400);
+confplot(t,nanmean(temp4,1)-nanmean(ccc(:)), nanstd(temp4,1)/sqrt(size(temp4,1)), nanstd(temp4,1)/sqrt(size(temp4,1)));
+
+hold on
+temp4 = SpikeyGi2onepuff;
+ccc=temp4(:,1200:1400);
+confplot(t,nanmean(temp4,1)-nanmean(ccc(:)), nanstd(temp4,1)/sqrt(size(temp4,1)), nanstd(temp4,1)/sqrt(size(temp4,1)));
+
+xlim([-0.5 1])

+ 43 - 0
Figure 5/FIG5e.m

@@ -0,0 +1,43 @@
+load('Fig5e.mat')
+
+ASAP3firing = permute(ASAP3firing, [2,3,1]);
+SpikeyGi2firing = permute(SpikeyGi2firing, [2,3,1]);
+SpikeyGifiring = permute(SpikeyGifiring, [2,3,1]);
+x=[1:50]/10;
+
+figure
+temp = nanmean(ASAP3firing(1,:,:),3);
+stemp = std(ASAP3firing(1,:,:),[],3)/sqrt(size(ASAP3firing,3)/3);
+confplot(x,temp,stemp,stemp);
+hold on
+temp = nanmean(SpikeyGifiring(1,:,:),3);
+stemp = std(SpikeyGifiring(1,:,:),[],3)/sqrt(size(SpikeyGifiring,3)/3);
+confplot(x,temp,stemp,stemp);
+hold on
+temp = nanmean(SpikeyGi2firing(1,:,:),3);
+stemp = std(SpikeyGi2firing(1,:,:),[],3)/sqrt(size(SpikeyGi2firing,3)/3);
+confplot(x,temp,stemp,stemp);
+xlim([3.5 5])
+title('spontaneous activity')
+xlabel('SNR')
+ylabel('firing rate (Hz)')
+
+figure; 
+temp = nanmean(ASAP3firing(2,:,:),3);
+stemp = std(ASAP3firing(2,:,:),[],3)/sqrt(size(ASAP3firing,3)/3);
+confplot(x,temp,stemp,stemp);
+hold on
+temp = nanmean(SpikeyGifiring(2,:,:),3);
+stemp = std(SpikeyGifiring(2,:,:),[],3)/sqrt(size(SpikeyGifiring,3)/3);
+confplot(x,temp,stemp,stemp);
+hold on
+temp = nanmean(SpikeyGi2firing(2,:,:),3);
+stemp = std(SpikeyGi2firing(2,:,:),[],3)/sqrt(size(SpikeyGi2firing,3)/3);
+confplot(x,temp,stemp,stemp);
+xlim([3.5 5])
+title('evoked activity')
+xlabel('SNR')
+ylabel('firing rate (Hz)')
+
+
+

+ 1 - 0
Figure 5/Fig5c.mat

@@ -0,0 +1 @@
+/annex/objects/MD5-s818535503--00b3e487c22ee5777d6405a9e7f2c464

BIN
Figure 5/Fig5e.mat


+ 45 - 0
Figure 5/SpikeyGi2_10Hz.m

@@ -0,0 +1,45 @@
+load('SpikeyGi2_10Hz');
+figure
+hold on
+t = [1:size(temp4,2)];
+t = t-1600;
+t = t/803.3179;
+
+for i = 1:5
+    if i == 1
+        rrr = nanmean(temp4(:,1630:1640),2);
+        sss = nanmax(temp6(:,1630:1640),[],2);
+    elseif i == 2
+        rrr = nanmean(temp4(:,1702:1712),2);
+        sss = nanmax(temp6(:,1702:1712),[],2);
+    elseif i == 3
+        rrr = nanmean(temp4(:,1780:1790),2);
+        sss = nanmax(temp6(:,1780:1790),[],2);
+    elseif i == 4
+        rrr = nanmean(temp4(:,1865:1875),2);
+        sss = nanmax(temp6(:,1865:1875),[],2);
+    elseif i == 5
+        rrr = nanmean(temp4(:,1955:1965),2);
+        sss = nanmax(temp6(:,1955:1965),[],2);
+    end
+    ccc=temp4(sss>2&rrr>0.2,1200:1400);
+    jjj = temp4(sss>2&rrr>0.2,:);
+    confplot(t,nanmean(temp4(sss>2&rrr>0.2,:),1)-nanmean(ccc(:)),nanstd(jjj,1)/sqrt(size(jjj,1)), nanstd(jjj,1)/sqrt(size(jjj,1))) ;
+    hold on
+    xline(0)
+    xline((onepuff(3,2)-onepuff(2,2))/803.3179);
+    xline((onepuff(4,2)-onepuff(2,2))/803.3179);
+    xline((onepuff(5,2)-onepuff(2,2))/803.3179);
+    xline((onepuff(6,2)-onepuff(2,2))/803.3179);
+end
+
+xlim([-0.5 1.5])
+yline(0)
+title('iASAP 10Hz')
+ylabel('dFF')
+xlabel('seconds')
+ylim([-0.05 0.2])
+
+
+
+

+ 1 - 0
Figure 5/SpikeyGi2_10Hz.mat

@@ -0,0 +1 @@
+/annex/objects/MD5-s225737063--77d41ff5520dbfd0c22bb544a541bcb0

+ 35 - 0
Figure 5/SpikeyGi2_5Hz.m

@@ -0,0 +1,35 @@
+load('SpikeyGi2_5Hz.mat');
+
+figure
+hold on
+for i = 1:5
+    if i == 1
+        rrr = nanmean(temp4(:,1615:1625),2)
+    elseif i == 2
+        rrr = nanmean(temp4(:,1785:1795),2)
+    elseif i == 3
+        rrr = nanmean(temp4(:,1945:1955),2)
+    elseif i == 4
+        rrr = nanmean(temp4(:,2120:2130),2)
+    elseif i == 5
+        rrr = nanmean(temp4(:,2275:2285),2)
+    end
+    t = [1:size(temp4,2)]
+    t = t-1600;
+    t = t/803.3179;
+    ccc=temp4(rrr>0.2,1200:1400);
+    plot(t,nanmean(temp4(rrr>0.2,:),1)-nanmean(ccc(:)));
+end
+xline(0)
+xline((idx2(3,2)-idx2(2,2))/803.3179);
+xline((idx2(4,2)-idx2(2,2))/803.3179);
+xline((idx2(5,2)-idx2(2,2))/803.3179);
+xline((idx2(6,2)-idx2(2,2))/803.3179);
+
+xlim([-0.5 1.5])
+yline(0)
+title('SpikeyGi2 5Hz')
+ylabel('dFF')
+xlabel('seconds')
+
+hold off

+ 1 - 0
Figure 5/SpikeyGi2_5Hz.mat

@@ -0,0 +1 @@
+/annex/objects/MD5-s154288299--b40f299b5029b87ff7546a851545c713

+ 45 - 0
Figure 5/SpikeyGi_10Hz.m

@@ -0,0 +1,45 @@
+load('SpikeyGi_10Hz');
+figure
+hold on
+t = [1:size(temp4,2)];
+t = t-1600;
+t = t/803.3179;
+
+for i = 1:5
+    if i == 1
+        rrr = nanmean(temp4(:,1630:1640),2);
+        sss = nanmax(temp6(:,1630:1640),[],2);
+    elseif i == 2
+        rrr = nanmean(temp4(:,1702:1712),2);
+        sss = nanmax(temp6(:,1702:1712),[],2);
+    elseif i == 3
+        rrr = nanmean(temp4(:,1780:1790),2);
+        sss = nanmax(temp6(:,1780:1790),[],2);
+    elseif i == 4
+        rrr = nanmean(temp4(:,1865:1875),2);
+        sss = nanmax(temp6(:,1865:1875),[],2);
+    elseif i == 5
+        rrr = nanmean(temp4(:,1955:1965),2);
+        sss = nanmax(temp6(:,1955:1965),[],2);
+    end
+    ccc=temp4(sss>2&rrr>0.2,1200:1400);
+    jjj = temp4(sss>2&rrr>0.2,:);
+    confplot(t,nanmean(temp4(sss>2&rrr>0.2,:),1)-nanmean(ccc(:)),nanstd(jjj,1)/sqrt(size(jjj,1)), nanstd(jjj,1)/sqrt(size(jjj,1))) ;
+    hold on
+    xline(0)
+    xline((onepuff(3,2)-onepuff(2,2))/803.3179);
+    xline((onepuff(4,2)-onepuff(2,2))/803.3179);
+    xline((onepuff(5,2)-onepuff(2,2))/803.3179);
+    xline((onepuff(6,2)-onepuff(2,2))/803.3179);
+end
+
+xlim([-0.5 1.5])
+yline(0)
+title('iASAP 10Hz')
+ylabel('dFF')
+xlabel('seconds')
+ylim([-0.05 0.2])
+
+
+
+

+ 1 - 0
Figure 5/SpikeyGi_10Hz.mat

@@ -0,0 +1 @@
+/annex/objects/MD5-s202155964--c582222a30c5740dd27e1896a48bf1f0

+ 35 - 0
Figure 5/SpikeyGi_5Hz.m

@@ -0,0 +1,35 @@
+load('SpikeyGi_5Hz.mat');
+
+figure
+hold on
+for i = 1:5
+    if i == 1
+        rrr = nanmean(temp4(:,1615:1625),2)
+    elseif i == 2
+        rrr = nanmean(temp4(:,1785:1795),2)
+    elseif i == 3
+        rrr = nanmean(temp4(:,1945:1955),2)
+    elseif i == 4
+        rrr = nanmean(temp4(:,2120:2130),2)
+    elseif i == 5
+        rrr = nanmean(temp4(:,2275:2285),2)
+    end
+    t = [1:size(temp4,2)]
+    t = t-1600;
+    t = t/803.3179;
+    ccc=temp4(rrr>0.2,1200:1400);
+    plot(t,nanmean(temp4(rrr>0.2,:),1)-nanmean(ccc(:)));
+end
+xline(0)
+xline((idx2(3,2)-idx2(2,2))/803.3179);
+xline((idx2(4,2)-idx2(2,2))/803.3179);
+xline((idx2(5,2)-idx2(2,2))/803.3179);
+xline((idx2(6,2)-idx2(2,2))/803.3179);
+
+xlim([-0.5 1.5])
+yline(0)
+title('SpikeyGi 5Hz')
+ylabel('dFF')
+xlabel('seconds')
+
+hold off

+ 1 - 0
Figure 5/SpikeyGi_5Hz.mat

@@ -0,0 +1 @@
+/annex/objects/MD5-s64534527--dd4043fb9beefdb78162b5f402deec21

+ 84 - 0
Figure 5/confplot.m

@@ -0,0 +1,84 @@
+function varargout = confplot(varargin)
+%CONFPLOT Linear plot with continuous confidence/error boundaries.
+%
+%   CONFPLOT(X,Y,L,U) plots the graph of vector X vs. vector Y with
+%   'continuous' confidence/error boundaries specified by the vectors
+%   L and U.  L and U contain the lower and upper error ranges for each
+%   point in Y. The vectors X,Y,L and U must all be the same length.  
+%
+%   CONFPLOT(X,Y,E) or CONFPLOT(Y,E) plots Y with error bars [Y-E Y+E].
+%   CONFPLOT(...,'LineSpec') uses the color and linestyle specified by
+%   the string 'LineSpec'.  See PLOT for possibilities.
+%
+%   H = CONFPLOT(...) returns a vector of line handles.
+%
+%   For example,
+%      x = 1:0.1:10;
+%      y = sin(x);
+%      e = std(y)*ones(size(x));
+%      confplot(x,y,e)
+%   draws symmetric continuous confidence/error boundaries of unit standard deviation.
+%
+%   See also ERRORBAR, SEMILOGX, SEMILOGY, LOGLOG, PLOTYY, GRID, CLF, CLC, TITLE,
+%   XLABEL, YLABEL, AXIS, AXES, HOLD, COLORDEF, LEGEND, SUBPLOT, STEM.
+%
+%     © 2002 - Michele Giugliano, PhD (http://www.giugliano.info) (Bern, Monday Nov 4th, 2002 - 19:02)
+%    (bug-reports to michele@giugliano.info)
+%   $Revision: 1.0 $  $Date: 2002/11/11 14:36:08 $
+%                        
+
+if (nargin<2)
+ disp('ERROR: not enough input arguments!');
+ return;
+end % if
+
+x = [];  y = [];  z1 = [];  z2 = [];  spec = '';
+
+switch nargin
+ case 2
+  y  = varargin{1};
+  z1 = y + varargin{2};
+  z2 = y - varargin{2};
+  x  = 1:length(y);
+ case 3
+  x  = varargin{1};
+  y  = varargin{2};
+  z1 = y + varargin{3};
+  z2 = y - varargin{3};
+ case 4
+  x  = varargin{1};
+  y  = varargin{2};
+  z1 = y + varargin{4};
+  z2 = y - varargin{3};
+end % switch
+
+if (nargin >= 5)
+ x  = varargin{1};
+ y  = varargin{2};
+ z1 = y + varargin{4};
+ z2 = y - varargin{3};
+ spec = 'ok';
+end % 
+
+
+p = plot(x,y,x,z1,x,z2);    YLIM = get(gca,'YLim');    delete(p);
+a1 = area(x,z1,min(YLIM)); 
+hold on;
+set(a1,'LineStyle','none');     set(a1,'FaceColor',[0.9 0.9 0.9]);
+a2 = area(x,z2,min(YLIM)); 
+set(a2,'LineStyle','none');     set(a2,'FaceColor',[1 1 1]);
+if (~isempty(spec)),     
+ spec = sprintf('p = plot(x,y,varargin{5}');
+ for i=6:nargin,  spec = sprintf('%s,varargin{%d}',spec,i); end % for
+ spec = sprintf('%s);',spec);
+ eval(spec);
+else                     p = plot(x,y); 
+end;
+hold off;
+
+%set(gca,'Layer','top','XGrid','on','YGrid','on');               
+set(gca,'Layer','top');               
+
+H = [p, a1, a2];
+
+if (nargout>1) varargout{1} = H; end;