Protocol to build open-source Discrimin8 maze to study discrimination of reward-context associations in mice during open-field foraging.
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 · 211 lines · 6.5 KB · CC-BY-4.0
- %% Gergely Tarcsay, 2025 Ewell lab. MATLAB script to recreate learning curve and performance (Figure 1)
- close all
- clearvars -except behavior_struct
- cd("G:\Behavior only\")
- if ~exist("behavior_struct", "var")
- load BehaviorData
- behavior_struct.details.GPassed(5) =behavior_struct.details.GPassed(5)-1; % count the first day of > 70% for M99 because 2nd had behavior problems (cold room)
- end
- [N_days_d, N_mice] = size(behavior_struct.D_events);
- Performance_d = nan(N_days_d,N_mice+8, 3); % to store performance - total, ctxt A & ctxt B
- %% get Performance for discrimination
- for m = 1:N_mice
- disp(behavior_struct.details.Mouse(m))
- for d = 1:N_days_d
- event = behavior_struct.D_events{d,m};
- if isempty(event)
- break;
- end
- [TrialStart, TrialStop, ZoneTriggered, context] = ParseTrials(event);
- [Correct, Incorrect, Timeout, port, time, TrainingTrials, all_outcome] = GetTrialOutcome(event,TrialStart,TrialStop,ZoneTriggered);
- TrialType = ones(length(all_outcome),1);
- if ~isempty(TrainingTrials)
- TrialType([1; TrainingTrials(:,1)]) = 0; %1st trial is training when training trials are included in the session
- end
- Performance_d(d,m,:) = GetPerformance(TrialType, context, all_outcome);
- end
- end
- %% get performance for generalization
- [N_days_g, N_mice] = size(behavior_struct.G_events);
- Performance_g = nan(N_days_g,N_mice+8, 3); % to store performance - total, ctxt A & ctxt B
- for m = 1:N_mice
- disp(behavior_struct.details.Mouse(m))
- for d = 1:N_days_g
- event = behavior_struct.G_events{d,m};
- if isempty(event)
- break;
- end
- [TrialStart, TrialStop, ZoneTriggered, context] = ParseTrials(event);
- [Correct, Incorrect, Timeout, port, time, TrainingTrials, all_outcome] = GetTrialOutcome(event,TrialStart,TrialStop,ZoneTriggered);
- TrialType = ones(length(all_outcome),1);
- if ~isempty(TrainingTrials)
- TrialType([1; TrainingTrials(:,1)]) = 0; %1st trial is training when training trials are included in the session
- end
- Performance_g(d,m,:) = GetPerformance(TrialType, context, all_outcome);
- end
- end
- %% get performance for miniscope mice
- rootdir = strings(2,1);
- folders = strings(5,2);
- rootdir(1) = "F:\Included miniscope Mice\";
- folders(:,1) = ["\M119\" "\M120\" "\M292\" "M319\" "M210\"];
- rootdir(2) = "D:\Grouping First\";
- folders(:,2) = ["\M231\" "\M314\" "\M316\" "M318\" ""];
- nMice = [5 4];
- MiniscopeSex = ["f" "f" "f" "m" "m" "m", "f" "m" "m"];
- counter = 1;
- for r = 1:2
- for f = 1:nMice(r)
- load(strcat(rootdir(r), folders(f,r), "Performance_d.mat"))
- [days, ~,~] = size(Performance);
- Performance_d(1:days,counter+10,:) = Performance;
- clear Performance
- if exist(strcat(rootdir(r), folders(f,r), "Performance_g.mat"), "file")
- load(strcat(rootdir(r), folders(f,r), "Performance_g.mat"))
- [days, ~,~] = size(Performance);
- Performance_g(1:days,counter+10,:) = Performance;
- clear Performance
- else
- Performance_g(1:days,counter+10,:) = nan(days,3);
- end
- counter = counter +1;
- end
- end
- % plot results
- males = [find(behavior_struct.details.Sex == "m"); find(MiniscopeSex == "m")'+10];
- females = [find(behavior_struct.details.Sex == "f"); find(MiniscopeSex == "f")'+10];
- %% get when they reached 70%
- Main_Perform_D = Performance_d(:,:,1);
- Main_Perform_G = Performance_g(:,:,1);
- Discrimination_70 = nan(19,2);
- Grouping_70 = nan(19,2);
- for i = 1:19
- idx = find(Main_Perform_D(:,i) >= 70);
- Discrimination_70(i,1) = idx(1);
- Discrimination_70(i,2) = Main_Perform_D(idx(1),i);
- idx = find(Main_Perform_G(:,i) >= 70);
- if ~isempty(idx)
- Grouping_70(i,1) = idx(1);
- Grouping_70(i,2) = Main_Perform_G(idx(1),i);
- end
- end
- %% plot learning curves - separate for males and females
- figure
- tiledlayout(1,2)
- nexttile;
- hold on
- box off
- axis square
- for i = 1:length(females)
- plot(Main_Perform_D(1:Discrimination_70(females(i),1),females(i)),"o-", "MarkerSize",5, "Color","#a8cfc3")
- end
- for i = 1:length(males)
- plot(Main_Perform_D(1:Discrimination_70(males(i),1),males(i)),"o-", "MarkerSize",5, "Color","#27a37d")
- end
- ylim([0 100])
- xlim([0 11])
- nexttile;
- hold on
- box off
- axis square
- for i = 1:length(females)
- disp(i)
- if ~isnan(Grouping_70(females(i),1))
- plot(Main_Perform_G(1:Grouping_70(females(i),1),females(i)),"o-", "MarkerSize",5, "Color","#bea7d9")
- end
- end
- for i = 1:length(males)
- if ~isnan(Grouping_70(males(i),1))
- plot(Main_Perform_G(1:Grouping_70(males(i),1),males(i)),"o-", "MarkerSize",5, "Color","#854bc9")
- end
- end
- xlim([0 7])
- ylim([0 100])
- %% make violin plots for grouping and discrimination
- figure
- tiledlayout(1,2)
- Y_D = nan(10,2);
- Y_G = nan(10,2);
- Y_D(1:length(females),1) = Discrimination_70(females,2);
- Y_D(1:length(males),2) = Discrimination_70(males,2);
- nexttile;
- violin(Y_D, 'x', [1 2], 'facecolor', [.85 .85 .85; 0 0 0; .85 .85 .85; 0 0 0], 'edgecolor', 'k', 'mc', [], 'medc', [])
- box off
- hold on
- plot(repmat(1,10,1), Y_D(:,1), 'o', 'MarkerEdgeColor', [.5 .5 .5], 'MarkerFaceColor',[.5 .5 .5], 'MarkerSize', 3)
- plot(repmat(2,10,1), Y_D(:,2), 'o', 'MarkerEdgeColor', [.5 .5 .5].*0, 'MarkerFaceColor',[.5 .5 .5].*0, 'MarkerSize', 3)
- xlim([0.5 2.5])
- ylim([40 120])
- yticks(10:20:90)
- ylabel("Performance (%)")
- box off
- Y_G(1:length(females),1) = Grouping_70(females,2);
- Y_G(1:length(males),2) = Grouping_70(males,2);
- nexttile;
- violin(Y_G, 'x', [1 2], 'facecolor', [.85 .85 .85; 0 0 0; .85 .85 .85; 0 0 0], 'edgecolor', 'k', 'mc', [], 'medc', [])
- box off
- hold on
- plot(repmat(1,10,1), Y_G(:,1), 'o', 'MarkerEdgeColor', [.5 .5 .5], 'MarkerFaceColor',[.5 .5 .5], 'MarkerSize', 3)
- plot(repmat(2,10,1), Y_G(:,2), 'o', 'MarkerEdgeColor', [.5 .5 .5].*0, 'MarkerFaceColor',[.5 .5 .5].*0, 'MarkerSize', 3)
- xlim([0.5 2.5])
- ylim([40 120])
- yticks(10:20:90)
- ylabel("Performance (%)")
- box off
- %% statistics
- [~,p_D, ci_D, stats_D] = ttest2(Y_D(:,1), Y_D(:,2));
- [~,p_G,ci_G,stats_G] = ttest2(Y_G(:,1), Y_G(:,2));
- %% plot days to reach criteria
- Y_D = nan(10,2);
- Y_G = nan(10,2);
- Y_D(1:length(females),1) = Discrimination_70(females,1);
- Y_D(1:length(males),2) = Discrimination_70(males,1);
- Y_G(1:length(females),1) = Grouping_70(females,1);
- Y_G(1:length(males),2) = Grouping_70(males,1);
- figure
- tiledlayout(1,2)
- nexttile;
- boxplot(Y_D)
- box off
- ylim([0 12])
- nexttile;
- boxplot(Y_G)
- box off
- ylim([0 12])
BehaviorLearning.m, under CC-BY-4.0 · at the source
Overview
- Anatomy & Neurobiology, School of Medicine, University of California, Irvine, Irvine, CA, USA
- Neurobiology of Brain and Behavior, Charlie Dunlop School of Biological Sciences, University of California, Irvine, Irvine, CA, USA
- Center for Learning and Memory, University of California, Irvine, Irvine, CA, USA
Abstract
The hippocampus is known to process context-specific memories. We provide a protocol for studying context discrimination in mice utilizing the open-source Discrimin8 maze. We describe the steps for building the maze and using custom-written codes implementing the task. Finally, instructions are provided to train mice on the task. This protocol implements a low-cost, automated maze allowing for investigation of context discrimination in freely moving mice.
For complete details on the use and execution of this protocol, please refer to Tarcsay et al.1
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above.
Zenodo 17488388
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
115 files
- Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 211 linesBehaviorLearning.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 56 linesCreateStructBehavior.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 55 linesCreateStructLesion.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 8 linesFixEventFile.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 68 linesGetHPCVolume.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 27 linesGetPerformance.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 158 linesGetTrialErrorsLesion.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 72 linesGetTrialOutcome.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 45 linesGetWrongChoice.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 81 linesLesionPerformance.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 73 linesParseTrials.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 34 linesPreProcessPathData.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 43 linesReadData.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, not shown herebehavior_Notebook.mlx - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 41 lineschi2cont.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 296 linesnatsortfiles.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 266 linesviolinPlot/ violin.m - Discrimination 2025 CodeBase/
Context decoder/ , MATLAB, not shown hereREBUTTAL_standalone_ANNO TATED_runrest_fit_decode rs.mlx - Discrimination 2025 CodeBase/
Context decoder/ , MATLAB, 56 linesReview_Run_v_Rest.m - Discrimination 2025 CodeBase/
Context decoder/ , MATLAB, not shown herestandalone_ANNOTATED_run rest_fit_decoders.mlx - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 13 linesGetHDCells/ BinHDir.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 14 linesGetHDCells/ GetEventTime.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 41 linesGetHDCells/ GetHDCells.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 76 linesGetHDCells/ GetHeadingDirection.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 44 linesGetHDCells/ GetReferencePoint.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 38 linesGetHDCells/ GetRewardLocation.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 32 linesGetHDCells/ GetSplittedTuningCurve.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 13 linesGetHDCells/ GetVectorRemap.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 29 linesGetHDCells/ Get_HDirTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 10 linesGetHDCells/ HDir_Occupancy.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 54 linesGetHDCells/ ReconstructionAnalysis_S arel2017.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 17 linesGetHDCells/ ShuffleCaEvents.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 16 linesGetHDCells/ ShuffleHD.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 16 linesGetHDCells/ TestSignificantRV.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 97 linesGetHDCells/ main_getHDCells.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, not shown hereHeadingDirection_Noteboo k.mlx - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 45 linesVectorRemapping/ AnalyzeFieldHDCPC.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 7 linesVectorRemapping/ CheckOrthogonality.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 13 linesVectorRemapping/ GetAngularDifference.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 22 linesVectorRemapping/ GetHDSpatialRewardTuning .m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 42 linesVectorRemapping/ GetLightTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 9 linesVectorRemapping/ GetMeanRateHDC.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 8 linesVectorRemapping/ GetPVC_HD.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 37 linesVectorRemapping/ GetRewardTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 14 linesVectorRemapping/ GetTuningBin.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 40 linesVectorRemapping/ GetTuningComposition.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 26 linesVectorRemapping/ GetTuningStrength.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 18 linesVectorRemapping/ GetWhichReward.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 3 linesVectorRemapping/ LightTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 85 linesVectorRemapping/ PlotTuningCurves.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 59 linesVectorRemapping/ PlotTuningCurves_old.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 40 linesVectorRemapping/ SaveTuningExamples.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 106 linesVectorRemapping/ WrapVectorRemap.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 135 linesVectorRemapping/ WrapVectorRemap2.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 133 linesVectorRemapping/ WrapVectorRemap3_FINAL.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 521 linesVectorRemapping/ main_vectorRemap.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 242 linesVectorRemapping/ main_vectorRemap2.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 352 linesVectorRemapping/ main_vectorRemap3_FINAL. m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 51 linesApplyMask.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 46 linesCountFieldEvents.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 9 linesGetFiringPref.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 18 linesGetROS_Dist.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 17 linesGetROS_NEvent.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 8 linesGetRateOverlap.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 29 linesGetRewDistance.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 16 linesGetRewLocation.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 81 linesMakeFieldTable.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 43 linesMismatch analysis/ CountFieldEvents_MisMatc h.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 23 linesMismatch analysis/ CountMM.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 14 linesMismatch analysis/ GetBinnedPrefProb.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 19 linesMismatch analysis/ GetMisMatchMatrix.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 20 linesMismatch analysis/ GetProbsPorts.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 110 linesMismatch analysis/ MakeMismatchTable.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 20 linesMismatch analysis/ WrapMisMatch.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 4 linesMismatchStatistics.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 31 linesPlaceFieldGUI/ CheckConnectivity.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 108 linesPlaceFieldGUI/ ClusterFields.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 22 linesPlaceFieldGUI/ GetClusterGMM.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 19 linesPlaceFieldGUI/ GetClusterKMeans.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 48 linesPlaceFieldGUI/ GetFieldBins.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 23 linesPlaceFieldGUI/ GetFieldPeaks.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 38 linesPlaceFieldGUI/ PlotFieldClusters.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 31 linesPlaceFieldGUI/ WrapFieldClustering.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 239 linesPlaceFieldGUI/ peaks2.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, not shown hereRateRemapping_Notebook.m lx - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 88 linesWrapGetMapsDistance.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 81 linesWrapRateOverlap.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 660 linesmain_rateOverlap.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 58 linesCAEvents/ AssignFramesToStates.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 29 linesCAEvents/ AssignFramesToStates_RF. m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 15 linesCAEvents/ BinPosition.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 31 linesCAEvents/ DetectDrift.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 51 linesCAEvents/ EventsExclusionStatistic s.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 44 linesCAEvents/ GetCaActivity.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 13 linesCAEvents/ ReadNCData.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 29 linesCAEvents/ SaveDriftExamples.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 46 linesCAEvents/ SaveMapExamples.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 89 linesCAEvents/ main_getCaEvents.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 15 linesSpatialRemapping/ GetPV.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 41 linesSpatialRemapping/ SpatialInfo.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 21 linesSpatialRemapping/ SubSamplePopulation.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 73 linesSpatialRemapping/ Wrap_Remap_Spatial.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 42 linesSpatialRemapping/ Wrap_SI.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 58 linesSpatialRemapping/ main_CreateInput_Get_SI. m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 354 linesSpatialRemapping/ main_remap.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, not shown hereSpatialRemapping_Noteboo k.mlx - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 13 linesStabilityAnalysis/ GetPearsons.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 70 linesStabilityAnalysis/ GetPlaceCells.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 21 linesStabilityAnalysis/ GetSI_Score.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 40 linesStabilityAnalysis/ MakeRateMap.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 60 linesStabilityAnalysis/ SaveExamples.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 37 linesStabilityAnalysis/ SplitSession.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 129 linesStabilityAnalysis/ main_StabilityAnalysis.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 26 linesStabilityAnalysis/ nancorr.m - README.md, Text, 1 line
Zenodo 17488387
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
115 files
- Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 211 linesBehaviorLearning.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 56 linesCreateStructBehavior.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 55 linesCreateStructLesion.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 8 linesFixEventFile.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 68 linesGetHPCVolume.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 27 linesGetPerformance.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 158 linesGetTrialErrorsLesion.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 72 linesGetTrialOutcome.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 45 linesGetWrongChoice.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 81 linesLesionPerformance.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 73 linesParseTrials.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 34 linesPreProcessPathData.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 43 linesReadData.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, not shown herebehavior_Notebook.mlx - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 41 lineschi2cont.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 296 linesnatsortfiles.m - Discrimination 2025 CodeBase/
Behavior_codes/ , MATLAB, 266 linesviolinPlot/ violin.m - Discrimination 2025 CodeBase/
Context decoder/ , MATLAB, not shown hereREBUTTAL_standalone_ANNO TATED_runrest_fit_decode rs.mlx - Discrimination 2025 CodeBase/
Context decoder/ , MATLAB, 56 linesReview_Run_v_Rest.m - Discrimination 2025 CodeBase/
Context decoder/ , MATLAB, not shown herestandalone_ANNOTATED_run rest_fit_decoders.mlx - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 13 linesGetHDCells/ BinHDir.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 14 linesGetHDCells/ GetEventTime.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 41 linesGetHDCells/ GetHDCells.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 76 linesGetHDCells/ GetHeadingDirection.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 44 linesGetHDCells/ GetReferencePoint.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 38 linesGetHDCells/ GetRewardLocation.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 32 linesGetHDCells/ GetSplittedTuningCurve.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 13 linesGetHDCells/ GetVectorRemap.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 29 linesGetHDCells/ Get_HDirTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 10 linesGetHDCells/ HDir_Occupancy.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 54 linesGetHDCells/ ReconstructionAnalysis_S arel2017.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 17 linesGetHDCells/ ShuffleCaEvents.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 16 linesGetHDCells/ ShuffleHD.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 16 linesGetHDCells/ TestSignificantRV.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 97 linesGetHDCells/ main_getHDCells.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, not shown hereHeadingDirection_Noteboo k.mlx - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 45 linesVectorRemapping/ AnalyzeFieldHDCPC.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 7 linesVectorRemapping/ CheckOrthogonality.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 13 linesVectorRemapping/ GetAngularDifference.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 22 linesVectorRemapping/ GetHDSpatialRewardTuning .m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 42 linesVectorRemapping/ GetLightTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 9 linesVectorRemapping/ GetMeanRateHDC.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 8 linesVectorRemapping/ GetPVC_HD.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 37 linesVectorRemapping/ GetRewardTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 14 linesVectorRemapping/ GetTuningBin.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 40 linesVectorRemapping/ GetTuningComposition.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 26 linesVectorRemapping/ GetTuningStrength.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 18 linesVectorRemapping/ GetWhichReward.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 3 linesVectorRemapping/ LightTuning.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 85 linesVectorRemapping/ PlotTuningCurves.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 59 linesVectorRemapping/ PlotTuningCurves_old.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 40 linesVectorRemapping/ SaveTuningExamples.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 106 linesVectorRemapping/ WrapVectorRemap.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 135 linesVectorRemapping/ WrapVectorRemap2.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 133 linesVectorRemapping/ WrapVectorRemap3_FINAL.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 521 linesVectorRemapping/ main_vectorRemap.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 242 linesVectorRemapping/ main_vectorRemap2.m - Discrimination 2025 CodeBase/
Heading_direction/ , MATLAB, 352 linesVectorRemapping/ main_vectorRemap3_FINAL. m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 51 linesApplyMask.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 46 linesCountFieldEvents.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 9 linesGetFiringPref.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 18 linesGetROS_Dist.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 17 linesGetROS_NEvent.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 8 linesGetRateOverlap.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 29 linesGetRewDistance.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 16 linesGetRewLocation.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 81 linesMakeFieldTable.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 43 linesMismatch analysis/ CountFieldEvents_MisMatc h.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 23 linesMismatch analysis/ CountMM.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 14 linesMismatch analysis/ GetBinnedPrefProb.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 19 linesMismatch analysis/ GetMisMatchMatrix.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 20 linesMismatch analysis/ GetProbsPorts.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 110 linesMismatch analysis/ MakeMismatchTable.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 20 linesMismatch analysis/ WrapMisMatch.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 4 linesMismatchStatistics.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 31 linesPlaceFieldGUI/ CheckConnectivity.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 108 linesPlaceFieldGUI/ ClusterFields.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 22 linesPlaceFieldGUI/ GetClusterGMM.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 19 linesPlaceFieldGUI/ GetClusterKMeans.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 48 linesPlaceFieldGUI/ GetFieldBins.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 23 linesPlaceFieldGUI/ GetFieldPeaks.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 38 linesPlaceFieldGUI/ PlotFieldClusters.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 31 linesPlaceFieldGUI/ WrapFieldClustering.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 239 linesPlaceFieldGUI/ peaks2.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, not shown hereRateRemapping_Notebook.m lx - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 88 linesWrapGetMapsDistance.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 81 linesWrapRateOverlap.m - Discrimination 2025 CodeBase/
Rate remapping/ , MATLAB, 660 linesmain_rateOverlap.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 58 linesCAEvents/ AssignFramesToStates.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 29 linesCAEvents/ AssignFramesToStates_RF. m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 15 linesCAEvents/ BinPosition.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 31 linesCAEvents/ DetectDrift.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 51 linesCAEvents/ EventsExclusionStatistic s.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 44 linesCAEvents/ GetCaActivity.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 13 linesCAEvents/ ReadNCData.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 29 linesCAEvents/ SaveDriftExamples.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 46 linesCAEvents/ SaveMapExamples.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 89 linesCAEvents/ main_getCaEvents.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 15 linesSpatialRemapping/ GetPV.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 41 linesSpatialRemapping/ SpatialInfo.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 21 linesSpatialRemapping/ SubSamplePopulation.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 73 linesSpatialRemapping/ Wrap_Remap_Spatial.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 42 linesSpatialRemapping/ Wrap_SI.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 58 linesSpatialRemapping/ main_CreateInput_Get_SI. m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 354 linesSpatialRemapping/ main_remap.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, not shown hereSpatialRemapping_Noteboo k.mlx - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 13 linesStabilityAnalysis/ GetPearsons.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 70 linesStabilityAnalysis/ GetPlaceCells.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 21 linesStabilityAnalysis/ GetSI_Score.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 40 linesStabilityAnalysis/ MakeRateMap.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 60 linesStabilityAnalysis/ SaveExamples.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 37 linesStabilityAnalysis/ SplitSession.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 129 linesStabilityAnalysis/ main_StabilityAnalysis.m - Discrimination 2025 CodeBase/
Spatial remapping/ , MATLAB, 26 linesStabilityAnalysis/ nancorr.m - README.md, Text, 1 line
The paper's code and data availability statement is in the Data section.
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:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 228 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- 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 and code availability
The code generated during this study is available on GitHub (https://
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, 6 MeSH terms, 2 funders, 12 references.
Cite
This paper
Tarcsay, G., & Ewell, L. A. (2026). Protocol to build open-source Discrimin8 maze to study discrimination of reward-context associations in mice during open-field foraging. STAR protocols, 7(1), 104415. https://
BibTeX
@article{tarcsay2026prot
author = {Tarcsay, Gergely and Ewell, Laura A},
title = {{Protocol to build open-source Discrimin8 maze to study discrimination of reward-context associations in mice during open-field foraging}},
journal = {STAR protocols},
year = {2026},
month = mar,
volume = {7},
number = {1},
pages = {104415},
publisher = {Elsevier},
issn = {2666-1667},
doi = {10.1016/
url = {https://
pmid = {41790546},
pmcid = {PMC12969727}
}
RIS
TY - JOUR
AU - Tarcsay, Gergely
AU - Ewell, Laura A
TI - Protocol to build open-source Discrimin8 maze to study discrimination of reward-context associations in mice during open-field foraging
T2 - STAR protocols
J2 - STAR Protoc
PY - 2026
DA - 2026/
VL - 7
IS - 1
SP - 104415
SN - 2666-1667
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Protocol to build open-source Discrimin8 maze to study discrimination of reward-context associations in mice during open-field foraging",
"container-title": "STAR protocols",
"author": [
{
"family": "Tarcsay",
"given": "Gergely"
},
{
"family": "Ewell",
"given": "Laura A"
}
],
"container-title-short":
"volume": "7",
"issue": "1",
"page": "104415",
"DOI": "10.1016/
"PMID": "41790546",
"PMCID": "PMC12969727",
"ISSN": "2666-1667",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
5
]
]
}
}
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.1016/j.neuron.2026.03.034 [code]
- Dentate gyrus interneurons modulate winner-take-all network dynamics in freely behaving mice.Journal: NeuronIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse, 3 references
- [2] 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: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, 2 references
- [3] doi:10.1038/s41593-026-02357-2 [code]
- Experience reorganizes content-specific memory traces in macaques.Journal: Nature neuroscienceIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, 1 reference
- [4] doi:10.1523/eneuro.0417-25.2026 [code]
- Learning and Motivation State Fluctuations from Motoric and Neurophysiologic Metrics during a Somatosensory Task in Mice.Journal: eNeuroIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, behavior only, mouse
- [5] doi:10.1038/s41467-026-76581-6 [code]
- Thalamocortical bursts encode reward contingencies and drive associative learning.Journal: Nature communicationsIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse
- [6] doi:10.1038/s41467-026-75347-4 [code]
- Sleep reveals dynamics integrating and segregating movement and stimulus representations in V1.Journal: Nature communicationsIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse
- [7] 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: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse
- [8] doi:10.1038/s41467-026-73622-y [code]
- Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making.Journal: Nature communicationsIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse
- [9] doi:10.1038/s41467-026-73106-z [code]
- Respiratory pauses highlight sleep architecture in mice.Journal: Nature communicationsIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse
- [10] doi:10.1038/s41467-026-72620-4 [code]
- Grid maps are disrupted after large-scale arena expansion and recover with experience.Journal: Nature communicationsIn common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse
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: 2 repositories of the authors' code, each at its verified commit and with its license, 228 scripts, and 0 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:1359d8b5994f52fc…
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
[.
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.
