Rapid formation of non-spatial hippocampal representations consistent with behavioral timescale synaptic plasticity is modulated by entorhinal input.
The 18 matches
- [1] § Methods › Sequence-axon detection and analysis ↔ Main Scripts/EC_Axons_Sequences_and_Behavior_Only_Expert.m, lines 111–210 · score 0.83 · delay axon, offset axon, trial reliability, odor axon, EC axons, delay period
- [2] § Results › Two-photon calcium imaging of temporammonic entorhinal cortical axons in dorsal CA1 revealed differential sequential activity in LEC and MEC inputs ↔ Main Scripts/EC_Axons_Sequences_and_Behavior_Only_Expert.m, lines 111–210 · score 0.75 · odor offset, 0–1 s, 1–2 s, 2–6 s, Delay Period, axons
- [3] § Results › Chemogenetic inhibition of entorhinal cortex disrupted non-spatial BTSP ↔ Main Scripts/CA1PSAM_Decoding.m, lines 347–452 · score 0.67 · way ANOVA, LEC PSAM4, MEC PSAM4, mCherry, SVM, decoding
- [4] § Results ↔ Main Scripts/CA1PSAM_BTSP_average_fulltrial_10trials.m, lines 334–445 · score 0.65 · Benjamini Hochberg procedure, opposite odor, delay period, small events, Firing rate increase, reference event
- [5] § Results ↔ Main Scripts/CA1PSAM_BTSP_average_fulltrial_1trial.m, lines 334–445 · score 0.65 · Benjamini Hochberg procedure, opposite odor, delay period, small events, Firing rate increase, reference event
- [6] § Results › LEC inhibition reduced strength of odor representations in dorsal CA1 ↔ Main Scripts/CA1PSAM_Decoding.m, lines 207–229 · score 0.62 · odor decoding accuracy, MEC experimental, PSAM4 animals, LEC
- [7] § Methods › Calcium imaging data pre-processing › CA1 imaging with EC chemogenetics experiments ↔ Preprocessing/align_behavior.m, lines 17–64 · score 0.57 · default classifier, suite2p, movies, iscell, deconvolution, signals
- [8] § Methods › Linear regression models ↔ Main Scripts/CA1Learning_BTSP_average_odor_pres_10trials.m, lines 396–540 · score 0.56 · linear regression model, fitlme, scatter, mouse, day
- [9] § Methods › Linear regression models ↔ Main Scripts/CA1Learning_BTSP_average_odor_pres_1trial.m, lines 389–535 · score 0.56 · linear regression model, fitlme, scatter, mouse, day
- [10] § Methods › Calcium imaging data pre-processing › CA1 imaging with EC chemogenetics experiments ↔ Main Scripts/CA1PSAM_Binary_BTSP.m, lines 1–40 · score 0.53 · saline day, suite2p, classifier, motion, fluorescence, deconvolution
- [11] § Methods › Calcium imaging data pre-processing › EC axon imaging experiments ↔ Main Scripts/EC_Axons_Example_ROIs.m, lines 1–27 · score 0.53 · Deconvolved signals, suite2p, reward period, ball, locomotion, axon
- [12] § Methods › Calcium imaging data pre-processing › EC axon imaging experiments ↔ Main Scripts/EC_Axons_Selectivity_and_Decoding_Most_Selective_ROIs.m, lines 1–28 · score 0.53 · Deconvolved signals, suite2p, reward period, ball, locomotion, axon
- [13] § Results › Single-neuron holographical optogenetic stimulation induced odor-fields ↔ Main Scripts/CA1PSAM_AhmetBruker_compareeventshapes.m, lines 296–441 · score 0.53 · spontaneous events, event amplitudes, S3e, stimulation, width, STD
- [14] § Methods › Support vector machine decoding › CA1 imaging with EC chemogenetics experiments ↔ Main Scripts/EC_Axons_Selectivity_and_Decoding_Most_Selective_ROIs.m, lines 30–71 · score 0.52 · shuffle comparison, subsampling, decoding, assignment, block, ROIs
- [15] § Methods › Locomotion analysis ↔ Main Scripts/CA1Learning_Locomotion.m, lines 31–47 · score 0.51 · rolling backwards, locomotion, scored, ball, mouse, binned
- [16] § Methods › Locomotion analysis ↔ Main Scripts/CA1PSAM_Behavior_and_Locomotion.m, lines 41–56 · score 0.51 · rolling backwards, locomotion, scored, ball, mouse, binned
- [17] § Methods › Support vector machine decoding › CA1 imaging with EC chemogenetics experiments ↔ Main Scripts/CA1PSAM_Decoding.m, lines 40–64 · score 0.51 · shuffle comparison, subsampling, decoding, assignment, block, ROIs
- [18] § Results › LEC temporammonic axonal activity encoded stronger odor-specific information than MEC axonal activity ↔ Main Scripts/EC_Axons_Selectivity_and_Decoding_Most_Selective_ROIs.m, lines 244–253 · score 0.51 · odor decoding accuracy, delay period, axons, selectivity, offset
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 666 lines · 36 KB · no license · 3 matches
- %% Figure Panels made in this script:
- % FIGURE 4H-I
- % Get decoding accuracy of half second bins for:
- % just odor, first odor, second odor, firstvssecond, non-match vs match,
- % all 4 combos, and time during delay
- % Don't need to load this if you are just loading data
- load('allCA1PSAM.mat');
- % Notes on format
- % rawtrials is a 2x2 cell (1st dim is LEC then MEC, 2nd dim is controls then experimental animals)
- % rawtrials{1,1} is control LEC animals
- % rawtrials{2,1} is control MEC animals
- % rawtrials{1,2} is experimental LEC animals
- % rawtrials{2,2} is experimental MEC animals
- % Each of these is a nx4x2 cell (for n animals, 4 pairs, and 2 days for
- % each pair (with saline day first then PSEM day)
- % Ex: allCA1PSAM.rawtrials{1,2}{3,4,1} is saline day from the 4th pair of
- % 3rd animal from experimental LEC group
- % Within each 'F' is raw fluorescence, 'Fneu' is neuropil fluorescence,
- % and 'spks' is deconvolved signal (used for all analysis)
- % 'locomotion' is speed of ball (a.u.)
- % 'xyoff' is motion of brain calculated as movement of each imaging frame from reference frame
- % 'roistats' holds information for each ROI output from suite2p
- % 'beh' first column is odor combo, and 2nd column is outcome:
- % 1 = hit (lick on 12 or 21), 2 = false-choice (lick on 11 or 22),
- % 3 = miss (no-lick on 12 or 21), 4 = correct-rejection (no-lick on 11 or 22)
- % 'licking' holds lick timing for each trial
- % 'frametimes' is time x-axis for trials
- % First odor onset and offset are at 0 and 1 seconds
- % Second odor onset and offset are at 6 and 7 seconds
- % Reward period is from 8 to 11 seconds
- % 'p' are the parameters used to run 'make_allCA1PSAM.m' (see that code for specifics)
- %% Parameters
- numpairs = 4; % These are consistent for all data
- decode = struct; % Structure to hold all decoding results of each subsample
- decode.p = struct; % Structure for parameters regarding this
- decode.p.roisizes = [50:50:300,1000]; % How many rois to subsample for each step, Last is 1000 just to make sure got all ROIs for their betas
- decode.p.roisubsamples = 20; % How many times to subsample the ROIs for each roisize step
- decode.p.trainperc = 0.8; % Train on 80% of trials and test on 20% (done in 5 blocks of 20, or 5 blocks of 40 for justodor)
- decode.p.numshuf = 1; % NOT A REAL PARAMETER, I will just do one shuffle comparison for each real roisubsample
- % Jank assignment of bins for doing analysis with half second bins
- decode.p.bins = floor(allCA1PSAM.frametimes/0.5);
- decode.p.bins(1) = -4;
- decode.p.bins(end-4:end) = 27;
- decode.p.bins = decode.p.bins+5;
- decode.p.bintime = nan(1,decode.p.bins(end));
- for bin=1:decode.p.bins(end)
- thisbin = find(decode.p.bins==bin);
- decode.p.bintime(bin) = mean(allCA1PSAM.frametimes(thisbin));
- end
- % For the justodor time, you can use the same bins with the same start (just fewer at the end)
- decode.p.justodor1bins= [1:16]; % Which bins for first odor (2 secs before and 5 after)
- decode.p.justodor2bins = [13:28]; % Which bins for second odor (2 secs before and 5 after, overlap with last 2 seconds of delay)
- decode.p.delaytimebins = [9:15]; % These are middle 3.5 seconds of delay (skipping first second and last 0.5 seconds). This is 7 halfsecond bins
- %% Iterate, prepare data, and do all calculations (for real and shuffle)
- rng("Default"); % Reset MATLAB random number generator to yield repeatable results
- tic;
- decode.justodor = cell(2,2);
- decode.firstodor = cell(2,2);
- decode.secondodor = cell(2,2);
- decode.firstvssecond = cell(2,2);
- decode.matchvsnonmatch = cell(2,2);
- decode.fourcombos = cell(2,2);
- decode.delaytime = cell(2,2);
- decode.justodorbetas = cell(2,2);
- decode.firstodorbetas = cell(2,2);
- decode.secondodorbetas = cell(2,2);
- decode.firstvssecondbetas = cell(2,2);
- decode.matchvsnonmatchbetas = cell(2,2);
- decode.fourcombosbetas = cell(2,2);
- decode.delaytimebetas = cell(2,2);
- for groupregion=1:2 % LEC vs MEC
- for groupvirus=1:2 % Control (mcherry) vs experimental PSAM
- numanimals = size(allCA1PSAM.rawtrials{groupregion,groupvirus},1);
- decode.justodor{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.justodor1bins),2); % First 2 is saline vs PSEM, last 2 is real vs shuf
- decode.firstodor{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.bintime),2);
- decode.secondodor{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.bintime),2);
- decode.firstvssecond{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.justodor1bins),2);
- decode.matchvsnonmatch{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.bintime),2);
- decode.fourcombos{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.bintime),2);
- decode.delaytime{groupregion,groupvirus} = nan(numanimals,numpairs,2,length(decode.p.roisizes),decode.p.roisubsamples,length(decode.p.delaytimebins),length(decode.p.delaytimebins),2);
- decode.justodorbetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2); % Again first 2 is saline vs PSEM, second 2 is real vs shuf
- decode.firstodorbetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2);
- decode.secondodorbetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2);
- decode.firstvssecondbetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2);
- decode.matchvsnonmatchbetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2);
- decode.fourcombosbetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2);
- decode.delaytimebetas{groupregion,groupvirus} = cell(numanimals,numpairs,2,2);
- for animal=1:numanimals
- for pair=1:numpairs
- for daytype=1:2 % Saline vs PSEM
- disp(string(groupregion)+string(groupvirus)+string(animal)+string(pair)+string(daytype));
- toc;tic;
- % First bin the data
- data = allCA1PSAM.rawtrials{groupregion,groupvirus}{animal,pair,daytype}.spks; % CHANGE HERE IF YOU WANT FLUORESCENCE OR SOMETHING NOT SPKS
- [numrois,numtrials,~] = size(data);
- databinned = nan(numrois,numtrials,length(decode.p.bintime));
- for bin=1:length(decode.p.bintime)
- thisbin = find(decode.p.bins==bin);
- databinned(:,:,bin) = mean(data(:,:,thisbin),3);
- end
- % Prepare data for justodor
- thisbeh = allCA1PSAM.rawtrials{groupregion,groupvirus}{animal,pair,daytype}.beh(:,1);
- countodora = 0;
- countodorb = 0;
- odorabinned = nan(numrois,length(thisbeh),length(decode.p.justodor1bins));
- odorbbinned = nan(numrois,length(thisbeh),length(decode.p.justodor2bins));
- for trial=1:length(thisbeh)
- if thisbeh(trial) < 20 % This gets the first odor
- countodora = countodora + 1;
- odorabinned(:,countodora,:) = databinned(:,trial,decode.p.justodor1bins);
- else
- countodorb = countodorb + 1;
- odorbbinned(:,countodorb,:) = databinned(:,trial,decode.p.justodor1bins);
- end
- if mod(thisbeh(trial),2) % This gets the second odor
- countodora = countodora + 1;
- odorabinned(:,countodora,:) = databinned(:,trial,decode.p.justodor2bins);
- else
- countodorb = countodorb + 1;
- odorbbinned(:,countodorb,:) = databinned(:,trial,decode.p.justodor2bins);
- end
- end
- justodordatabinned = cat(2,odorabinned,odorbbinned);
- artificialbeh = cat(1,zeros(length(thisbeh),1),ones(length(thisbeh),1)); % Making this because cat justodora and odorb together (also use for firstvssecond)
- % And also prep data for first vs second odor
- firstvssecondbinned = cat(2,databinned(:,:,decode.p.justodor1bins),databinned(:,:,decode.p.justodor2bins));
- % also use artificialbeh here because cat them together
- % Get permutations of which rois to use for each step
- roiperms = cell(length(decode.p.roisizes),decode.p.roisubsamples);
- for roisizeiter=1:length(decode.p.roisizes)
- for roiiter=1:decode.p.roisubsamples
- if numrois > decode.p.roisizes(roisizeiter)
- roiperms{roisizeiter,roiiter} = randperm(numrois,decode.p.roisizes(roisizeiter));
- end
- end
- end
- % Now we have all data ready, can start iterating roisubsamples
- reachedend = 0;
- for roisizeiter=1:length(decode.p.roisizes)
- for roiiter=1:decode.p.roisubsamples
- % If we already reached the end we can just fill with last calculated values
- if reachedend
- decode.justodor{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,justodorreal,justodorshuf));
- decode.firstodor{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,firstodorreal,firstodorshuf));
- decode.secondodor{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,secondodorreal,secondodorshuf));
- decode.firstvssecond{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,firstvssecondreal,firstvssecondshuf));
- decode.matchvsnonmatch{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,matchvsnonmatchreal,matchvsnonmatchshuf));
- decode.fourcombos{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,fourcombosreal,fourcombosshuf));
- decode.delaytime{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:,:) = cat(3,delaytimereal,delaytimeshuf);
- continue;
- end
- if decode.p.roisizes(roisizeiter) >= numrois
- theseroi = [1:numrois]; % If numrois is smaller, than I just use all cells
- reachedend = 1; % just do it once then fill in rest
- else
- theseroi = roiperms{roisizeiter,roiiter};
- end
- % Now can call the decode functions repeatedly
- [justodorreal, justodorshuf, decode.justodorbetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.justodorbetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binnedbinarySVM(justodordatabinned(theseroi,:,:),artificialbeh,decode.p.trainperc,reachedend);
- [firstodorreal, firstodorshuf, decode.firstodorbetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.firstodorbetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binnedbinarySVM(databinned(theseroi,:,:),thisbeh>20,decode.p.trainperc,reachedend);
- [secondodorreal, secondodorshuf, decode.secondodorbetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.secondodorbetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binnedbinarySVM(databinned(theseroi,:,:),mod(thisbeh+1,2),decode.p.trainperc,reachedend);
- [firstvssecondreal, firstvssecondshuf, decode.firstvssecondbetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.firstvssecondbetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binnedbinarySVM(firstvssecondbinned(theseroi,:,:),artificialbeh,decode.p.trainperc,reachedend);
- [matchvsnonmatchreal, matchvsnonmatchshuf, decode.matchvsnonmatchbetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.matchvsnonmatchbetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binnedbinarySVM(databinned(theseroi,:,:),thisbeh==12|thisbeh==21,decode.p.trainperc,reachedend);
- [fourcombosreal, fourcombosshuf, decode.fourcombosbetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.fourcombosbetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binnedfourcombosSVM(databinned(theseroi,:,:),thisbeh,decode.p.trainperc,reachedend);
- [delaytimereal, delaytimeshuf, decode.delaytimebetas{groupregion,groupvirus}{animal,pair,daytype,1}, decode.delaytimebetas{groupregion,groupvirus}{animal,pair,daytype,2}] = binneddelaytimeSVM(databinned(theseroi,:,decode.p.delaytimebins),decode.p.trainperc,reachedend);
- % Save them into 'decode'
- decode.justodor{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,justodorreal,justodorshuf));
- decode.firstodor{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,firstodorreal,firstodorshuf));
- decode.secondodor{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,secondodorreal,secondodorshuf));
- decode.firstvssecond{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,firstvssecondreal,firstvssecondshuf));
- decode.matchvsnonmatch{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,matchvsnonmatchreal,matchvsnonmatchshuf));
- decode.fourcombos{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:) = squeeze(cat(3,fourcombosreal,fourcombosshuf));
- decode.delaytime{groupregion,groupvirus}(animal,pair,daytype,roisizeiter,roiiter,:,:,:) = cat(3,delaytimereal,delaytimeshuf);
- end
- end
- end
- end
- end
- end
- end
- toc;
- % Save to disk
- save('PSAMDecoding.mat','decode','-v7.3');
- %% FIGURE 4H
- % Figures visualizing decoding accuracy across trial (with significant stars), for LEC and MEC experimentals
- whichroisize = 2; % 2 is use 100 ROIs, 7 is use all ROIs
- usebintime = decode.p.bintime;
- whichbins = [1:26];
- usebintime = usebintime(whichbins);
- LECrealdecoding = squeeze(mean(decode.firstodor{1,2}(:,:,:,whichroisize,:,whichbins,1),5,'omitnan'))*100; % Only averaging the roiiters for this one roisize
- LECshufdecoding = squeeze(mean(decode.firstodor{1,2}(:,:,:,whichroisize,:,whichbins,2),5,'omitnan'))*100;
- plotdecodeacrosstrialnew(LECrealdecoding,LECshufdecoding,usebintime,[0.8 0 0],[45 90],[50:10:90],'Decoding Accuracy %',[0.5 0.6 0 0],"First Odor Decoding" + newline + "LEC PSAM4 Animals",'FirstOdorDecode100ROIsLECPSAM');
- MECrealdecoding = squeeze(mean(decode.firstodor{2,2}(:,:,:,whichroisize,:,whichbins,1),5,'omitnan'))*100; % Only averaging the roiiters for this one roisize
- MECshufdecoding = squeeze(mean(decode.firstodor{2,2}(:,:,:,whichroisize,:,whichbins,2),5,'omitnan'))*100;
- plotdecodeacrosstrialnew(MECrealdecoding,MECshufdecoding,usebintime,[0 0 0.8],[45 90],[50:10:90],'Decoding Accuracy %',[0.5 0.6 0 0],"First Odor Decoding" + newline + "MEC PSAM4 Animals",'FirstOdorDecode100ROIsMECPSAM');
- LECrealdecoding = squeeze(mean(decode.secondodor{1,2}(:,:,:,whichroisize,:,whichbins,1),5,'omitnan'))*100; % Only averaging the roiiters for this one roisize
- LECshufdecoding = squeeze(mean(decode.secondodor{1,2}(:,:,:,whichroisize,:,whichbins,2),5,'omitnan'))*100;
- plotdecodeacrosstrialnew(LECrealdecoding,LECshufdecoding,usebintime,[0.8 0 0],[45 90],[50:10:90],'Decoding Accuracy %',[0.5 0.6 0 0],"Second Odor Decoding" + newline + "LEC PSAM4 Animals",'SecondOdorDecode100ROIsLECPSAM');
- MECrealdecoding = squeeze(mean(decode.secondodor{2,2}(:,:,:,whichroisize,:,whichbins,1),5,'omitnan'))*100; % Only averaging the roiiters for this one roisize
- MECshufdecoding = squeeze(mean(decode.secondodor{2,2}(:,:,:,whichroisize,:,whichbins,2),5,'omitnan'))*100;
- plotdecodeacrosstrialnew(MECrealdecoding,MECshufdecoding,usebintime,[0 0 0.8],[45 90],[50:10:90],'Decoding Accuracy %',[0.5 0.6 0 0],"Second Odor Decoding" + newline + "MEC PSAM4 Animals",'SecondOdorDecode100ROIsMECPSAM');
- %% FIGURE 4I
- % Paired comparisons for just odor decoding of odor period
- whichroisize = 2; % 2 is use 100 ROIs, 7 is use all ROIs
- data = cell(2,2);
- whichbins = [5:6]; % 5-6 is odor, 7-8 is offset, 9-15 is delay
- for groupregion=1:2 % LEC vs MEC
- for groupvirus=1:2 % Control (mcherry) vs experimental PSAM
- data{groupregion,groupvirus} = squeeze(mean(decode.justodor{groupregion,groupvirus}(:,:,:,whichroisize,:,whichbins,1),[5 6],'omitnan'))*100; % Only averaging this roiiters and chosen bins
- end
- end
- plot4groupcompnew(data,[45 101],[50:10:100],'Decoding Accuracy %',[0.97 0.5 0 0],"\fontsize{20}Odor Decoding\fontsize{12}" + newline + "\fontsize{12}(during odor presentation)","PSAMJustOdorDecodeDuringOdor100ROIsnew");
- %% Function that plots decoding results across trial structure (for 11 seconds) NEW VERSION WITH 3-Way ANOVA (pair x daytype x bin)
- function plotdecodeacrosstrialnew(realdata,shufdata,bintime,color,ylimrange,yaxisticks,yaxistext,legendloc,titletext,savetext)
- % 3-way ANOVA repeated measures (pair x daytype x bin)
- % Within subject for all 3, with continuous measures for pair and bin, but
- % categorical for daytype
- [numanimals,numpairs,numdaytypes,numbins] = size(realdata); % Only works with 4 numpairs and 2 daytypes
- if numpairs~=4 || numdaytypes~=2
- disp("ERROR WRONG NUMBER OF PAIRS OR DAYTYPES");
- end
- datafortbl = nan(numanimals,numpairs*numdaytypes*numbins);
- tblvariables = cell(1,numpairs*numdaytypes*numbins);
- withindesignarray = nan(numpairs*numdaytypes*numbins,3);
- countcolumn = 0;
- for pair=1:numpairs
- for daytype=1:numdaytypes
- for bin=1:numbins
- countcolumn = countcolumn + 1;
- datafortbl(:,countcolumn) = squeeze(realdata(:,pair,daytype,bin));
- tblvariables{countcolumn} = sprintf('P%dDT%dBin%d',pair,daytype,bin);
- withindesignarray(countcolumn,:) = [pair,daytype,bin];
- end
- end
- end
- tbl = array2table(datafortbl,'VariableNames',tblvariables);
- withindesign = array2table(withindesignarray,'VariableNames',{'Pair','Daytype','Bin'});
- withindesign.Daytype = categorical(withindesign.Daytype);
- modelspecstart = sprintf('P%dDT%dBin%d',1,1,1);
- modelspecend = sprintf('P%dDT%dBin%d',numpairs,numdaytypes,numbins);
- modelspectext = cat(2,modelspecstart,'-',modelspecend,'~1');
- rm = fitrm(tbl,modelspectext,'WithinDesign',withindesign);
- mauchlytbl = mauchly(rm); % Mauchly test for sphericity (for reference)
- ranovatbl = ranova(rm, 'WithinModel', 'Pair*Daytype*Bin'); % ANOVA For reference
- multcomptbl = multcompare(rm,'Daytype','By','Bin');
- pvals = multcomptbl{[1:numbins]*2,6};
- allrealsaline = nan(numanimals*numpairs,length(bintime));
- allrealPSEM = nan(numanimals*numpairs,length(bintime));
- allshuf = nan(numanimals*numpairs*2,length(bintime));
- for bin=1:length(bintime)
- tempreal = squeeze(realdata(:,:,:,bin));
- temprealsaline = tempreal(:,:,1);
- temprealPSEM = tempreal(:,:,2);
- allrealsaline(:,bin) = temprealsaline(:);
- allrealPSEM(:,bin) = temprealPSEM(:);
- tempshuf = squeeze(shufdata(:,:,:,bin));
- allshuf(:,bin) = tempshuf(:);
- end
- salinemean = mean(allrealsaline,1,'omitnan');
- salineSEM = std(allrealsaline,0,1,'omitnan')./sqrt(size(allrealsaline,1));
- PSEMmean = mean(allrealPSEM,1,'omitnan');
- PSEMSEM = std(allrealPSEM,0,1,'omitnan')./sqrt(size(allrealPSEM,1));
- shufmean = mean(allshuf,1,'omitnan');
- shufSEM = std(allshuf,0,1,'omitnan')./sqrt(size(allshuf,1));
- fillx = [bintime fliplr(bintime)];
- fillysaline = [salinemean+salineSEM fliplr(salinemean-salineSEM)]; % These are for filled SEM
- fillyPSEM = [PSEMmean+PSEMSEM fliplr(PSEMmean-PSEMSEM)];
- fillyshuf = [shufmean+1.96*shufSEM fliplr(shufmean-1.96*shufSEM)]; % Multiply by 1.96 to get 95% confidence intervals
- fig = figure;
- hold on;
- fill([0 1 1 0],[-1 -1 110 110],'k','FaceAlpha',0.2,'LineStyle','none');
- fill([6 7 7 6],[-1 -1 110 110],'k','FaceAlpha',0.2,'LineStyle','none');
- fill([8 11 11 8],[-1 -1 110 110],'k','FaceAlpha',0.1,'LineStyle','none');
- shuffleplot = plot(bintime,shufmean,'k-','LineWidth',2);
- fill(fillx,fillyshuf,'k','FaceAlpha',0.2,'LineStyle','none');
- fill(fillx,fillysaline,color,'FaceAlpha',0.2,'LineStyle','none');
- fill(fillx,fillyPSEM,color,'FaceAlpha',0.2,'LineStyle','none');
- salineplot = plot(bintime,salinemean,'-','Color',color,'LineWidth',2);
- PSEMplot = plot(bintime,PSEMmean,'--','Color',color,'LineWidth',2);
- scatter(bintime(pvals'<0.05&salinemean>50&PSEMmean>50),(ylimrange(2)-ylimrange(1))*0.97+ylimrange(1),100,'k*');
- legend([salineplot PSEMplot shuffleplot],{'Saline','uPSEM','Shuffle'},'FontSize',14,'Position',legendloc);
- legend boxoff;
- title(titletext);
- ylabel(yaxistext);
- xticks([0:2:14]);
- xlim([-2 11]);
- xlabel('Time (sec)');
- yticks(yaxisticks);
- ylim(ylimrange);
- set(gcf, 'Position', [200, 200, 550, 350]);
- set(gcf,'color','w');
- ax = gca;
- ax.FontSize = 18;
- ax.FontName = 'Arial';
- ax.XColor = [0 0 0];
- ax.YColor = [0 0 0];
- fig.Renderer = 'painters';
- saveas(fig,savetext+".epsc");
- saveas(fig,savetext+".png");
- saveas(fig,savetext+".fig");
- exportgraphics(fig,savetext+".pdf");
- end
- %% New version of other function using 3-way ANOVA
- function plot4groupcompnew(data,ylimrange,yaxisticks,yaxistext,legendloc,titletext,savetext)
- colors = [[1 0.2 0.2];[0.2 0.2 1];[0.8 0 0];[0 0 0.8]];
- xticklocs = [1,2;3,4;5.5,6.5;7.5,8.5];
- % 3-way ANOVA repeated measures (group x pair x daytype)
- % Within subject for pair and daytype, between subject for group
- catdata = cat(1,data{1,1},data{2,1},data{1,2},data{2,2});
- [totalanimals,numpairs,numdaytype] = size(catdata);
- grouplabels = [repmat(1,size(data{1,1},1),1);repmat(2,size(data{2,1},1),1);repmat(3,size(data{1,2},1),1);repmat(4,size(data{2,2},1),1)];
- datafortbl = [];
- for animal = 1:totalanimals
- animaldata = catdata(animal,:,:);
- datafortbl = cat(1,datafortbl,animaldata(:)');
- end
- datafortbl = cat(2,datafortbl,grouplabels);
- tbl = array2table(datafortbl,'VariableNames',{'S1','S2','S3','S4','P1','P2','P3','P4','Group'});
- tbl.Group = categorical(tbl.Group);
- withindesign = table([1 1 1 1 2 2 2 2]',[1:4 1:4]','VariableNames',{'Daytype','Pair'});
- withindesign.Daytype = categorical(withindesign.Daytype);
- % withindesign.Pair = categorical(withindesign.Pair); % This is not categorical
- rm = fitrm(tbl,'S1-P4~Group','WithinDesign',withindesign);
- mauchlytbl = mauchly(rm); % Mauchly test for sphericity (for reference)
- ranovatbl = ranova(rm, 'WithinModel', 'Pair*Daytype'); % ANOVA For reference
- multcomptbl = multcompare(rm,'Daytype','By','Group');
- pvals = nan(4,1);
- for group=1:4
- pvals(group) = multcomptbl{group*2-2+1,6};
- fprintf('Lower = %.4f and Upper = %.4f\n', multcomptbl{group*2-2+1,7}, multcomptbl{group*2-2+1,8});
- end
- fig = figure;
- hold on;
- yline(50,'--k','LineWidth',2);
- for groupvirus=1:2 % Control (mcherry) vs experimental PSAM
- for groupregion=1:2 % LEC vs MEC
- comparenum = groupvirus*2-2 + groupregion; % Which comparison is this? - first is LEC control, 2nd MEC control exp, 3rd LEC exp, 4th MEC exp
- thisdata = catdata(grouplabels==comparenum,:);
- salineaves = mean(thisdata(:,1:numpairs),2,'omitnan'); % Animal averages to plot dots
- PSEMaves = mean(thisdata(:,numpairs+1:numpairs*2),2,'omitnan');
- salinemean = mean(salineaves) % Overall average mean bar across
- PSEMmean = mean(PSEMaves)
- salinestd = std(salineaves)
- PSEMstd = std(PSEMaves)
- plot(xticklocs(comparenum,:),[salineaves,PSEMaves],'-','Color',[0.5 0.5 0.5],'LineWidth',1);
- salinescatter = scatter(xticklocs(comparenum,1),salineaves,40,'MarkerEdgeColor',[0.6 0.6 0.6],'MarkerFaceColor',[1 1 1],'LineWidth',1.5);
- PSEMscatter = scatter(xticklocs(comparenum,2),PSEMaves,40,'MarkerEdgeColor',[0.6 0.6 0.6],'MarkerFaceColor',[0.6 0.6 0.6],'LineWidth',1.5);
- errorbar(xticklocs(comparenum,:),[salinemean,PSEMmean],[salinestd/sqrt(length(salineaves)),PSEMstd/sqrt(length(PSEMaves))],'.-','Color',colors(comparenum,:),'LineWidth',4,'Capsize',8);
- plot([xticklocs(comparenum,1) xticklocs(comparenum,1) xticklocs(comparenum,2) xticklocs(comparenum,2)],[(ylimrange(2)-ylimrange(1))*0.86+ylimrange(1) (ylimrange(2)-ylimrange(1))*0.88+ylimrange(1) (ylimrange(2)-ylimrange(1))*0.88+ylimrange(1) (ylimrange(2)-ylimrange(1))*0.86+ylimrange(1)],'-k','LineWidth',1.5);
- if pvals(comparenum) < 0.001
- asterisktext = "\bf\ast\ast\ast";
- signbartext = "p < 0.001";
- elseif pvals(comparenum) < 0.01
- asterisktext = "\bf\ast\ast";
- signbartext = sprintf("p = %.3f",pvals(comparenum));
- elseif pvals(comparenum) < 0.05
- asterisktext = "\bf\ast";
- signbartext = sprintf("p = %.3f",pvals(comparenum));
- elseif pvals(comparenum) < 0.1
- asterisktext = " ";
- signbartext = sprintf("p = %.3f",pvals(comparenum));
- else
- asterisktext = " ";
- signbartext = "n.s.";
- end
- text(mean(xticklocs(comparenum,:)),(ylimrange(2)-ylimrange(1))*0.985+ylimrange(1),asterisktext,'HorizontalAlignment','Center','BackGroundColor','none','FontSize',28);
- text(mean(xticklocs(comparenum,:)),(ylimrange(2)-ylimrange(1))*0.92+ylimrange(1),signbartext,'HorizontalAlignment','Center','BackGroundColor','none','FontSize',14);
- end
- end
- legend([salinescatter(1) PSEMscatter(1)],{'S','P'},'FontSize',20,'Position',legendloc);
- legend boxoff;
- xticks([mean(xticklocs(1,:)) mean(xticklocs(2,:)) mean(xticklocs(3,:)) mean(xticklocs(4,:))]);
- xticklabels({'LEC mCherry','MEC mCherry','LEC PSAM4','MEC PSAM4'});
- xtickangle(35);
- xlim([xticklocs(1,1)-0.5 xticklocs(4,2)+0.5]);
- ylabel(yaxistext);
- yticks(yaxisticks);
- ylim(ylimrange);
- title(titletext);
- set(gcf, 'Position', [200, 200, 500, 500]);
- set(gcf,'color','w');
- ax = gca;
- ax.FontSize = 18;
- ax.FontName = 'Arial';
- ax.XColor = [0 0 0];
- ax.YColor = [0 0 0];
- fig.Renderer = 'painters';
- saveas(fig,savetext+".epsc");
- saveas(fig,savetext+".png");
- saveas(fig,savetext+".fig");
- exportgraphics(fig,savetext+".pdf");
- end
- %% Most used function that does a binary SVM on each bin
- % Inputs 'data' is 3D (numrois,numtrials,numbins)
- % 'groups' is logical with equal sizes
- % 'trainperc' should always be 0.8
- % 'savebeta' only if all ROIs being used, I'll save the beta coefficients for each ROI and each bin
- % First output is accuracy across all bins for real data, second is same
- % for the single shuffle (only shuffle the training set group assignment)
- % Outbetas are the average beta coefficients from SVM (kinda like weights
- % for strength of information corresponding to each ROI)
- function [outaccreal, outaccshuf, outrealbetas, outshufbetas] = binnedbinarySVM(Data,groups,trainperc,savebeta)
- data0 = Data(:,groups==0,:); % I want to split so we can grab first 10 (or 20) from each group for testing
- data1 = Data(:,groups==1,:);
- [numrois,trialspergroup,numbins] = size(data0);
- if trainperc == 0.8
- numblocks = 5;
- numtesttrials = trialspergroup/5; % Number of testtrials per group
- else
- disp("Check trainperc, not 0.8");
- end
- if savebeta
- realbetas = nan(numrois,numbins,numblocks);
- shufbetas = nan(numrois,numbins,numblocks);
- end
- accreal = nan(numblocks,numbins);
- accshuf = nan(numblocks,numbins);
- traintarget = [zeros(trialspergroup-numtesttrials,1); ones(trialspergroup-numtesttrials,1)];
- shuftraintarget = traintarget(randperm(length(traintarget)));
- testtarget = [zeros(numtesttrials,1); ones(numtesttrials,1)];
- for block=1:numblocks
- testtrials = [(block-1)*numtesttrials+1:block*numtesttrials];
- traintrials = [1:trialspergroup];
- traintrials(testtrials) = [];
- for bin=1:numbins
- trainset = [squeeze(data0(:,traintrials,bin)),squeeze(data1(:,traintrials,bin))]';
- testset = [squeeze(data0(:,testtrials,bin)),squeeze(data1(:,testtrials,bin))]';
- % For real data
- svmreal = fitcsvm(trainset,traintarget);
- svmoutreal = predict(svmreal,testset);
- accreal(block,bin) = sum(svmoutreal==testtarget) / (numtesttrials*2);
- % For shuffle data
- svmshuf = fitcsvm(trainset,shuftraintarget);
- svmoutshuf = predict(svmshuf,testset);
- accshuf(block,bin) = sum(svmoutshuf==testtarget) / (numtesttrials*2);
- if savebeta
- realbetas(:,bin,block) = svmreal.Beta;
- shufbetas(:,bin,block) = svmshuf.Beta;
- end
- end
- end
- outaccreal = mean(accreal,1);
- outaccshuf = mean(accshuf,1);
- if savebeta
- outrealbetas = squeeze(mean(realbetas,3));
- outshufbetas = squeeze(mean(shufbetas,3));
- else
- outrealbetas = NaN;
- outshufbetas = NaN;
- end
- end
- %% Nearly identical to previous function, but for 4 combinations
- % Again only shuffling the training set group assignment
- % Big difference is that I'm averaging Betas for each binary learner
- % I also take absolute value of Betas before averaging because not sure how
- % group assignment works
- function [outaccreal, outaccshuf, outrealbetas, outshufbetas] = binnedfourcombosSVM(Data,groups,trainperc,savebeta)
- data11 = Data(:,groups==11,:);
- data12 = Data(:,groups==12,:);
- data21 = Data(:,groups==21,:);
- data22 = Data(:,groups==22,:);
- [numrois,trialspergroup,numbins] = size(data11);
- if trainperc == 0.8
- numblocks = 5;
- numtesttrials = trialspergroup/5; % Number of testtrials per group
- else
- disp("Check trainperc, not 0.8");
- end
- if savebeta
- realbetas = nan(numrois,numbins,numblocks);
- shufbetas = nan(numrois,numbins,numblocks);
- end
- accreal = nan(numblocks,numbins);
- accshuf = nan(numblocks,numbins);
- traintarget = [zeros(trialspergroup-numtesttrials,1); ones(trialspergroup-numtesttrials,1); ones(trialspergroup-numtesttrials,1)*2; ones(trialspergroup-numtesttrials,1)*3];
- shuftraintarget = traintarget(randperm(length(traintarget)));
- testtarget = [zeros(numtesttrials,1); ones(numtesttrials,1); ones(numtesttrials,1)*2; ones(numtesttrials,1)*3];
- for block=1:numblocks
- testtrials = [(block-1)*numtesttrials+1:block*numtesttrials];
- traintrials = [1:trialspergroup];
- traintrials(testtrials) = [];
- for bin=1:numbins
- trainset = [squeeze(data11(:,traintrials,bin)),squeeze(data12(:,traintrials,bin)),squeeze(data21(:,traintrials,bin)),squeeze(data22(:,traintrials,bin))]';
- testset = [squeeze(data11(:,testtrials,bin)),squeeze(data12(:,testtrials,bin)),squeeze(data21(:,testtrials,bin)),squeeze(data22(:,testtrials,bin))]';
- % For real data
- svmreal = fitcecoc(trainset,traintarget);
- svmoutreal = predict(svmreal,testset);
- accreal(block,bin) = sum(svmoutreal==testtarget) / (numtesttrials*4);
- % For shuffle data
- svmshuf = fitcecoc(trainset,shuftraintarget);
- svmoutshuf = predict(svmshuf,testset);
- accshuf(block,bin) = sum(svmoutshuf==testtarget) / (numtesttrials*4);
- if savebeta
- realnumlearners = length(svmreal.BinaryLearners);
- tempreal = nan(numrois,realnumlearners);
- for learner=1:realnumlearners
- tempreal(:,learner) = abs(svmreal.BinaryLearners{learner}.Beta);
- realbetas(:,bin,block) = mean(tempreal,2);
- end
- shufnumlearners = length(svmshuf.BinaryLearners);
- tempshuf = nan(numrois,shufnumlearners);
- for learner=1:shufnumlearners
- tempshuf(:,learner) = abs(svmshuf.BinaryLearners{learner}.Beta);
- shufbetas(:,bin,block) = mean(tempshuf,2);
- end
- end
- end
- end
- outaccreal = mean(accreal,1);
- outaccshuf = mean(accshuf,1);
- if savebeta
- outrealbetas = squeeze(mean(realbetas,3));
- outshufbetas = squeeze(mean(shufbetas,3));
- else
- outrealbetas = NaN;
- outshufbetas = NaN;
- end
- end
- %% Function for decoding time (very different from other functions)
- % Will also do 80% training 20% testing
- % Instead of accuracy, I output matrix
- function [outmatrixreal, outmatrixshuf, outrealbetas, outshufbetas] = binneddelaytimeSVM(Data,trainperc,savebeta)
- [numrois,numtrials,numbins] = size(Data);
- % First prepare data
- catdata = [];
- for bin=1:numbins
- catdata = cat(2,catdata,squeeze(Data(:,:,bin)));
- end
- traintarget = repelem(1:numbins,numtrials)';
- shuftraintarget = traintarget(randperm(length(traintarget)));
- catdata = catdata'; % Have to transpose because need ROI in 2nd dim
- if trainperc == 0.8
- numblocks = 5;
- numtesttrials = numtrials/5; % Number of testtrials per group
- else
- disp("Check trainperc, not 0.8");
- end
- if savebeta
- realbetas = nan(numrois,numblocks);
- shufbetas = nan(numrois,numblocks);
- end
- matrixreal = nan(numbins,numbins,numblocks);
- matrixshuf = nan(numbins,numbins,numblocks);
- for block=1:numblocks
- testtrials = false(numtrials,1);
- testtrials((block-1)*numtesttrials+1:block*numtesttrials) = true;
- testrows = repmat(testtrials,numbins,1);
- trainrows = ~testrows;
- svmreal = fitcecoc(catdata(trainrows,:),traintarget(trainrows));
- svmoutreal = predict(svmreal,catdata(testrows,:));
- svmshuf = fitcecoc(catdata(trainrows,:),shuftraintarget(trainrows));
- svmoutshuf = predict(svmshuf,catdata(testrows,:));
- if savebeta
- realnumlearners = length(svmreal.BinaryLearners);
- tempreal = nan(numrois,realnumlearners);
- for learner=1:realnumlearners
- tempreal(:,learner) = abs(svmreal.BinaryLearners{learner}.Beta);
- realbetas(:,block) = mean(tempreal,2);
- end
- shufnumlearners = length(svmshuf.BinaryLearners);
- tempshuf = nan(numrois,shufnumlearners);
- for learner=1:shufnumlearners
- tempshuf(:,learner) = abs(svmshuf.BinaryLearners{learner}.Beta);
- shufbetas(:,block) = mean(tempshuf,2);
- end
- end
- realbins = traintarget(testrows);
- for realbin=1:numbins
- for predbin=1:numbins
- matrixreal(realbin,predbin,block) = sum(svmoutreal==predbin & realbins==realbin) / numtesttrials;
- matrixshuf(realbin,predbin,block) = sum(svmoutshuf==predbin & realbins==realbin) / numtesttrials;
- end
- end
- end
- outmatrixreal = mean(matrixreal,3);
- outmatrixshuf = mean(matrixshuf,3);
- if savebeta
- outrealbetas = squeeze(mean(realbetas,2));
- outshufbetas = squeeze(mean(shufbetas,2));
- else
- outrealbetas = NaN;
- outshufbetas = NaN;
- end
- end
CA1PSAM_Decoding.m at commit 3ff88ad, no license · at the source
Overview
- Department of Neurology, David Geffen School of Medicine, University of California, Los Angeles,Los Angeles, CA USA
- Program in Neurosciences and Mental Health, The Hospital for Sick Children,Toronto, ON Canada
- Department of Physiology, University of Toronto,Toronto, ON Canada
- Greater Los Angeles Veteran Affairs Medical Center, Los Angeles, CA USA
- Intellectual and Developmental Disabilities Research Center, University of California, Los Angeles,Los Angeles, CA USA
- Semel Institute for Neuroscience and Human Behavior, University of California,Los Angeles, CA USA
- Integrative Center for Learning and Memory, University of California,Los Angeles, CA USA
Abstract
Behavioral timescale synaptic plasticity (BTSP) is a form of synaptic potentiation where a single plateau potential in hippocampal neurons forms a place field during spatial learning. However, it remains unknown whether BTSP also forms non-spatial responses and what roles the medial and lateral entorhinal cortex (MEC and LEC) play in driving non-spatial BTSP. Using two-photon calcium imaging of CA1 pyramidal neurons in mice learning an odor-cued working memory task, we observed spontaneously-occurring large plateau-like calcium events during odor cues, forming stable odor representations. Using holographic optogenetics, we induced similar plateau-like calcium events in single neurons that were followed by novel odor representations. Chemogenetic inhibition of MEC reduced the frequency of plateau-like events, whereas LEC inhibition reduced their efficiency in forming odor representations. Together, our findings demonstrate that rare large somatic calcium events, consistent with BTSP, precede and drive novel odor representations in a manner differentially regulated by medial and lateral entorhinal cortex.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 18 matches between paragraphs and lines of code.
ccdorian/NonSpatialBTSP2026
3ff88ad870bab11eb1853e971a2745fe9044ec39, 3 March 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
97 files
- Main Scripts/
AhmetBruker_All_Stim_Neu , MATLAB, 193 linesrons.m - Main Scripts/
AhmetBruker_BTSP_average , MATLAB, 288 lines_fulltrial_10trials.m - Main Scripts/
AhmetBruker_Binary_BTSP. , MATLAB, 354 linesm - Main Scripts/
AhmetBruker_Stim_Example , MATLAB, 95 lines_BTSP_Trace.m - Main Scripts/
CA1Learning_BTSP_average , MATLAB, 366 lines_fulltrial_10trials.m - Main Scripts/
CA1Learning_BTSP_average , MATLAB, 365 lines_fulltrial_1trial.m - Main Scripts/
CA1Learning_BTSP_average , MATLAB, 594 lines, 1 match_odor_pres_10trials.m - Main Scripts/
CA1Learning_BTSP_average , MATLAB, 589 lines, 1 match_odor_pres_1trial.m - Main Scripts/
CA1Learning_Behavior.m , MATLAB, 267 lines - Main Scripts/
CA1Learning_Binary_BTSP. , MATLAB, 550 linesm - Main Scripts/
CA1Learning_Locomotion.m , MATLAB, 627 lines, 1 match - Main Scripts/
CA1PSAM_AhmetBruker_comp , MATLAB, 667 lines, 1 matchareeventshapes.m - Main Scripts/
CA1PSAM_BTSP_average_ful , MATLAB, 639 lines, 1 matchltrial_10trials.m - Main Scripts/
CA1PSAM_BTSP_average_ful , MATLAB, 718 lines, 1 matchltrial_1trial.m - Main Scripts/
CA1PSAM_BTSP_average_ful , MATLAB, 402 linesltrial_rangeoftrialsbefo reafter.m - Main Scripts/
CA1PSAM_BTSP_average_odo , MATLAB, 549 linesr_pres_10trials.m - Main Scripts/
CA1PSAM_BTSP_average_odo , MATLAB, 406 linesr_pres_10trials_by_ampli tude.m - Main Scripts/
CA1PSAM_BTSP_average_odo , MATLAB, 549 linesr_pres_1trial.m - Main Scripts/
CA1PSAM_Behavior_and_Loc , MATLAB, 1,046 lines, 1 matchomotion.m - Main Scripts/
CA1PSAM_Binary_BTSP.m , MATLAB, 912 lines, 1 match - Main Scripts/
CA1PSAM_Binary_BTSP_1st2 , MATLAB, 803 linesndodor.m - Main Scripts/
CA1PSAM_Decoding.m , MATLAB, 666 lines, 3 matches - Main Scripts/
CA1PSAM_Example_BTSP_Tra , MATLAB, 103 linesce.m - Main Scripts/
CA1PSAM_Locomotion_BTSP_ , MATLAB, 546 linesaverage_odor_pres.m - Main Scripts/
CA1PSAM_Selectivity.m , MATLAB, 321 lines - Main Scripts/
EC_Axons_Example_Behavio , MATLAB, 126 linesr_Session.m - Main Scripts/
EC_Axons_Example_FOVs_an , MATLAB, 188 linesd_Traces.m - Main Scripts/
EC_Axons_Example_ROIs.m , MATLAB, 152 lines, 1 match - Main Scripts/
EC_Axons_Selectivity_and , MATLAB, 501 lines, 3 matches_Decoding_Most_Selective _ROIs.m - Main Scripts/
EC_Axons_Sequences_and_B , MATLAB, 876 lines, 2 matchesehavior_Only_Expert.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 67 linesCellReg/ adjust_FOV_size.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 432 linesCellReg/ align_images.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 23 linesCellReg/ check_if_in_overlapping_ FOV.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 48 linesCellReg/ choose_best_model.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 335 linesCellReg/ cluster_cells.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 76 linesCellReg/ compute_centroid_distanc es_model.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 82 linesCellReg/ compute_centroid_locatio ns.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 33 linesCellReg/ compute_centroids_projec tions.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 181 linesCellReg/ compute_data_distributio n.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 33 linesCellReg/ compute_footprints_proje ctions.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 63 linesCellReg/ compute_p_same.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 103 linesCellReg/ compute_scores.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 135 linesCellReg/ compute_spatial_correlat ions_model.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 307 linesCellReg/ demo.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 422 linesCellReg/ demo_2P.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 70 linesCellReg/ display_progress_bar.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 36 linesCellReg/ estimate_beta_mixture_pa rams.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 38 linesCellReg/ estimate_number_of_bins. m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 80 linesCellReg/ estimate_registration_ac curacy.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 80 linesCellReg/ evaluate_data_quality.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 268 linesCellReg/ freezeColors.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 100 linesCellReg/ gaussfit.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 115 linesCellReg/ initial_registration_cen troid_distances.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 189 linesCellReg/ initial_registration_spa tial_correlations.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 40 linesCellReg/ interpolate_pixel_value. m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 30 linesCellReg/ load_multiple_sessions.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 21 linesCellReg/ load_single_session.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 55 linesCellReg/ normalize_spatial_footpr ints.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 39 linesCellReg/ plot_RGB_overlay.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 357 linesCellReg/ plot_alignment_results.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 107 linesCellReg/ plot_all_registered_proj ections.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 41 linesCellReg/ plot_all_sessions_projec tions.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 194 linesCellReg/ plot_cell_scores.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 200 linesCellReg/ plot_estimated_registrat ion_accuracy.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 71 linesCellReg/ plot_initial_registratio n.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 127 linesCellReg/ plot_models.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 19 linesCellReg/ plot_single_session_proj ections.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 67 linesCellReg/ plot_x_y_displacements.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 42 linesCellReg/ rotate_cell.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 36 linesCellReg/ rotate_image_interp.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 44 linesCellReg/ rotate_spatial_footprint .m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 142 linesCellReg/ save_log_file.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 17 linesCellReg/ transform_distance_to_si milarity.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 30 linesCellReg/ translate_projections.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 39 linesCellReg/ translate_spatial_footpr int.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 5 linesCellReg_setup.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 356 linesConor_CellRegCA1PSAM.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 467 linesConor_align_images.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 57 linesConor_cluster_cells.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 401 linesConor_plot_alignment_res ults.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 2,236 linesGUI/ CellReg.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 16 linesGUI/ msgbox_timed.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 121 linesGUI/ plot_estimated_accuracy_ GUI.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 54 linesGUI/ plot_p_same_centroid_dis tance_slider.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 54 linesGUI/ plot_p_same_spatial_corr elation_slider.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 33 linesGUI/ plot_x_y_displacements_G UI.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 16 linesGUI/ warndlg_timed.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 46 linesHelper/ format_conversion_Suite2 p_CNMF_e.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 29 linesHelper/ format_conversion_inscop ix.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 62 linesHelper/ get_spatial_footprints.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 26 linesHelper/ load_footprint_data.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 8 linesHelper/ mat_to_sparse_cell.m - Preprocessing/
CellRegConorCA1PSAM/ , MATLAB, 51 linesHelper/ s2pToCellReg.m - Preprocessing/
align_behavior.m , MATLAB, 281 lines, 1 match - Preprocessing/
align_behavior_ahmetBruk , MATLAB, 150 lineser.m - Preprocessing/
allraw2tiff.m , MATLAB, 405 lines - README.md, Text, 68 lines
Code availability
All analysis code use for preprocessing, analysis, and making figures is available on GitHub (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 96 scripts, each with its path and the digest of its content;
- 18 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- doi:10.5061/
dryad.573n5tbpp , at Dryad; found in “Data availability”
Data availability
All processed data generated in this study has been deposited in the Dryad database (10.5061/
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 3 keywords, 14 MeSH terms, 2 funders, 62 references.
Cite
This paper
Dorian, C. C., Taxidis, J., Arac, A., & Golshani, P. (2026). Rapid formation of non-spatial hippocampal representations consistent with behavioral timescale synaptic plasticity is modulated by entorhinal input. Nature communications, 17(1), 5098. https://
BibTeX
@article{dorian2026rapid
author = {Dorian, Conor C. and Taxidis, Jiannis and Arac, Ahmet and Golshani, Peyman},
title = {{Rapid formation of non-spatial hippocampal representations consistent with behavioral timescale synaptic plasticity is modulated by entorhinal input}},
journal = {Nature communications},
year = {2026},
month = apr,
volume = {17},
number = {1},
pages = {5098},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {41963333},
pmcid = {PMC13247236}
}
RIS
TY - JOUR
AU - Dorian, Conor C.
AU - Taxidis, Jiannis
AU - Arac, Ahmet
AU - Golshani, Peyman
TI - Rapid formation of non-spatial hippocampal representations consistent with behavioral timescale synaptic plasticity is modulated by entorhinal input
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 5098
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Rapid formation of non-spatial hippocampal representations consistent with behavioral timescale synaptic plasticity is modulated by entorhinal input",
"container-title": "Nature communications",
"author": [
{
"family": "Dorian",
"given": "Conor C."
},
{
"family": "Taxidis",
"given": "Jiannis"
},
{
"family": "Arac",
"given": "Ahmet"
},
{
"family": "Golshani",
"given": "Peyman"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "5098",
"DOI": "10.1038/
"PMID": "41963333",
"PMCID": "PMC13247236",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
10
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1523/jneurosci.1540-25.2026 [code]
- Dendritic Inhibition Terminates Plateau Potentials in CA1 Pyramidal Neurons.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: mouse, 10 references
- [2] doi:10.1016/j.celrep.2026.117793 [code]
- Clustered inputs engage dendritic nonlinearities and calcium signaling to support efficient place-field formation in CA1 pyramidal neurons.Journal: Cell reportsIn common: 9 references
- [3] doi:10.1038/s41467-026-75492-w [code]
- Place and behavioral modulation of hippocampal neurons during immobility.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, mouse, 8 references
- [4] doi:10.7554/elife.108352 [code]
- Analysis of dendritic input currents during place field dynamics.Journal: eLifeIn common: 8 references
- [5] doi:10.1016/j.celrep.2026.117646 [code]
- Medial entorhinal-hippocampal desynchronization parallels the emergence of memory impairment in a mouse model of Alzheimer's disease pathology.Journal: Cell reportsIn common: Optimization Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 5 references
- [6] doi:10.1038/s41467-026-74834-y [code]
- Voltage imaging of CA1 pyramidal cells and SST+ interneurons reveals stability and plasticity mechanisms of spatial firing.Journal: Nature communicationsIn common: mouse, 7 references
- [7] doi:10.1523/jneurosci.2001-25.2026 [code]
- Dynamics of Dentate Gyrus Place Cells and Dentate Spikes during Spatial and Nonspatial Changes in Environments.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: Optimization Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, 3 references
- [8] doi:10.1038/s41467-026-70289-3 [code]
- Directional dynamics in the entorhinal cortex of male mice driven by behavioral constraints.Journal: Nature communicationsIn common: Optimization Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 3 references
- [9] doi:10.1038/s41586-026-10537-0 [code]
- Sparse-to-dense coding transformation between hippocampal areas CA3 and CA1.Journal: NatureIn common: 6 references
- [10] doi:10.1038/s41467-026-77240-6
- Prefrontal-thalamic goal states organize spatially aligned hippocampal maps.Journal: Nature communicationsIn common: 6 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 96 scripts, and 18 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:d2104835ac45371e…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
