OSCR

The dentate gyrus efficiently converges LEC and MEC inputs into multimodal, highly specific and reliable environmental representations.

Code ↔ Paper

7 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 7 matches · 2 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Quantification and statistical analysis › Speed modulation ↔ speedcells.m, the whole file · a weak match · score 0.84 · speed score, correlation coefficient, negatively speed, positively speed, Speed information, class · Report a mismatch
  2. [2] § Results › Running speed information conveyed by MEC inputs is sparsely represented in GCs ↔ speedcells.m, the whole file · a weak match · score 0.79 · Speed scores, speed information, correlation coefficient, negative speed, positively speed, Classifying · Report a mismatch
  3. [3] § Methods › Quantification and statistical analysis › Calcium imaging data processing and ROI extraction ↔ suite2p_workflow_2025.m, lines 27 to 84 · score 0.64 · transient detection, fluorescence trace, noise, speed, raw, window · Report a mismatch
  4. [4] § Methods › Quantification and statistical analysis › Calcium imaging data processing and ROI extraction ↔ significant_events3.m, lines 92 to 154 · score 0.62 · standard deviation, fluorescence trace, subtracting, window, baseline, transients · Report a mismatch
  5. [5] § Methods › Quantification and statistical analysis › Activity differences and spatial information ↔ spatial_info_bootstrap3.m, lines 58 to 99 · score 0.61 · firing rate, linear track, spent, bits, fraction, location · Report a mismatch
  6. [6] § Methods › Quantification and statistical analysis › Calcium imaging data processing and ROI extraction ↔ suite2p_workflow_2025.m, lines 242 to 280 · score 0.57 · manually curated, suite2p, calcium, cells · Report a mismatch
  7. [7] § Results › Multiday axonal recordings of LEC and MEC projections to the DG in familiar and novel virtual environments ↔ suite2p_workflow_2025.m, lines 242 to 280 · score 0.52 · manually curated, suite2p, licked, reward, calcium, cells · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 407 lines · 21 KB · CC-BY-4.0 · 3 matches

  1. %% Reminder ---------------------------------------------------------------
  2. % 1. update Fall.mat in GUI (version 0.6.14)
  3. % 2. load Fall.mat into workspace (update 25.04.22: now automatic)
  4. % 3. give pathname the folder containing .sbx, .mat and .ephys data
  5. % 4. give saving name and other parameters in User setting parameters Section
  6. % 5. user input dialogue for entering categories of each measurement
  7. % Note: this main script will call the functions:
  8. % - get_behaviourdata5.m
  9. % which will call remove_50Hz_v2.m for lick detection
  10. % - movingmask3.m
  11. % - normtobaseline3.m
  12. % - discretize2.m
  13. % - significant_events3.m (use transientmask.m and transientmask2.m)
  14. % - transientrates2.m
  15. % - spatial_info_bootstrap3.m (use shuffle2.m)
  16. % - placefields2.m (use place_field_dombeck.m and shuffle2.m)
  17. % - spatial_corr3.m (use findcells.m)
  18. % =========================================================================
  19. %% User setting parameters
  20. % addpath('calcium','behavior','neuron') % add path of sub-folders containing the functions used
  21. % load(fullfile('D:\Scanbox\Test1','Fall.mat')) % load Fall.mat from suite2p output
  22. %%% set datapath (the folder containing .sbx, .mat and .ephys data) %%%
  23. datapath = pwd; % current folder
  24. suite2path = pwd; % current folder
  25. % suite2path = 'Z:\2-PhotonData\AK\longtermRec\Ent_6778\DG\240222_to_240224_Ent_6778_DG_data'; % specific folder
  26. %%% load Fall.mat automatically %%%
  27. dir2process = strcat(suite2path, '\suite2p\combined'); % Folder of Fall.mat if multi-plane
  28. if exist(dir2process, 'dir') % check if the folder exists
  29. cd(dir2process); % go in there
  30. load('Fall.mat'); % load Fall.mat
  31. else
  32. dir2process = strcat(suite2path, '\suite2p\plane0'); % Folder of Fall.mat if single-plane
  33. cd(dir2process); % go in there
  34. load('Fall.mat'); % load Fall.mat
  35. end
  36. cd(datapath); % go back to the main folder
  37. h5_path = ''; % optional - the folder containing .h5 data (input suite2p)
  38. saving_name = 'LEC2DG_5744_230515-19_suite2p_workflow_tc_Boutons_nsigma_19_FneuFac_04_spacorr3'; % save dataset under <datapath>/<saving_name>.mat
  39. Minspeed = 0.05; % minimum speed defined as "moving" (unit: m/s; default = 0.05)
  40. Bins = 0:0.025:2; % for use with extractYTrackBoundaries & rescaleYBinning
  41. % Bins = 0.098:0.02275:1.918; % bin EDGES used for calculating dFoY and place fields %v2(>231127)
  42. % Bins = 0.05:0.025:2.05; % bin EDGES used for calculating dFoY and place fields %v1(<231127)
  43. include_lick = 1; % 1 true | 0 false
  44. include_eye = 0; % 1 true | 0 false
  45. compute_data = 1; % 1 to collect fluorescence traces and behaviour data
  46. compute_stat = 1; % 1 to perform statistical analysis
  47. compute_spatial = 1; % 1 to perform place fields analysis
  48. filter_option = 1; % 1 true | 0 false
  49. Fneu_scaleFac = 0.4; % set to 0 if only Raw data [F_raw - Fneu_scaleFac * F_neuropil]
  50. param_data = struct(... % For dFoT normalization
  51. 'percentile',8,... % substracting the percentile value of dFoT to remove the slow drift of baseline (e.g. 8)
  52. 'driftdur',20,... % drift duration (s), the window in which the percentile value is evaluated
  53. 'nsigma',1.9,... % excluding the above [nsigma] events in dFoT trace to recursively compute the baseline mean and sigma (default = 2.3)
  54. ... % For behavioural data (speed)
  55. 'fc',1,... % cut-off frequency (Hz) of low-pass filter (remove fast oscillation due to in- and out-of-plane motion artifact)
  56. 'nspeed',5,... % the number of datapoints (i.e. number of frames) used to average out the position vector (to reduce speed osillation noise)
  57. 'minspeed',Minspeed,...
  58. 'bins',Bins,...
  59. 'Fneu_scaleFac',Fneu_scaleFac,...
  60. 'ephysrate',1000);
  61. param_stat = struct(... % For event detection
  62. 'nsigma',[3,4,5],... % [nsigma] range in which the <5% false positive rate will be searched
  63. 'mindur',0.2,... % the min of transient width (s) in which the <5% false positive rate will be searched (default = 0.3)
  64. 'maxdur',1,... % the max of transient width (s) in which the <5% false positive rate will be searched
  65. 'cutoff',0.05,... % the threshold of <[cutoff] false positive rate
  66. 'GaussFiltFreq',1,... % applying Gaussian filter before transient detection (0 for no filter, 1 for Gaussian filter...)
  67. ... % For spatial information
  68. 'nshuffle',1000,... % the number of shuffle times
  69. 'ywindow',50,... % the number of datapoints in which the dFoT trace is broken in the shuffling process (default = 50)
  70. ... % For place fields ('nshuffle' and 'ywindow' are also used)
  71. 'method','Dombeck',... % 'Dombeck' or 'Significance'
  72. 'movingAverage',true,... % smooth the dFoY trace with the moving average filter of span 3
  73. 'Foutfield',0.25,... % fraction of dFoY used to estimate its baseline
  74. 'Finfield',0.25,... % fraction of max(dFoY)-baseline above which potential place fields are identified
  75. 'minwidth',3,... % min width (number of bins) to be considered as potential place fields
  76. 'Ftransient',0.2,... % fraction of transients that dFoT must be present in the place fields
  77. 'dFrelThresh',7,... % the mean in-field dFoY must be more than [dFrelThresh] times the mean out-of-field dFoY
  78. 'dFabsThresh',0.0,... % ??
  79. ... % For place field correlations
  80. 'sigmaGauss',1,... % applying Gaussian filter before correlation (0 for no filter, 1 for Gaussian filter...)
  81. 'active',1/60,... % active cell defined as >1 transient/min
  82. 'pSI',0.05); % singificance of spatial information>chance
  83. % =========================================================================
  84. %% Compute data (calcium signal and behavior data)
  85. if compute_data
  86. % ---------- Read imaging info --------------------------------------------
  87. % Find all .sbx data (files: structure array with fields: name, bytes, date...)
  88. files = dir(fullfile(datapath,'*.sbx'));
  89. % call extractYTrackBoundaries to resample the Bins (from 0 to 2)
  90. [startBinVolt,stopBinVolt,freezScreenVstep] = extractYTrackBoundaries(files, 0, Bins);
  91. % Extract global parameter from the first file, assumed identical for all
  92. fname = strrep(files(1).name,'.sbx','.mat');
  93. load(fullfile(datapath,fname),'info'); % load 'info'
  94. if ~info.volscan && isempty(info.otparam)
  95. nplanes = 1; % single plane
  96. else
  97. nplanes = info.otparam(3); % number of imaging planes
  98. end
  99. switch info.channels
  100. case 1 % both PMT0 & PMT1
  101. nchannels = 2;
  102. case 2 % only PMT 0
  103. nchannels = 1;
  104. case 3 % only PMT 1
  105. nchannels = 1;
  106. end
  107. % ---------- Assign categories --------------------------------------------
  108. categories = zeros(1,length(files)); % store category of each file
  109. definput = cell(1,length(files)); % default input: initial category
  110. for j = 1:length(files)
  111. fname = strrep(files(j).name,'.sbx','.mat');
  112. load(fullfile(datapath,fname)); % load 'info' and 'category'
  113. if ~exist('category')
  114. definput{j} = '0';
  115. else
  116. definput{j} = num2str(category);
  117. end
  118. end
  119. opts.Resize = 'on';
  120. a = fix(length(files)/15); % divide the total number into multiple of 10
  121. b = rem(length(files),15); % the remainer
  122. for s = 1:a % multiple of 15
  123. answer = inputdlg({files(15*(s-1)+1:15*s).name},'Category',[1 40],definput(15*(s-1)+1:15*s),opts); % create dialog box to gather user input
  124. categories(15*(s-1)+1:15*s) = cellfun(@str2num, answer); % array of category of all measurement
  125. end
  126. if b ~= 0 % the remainer
  127. answer = inputdlg({files(15*a+1:15*a+b).name},'Category',[1 40],definput(15*a+1:15*a+b),opts);
  128. categories(15*a+1:15*a+b) = cellfun(@str2num, answer);
  129. end
  130. categories = uint16(categories); % store categories as 16-bit unsigned integers
  131. % ---------- Calculate nframes per file -----------------------------------
  132. nframes = zeros(1,length(files)); % frame number per imaging file
  133. if nplanes > 1
  134. nframes_z = zeros(nplanes,length(files)); % frame number per plane (different z planes will be counted in respective rows)
  135. end
  136. framerates = zeros(1,length(files)); % number of imaging frames per plane (sec^-1)
  137. catrun_count = zeros(1,length(files),'uint16'); % count how many runs have been stored in this category
  138. % loop over files
  139. for j = 1:length(files)
  140. fname = strrep(files(j).name,'.sbx','.mat');
  141. load(fullfile(datapath,fname),'info'); % load 'info'
  142. framerates(j) = info.resfreq*(2-info.scanmode)/info.config.lines/nplanes; % scanmode=0 bidirection; scanmode=1 unidirection
  143. category = categories(j);
  144. catrun_count(j) = uint16(1 + sum(categories(1:j-1)==categories(j)));
  145. % calculate nframes per file with the following priviledge order:
  146. % 1 - output of new version suite2p (version>0.7? that takes sbx directly)
  147. % 2 - h5_path used prior suite2p if still exist
  148. % 3 - calculate from sbx size and check for data earlier or later than 2020/03/18
  149. if isfield(ops,'nframes_per_folder') % not 'frames_per_file' ??
  150. nframes(j) = ops.nframes_per_folder(j)/nchannels; % ops.nframes_per_folder divided by info.nchan (ops.nchannels) ?? check suite2p code
  151. nframes_z(:,j) = repmat(nframes(j),[nplanes,1]); % incomplete stack (remainder of division by nplanes) is removed
  152. else % old suite2p
  153. if ~isempty(h5_path)
  154. runh5info = h5info(fullfile(h5_path,[fname,'.h5'],'/data'));
  155. max_idx = runh5info.Dataspace.Size(3)/nchannels;
  156. else
  157. max_idx = files(j).bytes/(info.sz(1)*info.sz(2))/nchannels/2 - 1; % !! in scanbox convention, index begins with 0, see sbxread.m !!
  158. if files(j).date > datetime(2020,03,27)
  159. max_idx = max_idx + 1; % after 2020/03/27 correction of the missing frame...
  160. end
  161. end
  162. if nplanes == 1
  163. nframes(j) = max_idx;
  164. else
  165. nframes(j) = floor(max_idx/nplanes); % round down integer in case microscope miss end frames for nplanes>1
  166. nframes_z(:,j) = repmat(nframes(j),[nplanes,1]); % store actual frame numbers per imaging plane
  167. for i = 1:rem(max_idx, nplanes)
  168. nframes_z(i,j) = nframes_z(i,j) + 1; % remainding frames are distributed to plane z0, z1,... that old h5 -> suite2p takes in the remainder...
  169. end
  170. end
  171. end
  172. % save category and updated info
  173. % save(strrep(files(j).name,'.sbx','.mat'), 'category', '-append');
  174. save(fullfile(datapath,fname),'category','info');
  175. end
  176. % ---------- Concatenated frame numbers -----------------------------------
  177. concat_nframes = [0,cumsum(nframes)];
  178. if nplanes > 1
  179. concat_nframes_z = cumsum(nframes_z,2);
  180. concat_nframes_z = [zeros(nplanes,1),concat_nframes_z];
  181. end
  182. fprintf('Categories and frame numbers done\n')
  183. % =========================================================================
  184. % ------ Collect metadata (imaging parameters and behaviour data) ---------
  185. % Initialize dataset structure
  186. dataset = struct('metadata',struct('categories',{cell(1,length(unique(categories)))}),...
  187. 'cells',[],...
  188. 'param_data',param_data);
  189. fprintf('Process dataset metadata...\n')
  190. %% loop over files
  191. for j = 1:length(files)
  192. fname = strrep(files(j).name,'.sbx','');
  193. % sort the category
  194. thiscat = categories(j);
  195. catrun = catrun_count(j);
  196. tt = 1/framerates(j);
  197. dataset.metadata.categories{thiscat}.filename{catrun} = fname;
  198. dataset.metadata.categories{thiscat}.acquisition_rate{catrun} = framerates(j);
  199. dataset.metadata.categories{thiscat}.nframes{catrun} = nframes(j); % frame number
  200. dataset.metadata.categories{thiscat}.frameT{catrun} = 1:nframes(j); % frame indices
  201. dataset.metadata.categories{thiscat}.ft{catrun} = (1:nframes(j))*tt; % time (sec)
  202. dataset.metadata.categories{thiscat}.elapsed_ft{catrun} = (concat_nframes(j)+1):concat_nframes(j+1); % concatenated frame indices
  203. % ---------- Extract behavioural data ---------------------------------
  204. METADATA = get_behaviourdata5(fullfile(datapath,fname),nplanes,nframes(j),...
  205. 'includeLick', 1, 'includeReward', 1, 'includeSound', 1,'lick_TTLsignal',1,... % lick, reward, sound
  206. 'includeAirCH3', 1,'includeAirCH4', 1,... % air puff, channels 3 and 4
  207. 'includeEye',0,'EyeAreaMeth','brightPixlSum','EyeAreaSmooth',0,'overwriteEyeArea',0); % pupil size
  208. % location/movement related
  209. dataset.metadata.categories{thiscat}.x{catrun} = METADATA(2,:);
  210. dataset.metadata.categories{thiscat}.yRaw{catrun} = METADATA(3,:);
  211. % rescaled Y tracks
  212. dataset.metadata.categories{thiscat}.y{catrun} = rescaleYBinning(METADATA(3,:),Bins,stopBinVolt,startBinVolt,freezScreenVstep) ;
  213. % yRaw vs y - plot every 25th run (for testing / check)
  214. if mod(j,25)==0
  215. figure; hold on;
  216. title(num2str(files(1).name(1:11)),j,'interpreter','none');
  217. plot(dataset.metadata.categories{thiscat}.yRaw{catrun},'r'); % raw Y values, in red
  218. plot(dataset.metadata.categories{thiscat}.y{catrun},'g'); % new/corrected Y values, in green
  219. drawnow
  220. end
  221. dataset.metadata.categories{thiscat}.moving{catrun} = ...
  222. movingmask3(METADATA(3,:), framerates(j), param_data.nspeed, Minspeed); % calculating the speed from the gradient of the position vector y averaged over [nspeed] frames, mask for speed below Minspeed
  223. % licks and pupil area
  224. dataset.metadata.categories{thiscat}.licks{catrun} = METADATA(4,:); % NaN if not included
  225. dataset.metadata.categories{thiscat}.pupil_area{catrun} = METADATA(5,:); % NaN if not included
  226. % Reward, Sound and airpuff
  227. dataset.metadata.categories{thiscat}.reward{catrun} = METADATA(6,:); % NaN if not included
  228. dataset.metadata.categories{thiscat}.sound{catrun} = METADATA(7,:); % NaN if not included
  229. dataset.metadata.categories{thiscat}.airCH4{catrun} = METADATA(8,:); % NaN if not included
  230. dataset.metadata.categories{thiscat}.airCH3{catrun} = METADATA(9,:); % NaN if not included
  231. end
  232. fprintf('Completed dataset metadata\n')
  233. % =========================================================================
  234. % -------- Extract calcium signals from suite2p output Fall.mat -----------
  235. cell_ID = find(iscell(:,1)==1); % manually curated cells/boutons
  236. cell_stat = stat(cell_ID); % keep only iscell stat (to be broadcast in parfor loop)
  237. cell_array = cell(1,length(cell_ID)); % initialize a cell array (of structures)
  238. % Define low-pass filter for fluorescence traces corrupted by fast motion
  239. fs = framerates(1);
  240. fc = param_data.fc;
  241. [b,a] = butter(6, fc/(fs/2)); % 6th-order low-pass Butterworth filter with normalized cutoff frequency fc/(fs/2)
  242. fprintf('Process dataset cells...\n')
  243. % loop over cells
  244. parfor k = 1:length(cell_ID)
  245. cell_array{k}.ID = cell_ID(k); % store cell ID
  246. cell_array{k}.stat = cell_stat{k}; % store statistics of each cell
  247. if isfield(cell_stat{k},'iplane')
  248. cell_array{k}.image_plane = cell_stat{k}.iplane; % multi-plane imaging !! iplane index begins with 0 !!
  249. else
  250. cell_array{k}.image_plane = 1; % single-plane imaging
  251. end
  252. % ---------- loop over imaging files ----------------------------------
  253. for j = 1:length(files)
  254. % identify the category and how many runs have been proceeded in this category
  255. thiscat = categories(j);
  256. catrun = catrun_count(j);
  257. % Reconstruct the fluorescence traces
  258. % separate case of cell plane for multi-plane imaging
  259. if nplanes == 1
  260. F_raw = F(cell_ID(k), (concat_nframes(j)+1):concat_nframes(j+1));
  261. F_neu = Fneu(cell_ID(k), (concat_nframes(j)+1):concat_nframes(j+1));
  262. else
  263. F_raw = F(cell_ID(k), concat_nframes_z(cell_stat{k}.iplane+1,j)+1:...
  264. concat_nframes_z(cell_stat{k}.iplane+1,j+1) ); % !! cell plane index start with 0
  265. F_neu = Fneu(cell_ID(k), concat_nframes_z(cell_stat{k}.iplane+1,j)+1:...
  266. concat_nframes_z(cell_stat{k}.iplane+1,j+1) ); % !!cell plane index start with 0
  267. for i = 1:nplanes
  268. if i == (cell_stat{k}.iplane+1) && nframes_z(i,j)>nframes(j)
  269. F_raw = F_raw(1:end-1); % remove last element in case multi-plane of incomplete stack
  270. F_neu = F_neu(1:end-1);
  271. break
  272. end
  273. end
  274. end
  275. % Apply neuropile substraction
  276. F2bsldetect = F_raw - (F_neu.* Fneu_scaleFac);
  277. % [dFoT,F0,SIGMA] = normtobaseline2(F_raw, 2, 5); % calculate the baseline based on eliminating the 2*sigma events above the baseline with a repetition of 5 times
  278. [dFoT,F0,SIGMA] = normtobaseline3(F2bsldetect, param_data.percentile,....
  279. param_data.driftdur*framerates(1),...
  280. param_data.nsigma);
  281. % apply filter
  282. if filter_option
  283. dFoT = filtfilt(b,a,double(dFoT));
  284. end
  285. % calculate the baseline based on the [percentile] value in a window of [driftdur] sec and by excluding the [nsigma] events
  286. cell_array{k}.categories{thiscat}.dFoT{catrun} = dFoT;
  287. cell_array{k}.categories{thiscat}.F0{catrun} = F0;
  288. cell_array{k}.categories{thiscat}.baselineSD{catrun} = SIGMA;
  289. cell_array{k}.categories{thiscat}.spikes{catrun} = ...
  290. spks(cell_ID(k),(concat_nframes(j)+1):concat_nframes(j+1));
  291. cell_array{k}.categories{thiscat}.dFoY{catrun} = ...
  292. discretize2(dFoT.*dataset.metadata.categories{thiscat}.moving{catrun},...
  293. dataset.metadata.categories{thiscat}.y{catrun}, Bins);
  294. end
  295. end
  296. dataset.cells = cell_array;
  297. fprintf('Completed dataset cells\n')
  298. param_stat.FneuFac = Fneu_scaleFac;
  299. % modify saving name according to activated options
  300. % if filter_option
  301. % saving_name = [saving_name , '_filter'];
  302. % end
  303. % if Fneu_scaleFac ~=0
  304. % saving_name = [saving_name , '_nrpilSub'];
  305. % end
  306. % save dataset
  307. sizeDatasetCheck = whos('dataset');
  308. if sizeDatasetCheck.bytes>(2*10^9) % check if file size > 2Gb
  309. save(fullfile(suite2path,saving_name),'dataset','-v7.3','-nocompression'); % for big files (>2Gb)
  310. cprintf([0.1, 0.6, 0.2], 'dataset saved with following parameters: -v7.3 -nocompression');
  311. disp(' ');
  312. else
  313. save(fullfile(suite2path,saving_name),'dataset','-v7'); % for small files (<2Gb)
  314. cprintf([0.1, 0.6, 0.2], 'dataset saved with following parameters: -v7');
  315. disp(' ');
  316. end
  317. % clearvars -except dataset saving_name Minspeed Bins
  318. end
  319. % =========================================================================
  320. %% Compute statistics
  321. if compute_stat
  322. fprintf('Computing statistics...\n');
  323. saving_name2 = [saving_name,'_swf']; % swf for standard workflow
  324. data = dataset;
  325. data.param_stat = param_stat;
  326. % data = standard_workflow2(dataset);
  327. fprintf('Detecting events...\n'); % detect significant transients and recalculate dFoY using significant events
  328. data = significant_events3(data,Bins,...
  329. 'nsigma',param_stat.nsigma,'mindur',param_stat.mindur,'maxdur',param_stat.maxdur,...
  330. 'cutoff',param_stat.cutoff,'GaussFiltFreq',param_stat.GaussFiltFreq);
  331. fprintf('Calculating transient rates...\n');
  332. data = transientrates2(data,true); % calculate the number of transients per sec (during running)
  333. if compute_spatial == 1
  334. fprintf('Calculating spatial information...\n');
  335. data = spatial_info_bootstrap3(data,Bins,param_stat.nshuffle,param_stat.ywindow);
  336. fprintf('Detecting placefields...\n');
  337. data = placefields2(data,Bins,param_stat.method,...
  338. 'movingAverage',param_stat.movingAverage,...
  339. 'Foutfield',param_stat.Foutfield,'Finfield',param_stat.Finfield,'minwidth',param_stat.minwidth,...
  340. 'Ftransient',param_stat.Ftransient,'dFrelThresh',param_stat.dFrelThresh,'dFabsThresh',0.0,...
  341. 'nshuffle',param_stat.nshuffle,'ywindow',param_stat.ywindow);
  342. fprintf('Correlating spatial information across sessions...\n');
  343. data = spatial_corr3(data,param_stat.sigmaGauss,param_stat.active,param_stat.pSI);
  344. else
  345. end
  346. % save data
  347. sizeDatasetCheck = whos('data');
  348. if sizeDatasetCheck.bytes>(2*10^9) % check if file size > 2Gb
  349. save(fullfile(suite2path,saving_name2),'data','-v7.3','-nocompression'); % for big files (>2Gb)
  350. cprintf([0.1, 0.6, 0.2], 'data saved with following parameters: -v7.3 -nocompression');
  351. disp(' ');
  352. else
  353. save(fullfile(suite2path,saving_name2),'data','-v7'); % for small files (<2Gb)
  354. cprintf([0.1, 0.6, 0.2], 'data saved with following parameters: -v7');
  355. disp(' ');
  356. end
  357. end
  358. clearvars -except data

suite2p_workflow_2025.m, under CC-BY-4.0 · at the source

Overview

  1. Institute for Physiology I, University of Freiburg, Medical Faculty,Freiburg, Germany
Institutions: University of Freiburg (Germany)
Journal: Nature neuroscience, volume 29, issue 5, pages 1166-1180
Dates: received 23 June 2025; accepted 11 February 2026; published online 27 March 2026; in print 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41593-026-02240-0 · PMID 41896306 · PMCID PMC13156041 · OpenAlex W7141591696
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: mouse (organism), systems (subfield)
Methods: Statistics, Machine learning, Connectivity, fMRI & imaging, Single-unit activity, calcium imaging
Keywords: Spatial memory, Cellular neuroscience, Hippocampus
MeSH: Dentate Gyrus*, Entorhinal Cortex*, Environment*, Animals, Male, Mice, Mice, Inbred C57BL, Neural Pathways, Neurons (* major topic)
Topic: Memory and Neural Mechanisms (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Research Council (787450); Deutsche Forschungsgemeinschaft (561281570, 537575602)
Citations: cited by 1 paper (Europe PMC); 81 references in the paper

Abstract

The entorhinal cortex–hippocampal network plays a key role in the processing, storage and retrieval of contextual information. However, how convergent multimodal information provided by the lateral and medial entorhinal cortex (LEC and MEC) is represented by granule cells (GCs), the principal cells of the dentate gyrus (DG), remains poorly understood. In this study, we employed two-photon calcium imaging of LEC and MEC projections in the DG together with GC population activity in mice navigating familiar and novel virtual environments over five consecutive days. We found that LEC inputs primarily convey olfactory information, whereas MEC inputs provide rich context-specific information to the DG. Although environmental representations rapidly emerged in LEC and MEC projections upon exposure to novel environments and remained stable over time, representations in the DG improved gradually and required repeated exposure to stabilize. Our findings suggest that the convergence of rapidly emerging, high-dimensional LEC and MEC inputs into a sparse and slowly evolving GC population code provides an energy-efficient mechanism for generating multimodal, modality-specific and context-specific representations in the DG.

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 7 matches between paragraphs and lines of code.

Zenodo 15722268

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Languages: MATLAB (24)
Size: 24 files, 24 scripts
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
24 files
At the source:

Code availability

Custom code used for analyses has been deposited at Zenodo and is publicly available as of the date of publication (10.5281/zenodo.15722268). Any additional information required to reanalyze the data reported in this paper is available from the lead contacts upon reasonable request.

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;
  • 24 scripts, each with its path and the digest of its content;
  • 7 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

No dataset and no data link were found in the paper.

Data availability

Due to the very large size of the original data reported in this paper, the original data will be shared by the lead contacts upon reasonable request.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 3 keywords, 9 MeSH terms, 2 funders, 80 references.

Cite

This paper

Cholvin, T., & Bartos, M. (2026). The dentate gyrus efficiently converges LEC and MEC inputs into multimodal, highly specific and reliable environmental representations. Nature neuroscience, 29(5), 1166-1180. https://doi.org/10.1038/s41593-026-02240-0

BibTeX

@article{cholvin2026dentate,
author = {Cholvin, Thibault and Bartos, Marlene},
title = {{The dentate gyrus efficiently converges LEC and MEC inputs into multimodal, highly specific and reliable environmental representations}},
journal = {Nature neuroscience},
year = {2026},
month = mar,
volume = {29},
number = {5},
pages = {1166--1180},
publisher = {Nature Portfolio},
issn = {1097-6256},
doi = {10.1038/s41593-026-02240-0},
url = {https://doi.org/10.1038/s41593-026-02240-0},
pmid = {41896306},
pmcid = {PMC13156041}
}

RIS

TY - JOUR
AU - Cholvin, Thibault
AU - Bartos, Marlene
TI - The dentate gyrus efficiently converges LEC and MEC inputs into multimodal, highly specific and reliable environmental representations
T2 - Nature neuroscience
J2 - Nat Neurosci
PY - 2026
DA - 2026/03/27
VL - 29
IS - 5
SP - 1166
EP - 1180
SN - 1097-6256
PB - Nature Portfolio
DO - 10.1038/s41593-026-02240-0
UR - https://doi.org/10.1038/s41593-026-02240-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41593-026-02240-0",
"type": "article-journal",
"title": "The dentate gyrus efficiently converges LEC and MEC inputs into multimodal, highly specific and reliable environmental representations",
"container-title": "Nature neuroscience",
"author": [
{
"family": "Cholvin",
"given": "Thibault"
},
{
"family": "Bartos",
"given": "Marlene"
}
],
"container-title-short": "Nat Neurosci",
"volume": "29",
"issue": "5",
"page": "1166-1180",
"DOI": "10.1038/s41593-026-02240-0",
"PMID": "41896306",
"PMCID": "PMC13156041",
"ISSN": "1097-6256",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41593-026-02240-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
27
]
]
}
}

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.1038/s41467-022-34039-5 [code]
Hemisphere-specific spatial representation by hippocampal granule cells.
Journal: Nature communications
In common: Signal Processing Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, systems, mouse, 22 references, 2 authors
[2] doi:10.1038/s41467-024-54932-5 [code]
Multiplexing of temporal and spatial information in the lateral entorhinal cortex.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, 17 references
[3] doi:10.1073/pnas.2416214122 [code]
Impaired spatial coding of the hippocampus in a dentate gyrus hypoplasia mouse model.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: mouse, 18 references
[4] doi:10.1038/s41467-024-44882-3 [code]
Subfield-specific interneuron circuits govern the hippocampal response to novelty in male mice.
Journal: Nature communications
In common: Signal Processing Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, systems, mouse, 12 references, author Marlene Bartos
[5] doi:10.1016/j.isci.2024.110361 [code]
Transformation of spatial representations along hippocampal circuits.
Journal: iScience
In common: systems, 18 references
[6] doi:10.1038/s41467-026-72453-1 [code]
The entorhinal spatial map integrates visual identity information of landmarks.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, mouse, 15 references
[7] doi:10.7554/elife.83008 [code]
Fan cells in lateral entorhinal cortex directly influence medial entorhinal cortex through synaptic connections in layer 1.
Journal: eLife
In common: mouse, 14 references
[8] doi:10.7554/elife.75391 [code]
Long-term transverse imaging of the hippocampus with glass microperiscopes.
Journal: eLife
In common: Signal Processing Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 13 references
[9] doi:10.1038/s41467-025-60841-y [code]
Predictive goal coding by dentate gyrus somatostatin-expressing interneurons in male mice.
Journal: Nature communications
In common: systems, mouse, 10 references, author Marlene Bartos
[10] doi:10.1038/s42003-026-09592-0 [code]
Sparsification and decorrelation of granule cell activity in the dentate gyrus by noradrenaline.
Journal: Communications biology
In common: systems, mouse, 13 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41593-026-02240-0.svg)](https://openscicode.org/badge/doi/10.1038/s41593-026-02240-0)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41593-026-02240-0.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41593-026-02240-0
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41593-026-02240-0"><img src="https://openscicode.org/badge/doi/10.1038/s41593-026-02240-0.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.