|
@@ -1,6 +1,4 @@
|
|
-%%
|
|
|
|
-load('PSTH data.mat', 'Control_PSTHz','Control_bPSTHz', 'Dreadd_PSTHz','Dreadd_bPSTHz', 'Control_sorted', 'Dreadd_sorted')
|
|
|
|
-%%
|
|
|
|
|
|
+
|
|
|
|
|
|
% bin comparison with bonferroni correction
|
|
% bin comparison with bonferroni correction
|
|
% any cell having at least 2 significant bins
|
|
% any cell having at least 2 significant bins
|
|
@@ -121,17 +119,7 @@ ylabel('Cell num')
|
|
legend({'Modulated', 'Unmodulated'})
|
|
legend({'Modulated', 'Unmodulated'})
|
|
title('Firing rate')
|
|
title('Firing rate')
|
|
|
|
|
|
-%figure
|
|
|
|
-% subplot(121)
|
|
|
|
-% pie([length(CtrlModulated), length(CtrlFreqSigNum)-length(CtrlModulated)])
|
|
|
|
-% title('Control (n=37)')
|
|
|
|
-% %legend({'Modulated', 'Unmodulated'})
|
|
|
|
-%
|
|
|
|
-% subplot(122)
|
|
|
|
-% pie([length(ExpModulated), length(ExpFreqSigNum)-length(ExpModulated)])
|
|
|
|
-% title('hM4Di (n=36)')
|
|
|
|
-% %legend({'Modulated', 'Unmodulated'})
|
|
|
|
-%
|
|
|
|
|
|
+
|
|
n1 = length(CtrlModulated); N1 = length(CtrlFreqSigBins);
|
|
n1 = length(CtrlModulated); N1 = length(CtrlFreqSigBins);
|
|
n2 = length(ExpModulated); N2 = length(ExpFreqSigNum);
|
|
n2 = length(ExpModulated); N2 = length(ExpFreqSigNum);
|
|
x1 = [repmat('a',N1,1); repmat('b',N2,1)];
|
|
x1 = [repmat('a',N1,1); repmat('b',N2,1)];
|
|
@@ -139,25 +127,6 @@ x2 = [repmat(1,n1,1); repmat(2,N1-n1,1); repmat(1,n2,1); repmat(2,N2-n2,1)];
|
|
[tbl,chi2stat,pval] = crosstab(x1,x2)
|
|
[tbl,chi2stat,pval] = crosstab(x1,x2)
|
|
|
|
|
|
|
|
|
|
-%%
|
|
|
|
-CtrlPosModulated = find(CtrlAvgZscoreSigBin> 0);
|
|
|
|
-CtrlNegModulated = find(CtrlAvgZscoreSigBin < 0);
|
|
|
|
-
|
|
|
|
-ExpPosModulated = find(ExpAvgZscoreSigBin> 0);
|
|
|
|
-ExpNegModulated = find(ExpAvgZscoreSigBin < 0);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-figure
|
|
|
|
-bar([length(CtrlPosModulated)*100/length(CtrlFreqSigBins), length(CtrlNegModulated)*100/length(CtrlFreqSigBins), ...,
|
|
|
|
- (length(CtrlFreqSigBins)-(length(CtrlPosModulated)+length(CtrlNegModulated)))*100/length(CtrlFreqSigBins);
|
|
|
|
-length(ExpPosModulated)*100/length(ExpFreqSigNum), length(ExpNegModulated)*100/length(ExpFreqSigNum), ...,
|
|
|
|
-(length(ExpFreqSigBins)-(length(ExpPosModulated)+length(ExpNegModulated)))*100/length(ExpFreqSigBins)],'stacked')
|
|
|
|
-set(gca, 'xticklabel', {'Control (n=37)', 'hM4Di (n=36)'})
|
|
|
|
-ylabel('Cell num')
|
|
|
|
-legend({'Postively Modulated', 'Negatively Modulated'})
|
|
|
|
-title('Firing rate')
|
|
|
|
-
|
|
|
|
-
|
|
|
|
%%
|
|
%%
|
|
figure
|
|
figure
|
|
PlotAllDataPoints(CtrlFreqSigNum, ExpFreqSigNum)
|
|
PlotAllDataPoints(CtrlFreqSigNum, ExpFreqSigNum)
|
|
@@ -181,16 +150,7 @@ ylabel('Cell num')
|
|
legend({'Modulated', 'Unmodulated'})
|
|
legend({'Modulated', 'Unmodulated'})
|
|
title('Burst rate')
|
|
title('Burst rate')
|
|
|
|
|
|
-% figure
|
|
|
|
-% subplot(121)
|
|
|
|
-% pie([length(CtrlModulated), CtrlBurstCellNum-length(CtrlModulated)])
|
|
|
|
-% title(['Control (n=', num2str(CtrlBurstCellNum), ')'])
|
|
|
|
-% %legend({'Modulated', 'Unmodulated'})
|
|
|
|
-%
|
|
|
|
-% subplot(122)
|
|
|
|
-% pie([length(ExpModulated), ExpBurstCellNum-length(ExpModulated)])
|
|
|
|
-% title(['hM4Di (n=', num2str(ExpBurstCellNum), ')'])
|
|
|
|
-% %legend({'Modulated', 'Unmodulated'})
|
|
|
|
|
|
+
|
|
|
|
|
|
n1 = length(CtrlModulated); N1 = CtrlBurstCellNum;
|
|
n1 = length(CtrlModulated); N1 = CtrlBurstCellNum;
|
|
n2 = length(ExpModulated); N2 = ExpBurstCellNum;
|
|
n2 = length(ExpModulated); N2 = ExpBurstCellNum;
|
|
@@ -207,12 +167,4 @@ p = ranksum (CtrlBurstSigNum, ExpBurstSigNum)
|
|
text(1.2, 25, ['p = ', num2str(p)])
|
|
text(1.2, 25, ['p = ', num2str(p)])
|
|
|
|
|
|
|
|
|
|
-%%
|
|
|
|
-CtrlM = Control_PSTHz(:,Control_sorted(CtrlModulated)); %Modulated cells
|
|
|
|
-ExpM = Dreadd_PSTHz(:,Dreadd_sorted(ExpModulated));
|
|
|
|
-
|
|
|
|
-figure
|
|
|
|
-boundedline(edges(1:end-1), mean(CtrlM,2), std(CtrlM,[],2)/sqrt(length(CtrlModulated)),'k')
|
|
|
|
-hold on
|
|
|
|
-boundedline(edges(1:end-1), mean(ExpM,2), std(ExpM,[],2)/sqrt(length(ExpModulated)),'r')
|
|
|
|
|
|
|