OSCR

Hippocampal place cells map terrain geometry independently of behavior.

Code ↔ Paper

15 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 15 matches
  1. [1] § MATERIALS AND METHODS › Generalized linear model ↔ utils/PIT_over_glm.m, lines 144–221 · score 0.84 · tilt directionality, tilt stability, speed score, terrain score, notation, fitglm
  2. [2] § MATERIALS AND METHODS › Place field characteristics ↔ plotting/PIT_fig_8_v1.m, lines 81–138 · score 0.77 · Place field detection, minor axis length, major axis length, weighted centroid, regionprops, orientation
  3. [3] § MATERIALS AND METHODS › Place field characteristics ↔ plotting/PIT_sup_1sess_v1.m, lines 662–719 · score 0.77 · Place field detection, minor axis length, major axis length, weighted centroid, regionprops, orientation
  4. [4] § MATERIALS AND METHODS › Generalized linear model ↔ utils/PIT_over_glm.m, lines 59–115 · score 0.70 · Partial R2, full model, Terrain score, repetition score, predictor, linear
  5. [5] § RESULTS › Terrain acts as a geometric input to place cells ↔ GIT_audit.m, lines 1–141 · score 0.70 · movement bias, behavioral anisotropy, place field elongation, place field anisotropy, S8, slopes
  6. [6] § RESULTS › Field repetition and elongation are explained by the BVC model ↔ GIT_audit.m, lines 1–141 · score 0.67 · BVC modeled place, Modeled place fields, place field elongation, S7, S13, S6
  7. [7] § MATERIALS AND METHODS › Place field detection ↔ plotting/PIT_fig_8_v1.m, lines 81–138 · score 0.61 · contiguous regions, peak firing rate, Firing rate maps, thresholded, detection, place fields
  8. [8] § MATERIALS AND METHODS › Place field detection ↔ plotting/PIT_sup_1sess_v1.m, lines 662–719 · score 0.61 · contiguous regions, peak firing rate, Firing rate maps, thresholded, detection, place fields
  9. [9] § MATERIALS AND METHODS › Firing rate maps ↔ klustest/unused/GIT_hilltest.m, lines 109–196 · score 0.57 · Gaussian kernel, Firing rate maps, histograms, interval, smoothed, bin
  10. [10] § MATERIALS AND METHODS › Firing rate maps ↔ klustest/unused/GIT_klustest3.m, lines 109–196 · score 0.57 · Gaussian kernel, Firing rate maps, histograms, interval, smoothed, bin
  11. [11] § MATERIALS AND METHODS › Boundary vector cells ↔ utils/pitch_tuning.m, lines 29–77 · score 0.56 · receptive field, tuning curves, angle, Arena, cells
  12. [12] § MATERIALS AND METHODS › Position tracking ↔ utils/PIT_pitch_tuning.m, lines 56–102 · score 0.56 · head roll, surface normal, LED, animals
  13. [13] § MATERIALS AND METHODS › Anisotropy simulations ↔ plotting/PIT_sup_fig_9_v1.m, lines 102–230 · score 0.53 · Gaussian weight, wall angle, normpdf, anisotropy, distance, axis
  14. [14] § MATERIALS AND METHODS › Anisotropy analyses ↔ GIT_sim.m, lines 189–229 · score 0.53 · weighted centroid, axis length, Firing rate maps, histogram, smoothed, place field
  15. [15] § MATERIALS AND METHODS › Position tracking ↔ utils/PIT_pitch_tuning.m, lines 56–102 · score 0.51 · norm, rx, front, cross, LEDs, azimuth

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 · 224 lines · 7.6 KB · MIT · 2 matches

  1. % PIT_over_glm
  2. % Fig S10 for Grieves, Duvelle and Jeffery (2026) Hippocampal place cells map
  3. % terrain geometry independently of behaviour
  4. % Reviewer requested, GLM, residuals and stats
  5. %
  6. % SEE ALSO GIT_audit
  7. % HISTORY
  8. %
  9. % version 1.0.0, Release 06/02/23 Code conception
  10. % version 2.0.0, Release 15/04/26 Publication release
  11. %
  12. % NOTES
  13. %
  14. % 1. This script require the summary dataset:
  15. % https://doi.org/10.5281/zenodo.17634454
  16. %
  17. % 2. This script is intended to be run via the control function GIT_audit
  18. %
  19. % AUTHOR
  20. %
  21. % Roddy Grieves
  22. % University of Glasgow, Sir James Black Building
  23. % Neuroethology and Spatial Cognition Lab
  24. % eMail: [email hidden]
  25. % Copyright 2026 Roddy Grieves
  26. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INPUT ARGUMENTS CHECK
  27. % Create figure
  28. fig_now = figure('Units','pixels','Position',[50 50 210.*3 297.*3],'visible','on');
  29. set(gcf,'InvertHardCopy','off'); % gives the figure a grey background but means it will save white lines as white
  30. set(gcf,'color','w'); % makes the background colour white
  31. fs = [15 10];
  32. x = 0:10:3000;
  33. y = 0:10:1500;
  34. F = 0.299;
  35. wav = cos(2*pi*F*x+pi);
  36. wav = ((wav+1)./2)*450;
  37. [yy,xx] = ndgrid(y,x);
  38. zz = repmat(wav,size(xx,1),1);
  39. g = gradient(wav);
  40. gg = repmat(g,size(xx,1),1);
  41. clumaa.terrain_score = NaN(size(clumaa,1),1);
  42. for mm = 1:size(clumaa,1)
  43. if clumaa.partn(mm)~=2
  44. continue
  45. end
  46. mnow = clumaa.ratemap_surficial{mm};
  47. gnow = imresize(gg,size(mnow),"nearest");
  48. r = corr(mnow(:),gnow(:),"Type","Pearson","Rows","pairwise");
  49. clumaa.terrain_score(mm,1) = r;
  50. end
  51. clumaa = PIT_correlations(config,pidx,clumaa,posdata,0);
  52. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION BODY
  53. % Dependent variable
  54. repetition_score = clumaa.repetition_score(pidx & clumaa.partn==2,1); % repetition score, all place cells, ridges
  55. % Predictors
  56. speed_score = clumaa.speed_score(pidx & clumaa.partn==2,1); % Nx1 vector, correlation values
  57. azimuthal_directionality = clumaa.hd_3d_info(pidx & clumaa.partn==2,3); % Nx1 vector, spatial info content
  58. left_vs_right_stability = clumaa.azimuth_stability(pidx & clumaa.partn==2,1);
  59. pitch_directionality = clumaa.hd_3d_info(pidx & clumaa.partn==2,7); % Nx1 vector, spatial info content
  60. up_vs_down_stability = clumaa.pitch_stability(pidx & clumaa.partn==2,1);
  61. terrain_measure = abs(clumaa.terrain_score(pidx & clumaa.partn==2,1)); % Nx1 vector, terrain correlation
  62. % figure
  63. % scatter(repetition_score,speed_score,30,'k','filled','o');
  64. % refline
  65. % keyboard
  66. % Pack predictors and dependent variable into a table
  67. T = table(speed_score(:), azimuthal_directionality(:), left_vs_right_stability(:), pitch_directionality(:), up_vs_down_stability(:),terrain_measure(:), repetition_score(:),'VariableNames', {'speed_score','azimuthal_directionality','left_vs_right_stability','pitch_directionality','up_vs_down_stability','terrain_measure','repetition_score'});
  68. % Full GLM (linear regression)
  69. mdl = fitglm(T,'repetition_score ~ speed_score + azimuthal_directionality + left_vs_right_stability + pitch_directionality + up_vs_down_stability + terrain_measure','Distribution', 'normal', 'Link', 'identity');
  70. plotPartialRegression(fig_now,mdl);
  71. % Display outputs
  72. disp('--- Full Model Summary ---');
  73. disp(mdl);
  74. % Get full model R²
  75. R2_full = mdl.Rsquared.Ordinary;
  76. % Partial R² loop (from previous code)
  77. predictors = mdl.PredictorNames;
  78. partialR2 = zeros(numel(predictors),1);
  79. for i = 1:numel(predictors)
  80. reducedPredictors = setdiff(predictors, predictors{i});
  81. formula = sprintf('repetition_score ~ %s', strjoin(reducedPredictors, ' + '));
  82. mdl_reduced = fitglm(mdl.Variables, formula);
  83. SSE_reduced = mdl_reduced.SSE;
  84. SSE_full = mdl.SSE;
  85. % Partial R² (unique contribution of predictor i)
  86. partialR2(i) = (SSE_reduced - SSE_full) / SSE_reduced;
  87. end
  88. % % of total R² explained
  89. percentR2 = (partialR2 / R2_full) * 100;
  90. % Results table
  91. T_contrib = table(predictors, partialR2, percentR2,'VariableNames', {'Predictor','PartialR2','PercentOfTotalR2'})
  92. % keyboard
  93. %%%%%%%%%%%%%%%% Save the overall figure
  94. if 1
  95. fname = [config.fig_dir '\Fig S11a.png'];
  96. if fast_figs
  97. frame = getframe(gcf); % fig is the figure handle to save
  98. [raster, raster_map] = frame2im(frame); % raster is the rasterized image, raster_map is the colormap
  99. if isempty(raster_map)
  100. imwrite(raster, fname);
  101. else
  102. imwrite(raster, raster_map, fname); % fig_file is the path to the image
  103. end
  104. else
  105. exportgraphics(gcf,fname,'BackgroundColor',[1 1 1],'Colorspace','rgb','Resolution',res);
  106. end
  107. close(gcf);
  108. end
  109. function plotPartialRegression(fig,mdl)
  110. % mdl: fitglm or fitlm object
  111. X = mdl.Variables; % full table of predictors + dependent
  112. y = mdl.Variables{:, mdl.ResponseName}; % dependent variable
  113. predictors = mdl.PredictorNames; % list of predictor names
  114. predictor_plot_names = {'Speed score','Directionality','Directional stability','Tilt stability','Tilt directionality','Terrain score'};
  115. coefTable = mdl.Coefficients; % GLM coefficient table
  116. figure(fig);
  117. tiledlayout(4,3)
  118. nPred = numel(predictors);
  119. for i = 1:nPred
  120. % Current predictor
  121. x = X.(predictors{i});
  122. % Regress y on all other predictors (excluding current one)
  123. otherPreds = setdiff(predictors, predictors{i});
  124. tbl_y = X(:, otherPreds);
  125. lm_y = fitlm(tbl_y, y);
  126. x_resid = lm_y.Residuals.Raw;
  127. % Regress current predictor on all others
  128. lm_x = fitlm(tbl_y, x);
  129. y_resid = lm_x.Residuals.Raw;
  130. % Plot residuals
  131. nexttile
  132. % subplot(ceil(sqrt(nPred)), ceil(sqrt(nPred)), i);
  133. alpha = 0.5;
  134. scatter(x_resid, y_resid, 20,'k','filled','MarkerFaceAlpha',alpha,'MarkerEdgeColor','none');
  135. ylabel([predictor_plot_names{i} ' (residuals)'],'Interpreter',"none");
  136. if i>3
  137. xlabel(['Repetition score (residuals)'],'Interpreter',"none");
  138. else
  139. xlabel(' ')
  140. end
  141. % title(['Partial regression: ' predictors{i}]);
  142. hold on;
  143. % Fit line to residuals
  144. ax = gca;
  145. ax.XLim = [-0.5 1];
  146. ax.YLim(2) = ax.YLim(2)*1.15;
  147. p = polyfit(x_resid, y_resid, 1);
  148. x_fit = linspace(ax.XLim(1), ax.XLim(2), 100);
  149. y_fit = polyval(p, x_fit);
  150. plot(x_fit, y_fit, 'r-', 'LineWidth', 2);
  151. % Extract GLM results for this predictor
  152. row = coefTable(strcmp(coefTable.Row, predictors{i}), :);
  153. beta = row.Estimate;
  154. se = row.SE;
  155. tval = row.tStat;
  156. pval = row.pValue;
  157. if pval < .05
  158. % Scientific notation: mantissa × 10^{exponent}
  159. [mantissa, exponent] = sprintf('%.2e', pval); % format in scientific
  160. parts = regexp(sprintf('%.2e', pval), '([-+]?\d*\.\d+)e([-+]?\d+)', 'tokens');
  161. mantissa = parts{1}{1};
  162. exponent = str2double(parts{1}{2});
  163. pStr = sprintf('\\it{p} = %s \\times 10^{%d}', mantissa, exponent);
  164. else
  165. % Normal decimal, strip leading zero
  166. pStr = sprintf('\\it{p} = %.3f', pval);
  167. pStr = regexprep(pStr, '0\.', '.');
  168. end
  169. % Annotation string
  170. txt = sprintf('\\beta = %.3f, SE = %.3f\nt = %.2f, %s', beta, se, tval, pStr);
  171. % Place annotation at the very top of the plot
  172. text(0.5, 1, txt, 'HorizontalAlignment', 'center', 'VerticalAlignment','middle','FontSize', 7, 'Interpreter','tex','Units','normalized');
  173. end
  174. end

PIT_over_glm.m at commit d3a03d4, under MIT · at the source

Overview

  1. School of Psychology and Neuroscience, University of Glasgow, Glasgow, UK
  2. Department of Psychological and Brain Sciences, Dartmouth College, Hanover, NH, USA
Institutions: Dartmouth College (United States); University of Glasgow (United Kingdom)
Journal: Science advances, volume 12, issue 23, article eadz9893
Dates: received 22 June 2025; accepted 24 April 2026; published online 3 June 2026; in print June 2026
Type: Research article · Language: English
License: CC BY-NC
Identifiers: DOI 10.1126/sciadv.adz9893 · PMID 42234755 · PMCID PMC13232613 · OpenAlex W7163332544
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: extracellular electrophysiology (units, LFP) (modality), rat (organism)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Single-unit activity, calcium imaging
MeSH: Behavior, Animal*, Hippocampus*, Place Cells*, Animals, Neurons, Rats, Space Perception (* major topic)
Journal subjects: Neuroscience, Cognitive Neuroscience
Topic: Memory and Neural Mechanisms (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Institutes of Health (NS053907); Royal Society (RG\R1\251083)
Citations: not cited yet (Europe PMC); 111 references in the paper

Abstract

How does the brain map uneven terrain? While spatial neurons such as hippocampal place cells and entorhinal grid cells have been extensively studied in flat, horizontal environments, the natural world is hilly and irregular. To investigate how place cells represent irregular terrain, we recorded from the hippocampus of rats foraging across either flat or ridged terrain. Place cell activity reflected terrain shape, consistent with a surface-bound cognitive map rather than a volumetric one. Place fields were elongated parallel to terrain contours, which contrasted with the movement biases of the rats, and are inconsistent with a predictive coding model. Reflecting the importance of terrain information, a third of the place cells exhibited repeating fields on each ridge. A boundary vector cell model of place cell firing replicated these results. These findings demonstrate that the cognitive map is sensitive to topography, bringing our understanding of spatial cognition closer to the real world.

Reproduced under the paper's license (CC BY-NC), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 15 matches between paragraphs and lines of code.

Neuroesc/Hillscape_analyses

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: d3a03d4bc00e9a3ac94af3a8406ebc992f85f09b, 25 September 2026
Languages: MATLAB (91)
Size: 98 files, 91 scripts
Software Heritage: not archived
Found in: “Data, code, and materials availability:”
Holds: README, license file, tests
Not found: CITATION.cff, environment file, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
93 files

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 91 scripts, each with its path and the digest of its content;
  • 15 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

Data, code, and materials availability

All data and code needed to evaluate and reproduce the results in the paper are present in the paper and/or the Supplementary Materials. This study did not generate new materials. Data, annotated files, and MATLAB code are permanently accessible and can be downloaded via the independent, nonprofit, online open-access repository Zenodo using the following link: https://doi.org/10.5281/zenodo.17634455. MATLAB code can also be downloaded from GitHub at https://github.com/Neuroesc/Hillscape_analyses.

Reproduced under the paper's license (CC BY-NC), 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, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 7 MeSH terms, 2 funders, 100 references.

Cite

This paper

Grieves, R. M., Duvelle, É., & Taube, J. S. (2026). Hippocampal place cells map terrain geometry independently of behavior. Science advances, 12(23), eadz9893. https://doi.org/10.1126/sciadv.adz9893

BibTeX

@article{grieves2026hippocampal,
author = {Grieves, Roddy M. and Duvelle, Éléonore and Taube, Jeffrey S.},
title = {{Hippocampal place cells map terrain geometry independently of behavior}},
journal = {Science advances},
year = {2026},
month = jun,
volume = {12},
number = {23},
pages = {eadz9893},
publisher = {American Association for the Advancement of Science},
issn = {2375-2548},
doi = {10.1126/sciadv.adz9893},
url = {https://doi.org/10.1126/sciadv.adz9893},
pmid = {42234755},
pmcid = {PMC13232613}
}

RIS

TY - JOUR
AU - Grieves, Roddy M.
AU - Duvelle, Éléonore
AU - Taube, Jeffrey S.
TI - Hippocampal place cells map terrain geometry independently of behavior
T2 - Science advances
J2 - Sci Adv
PY - 2026
DA - 2026/06/03
VL - 12
IS - 23
SP - eadz9893
SN - 2375-2548
PB - American Association for the Advancement of Science
DO - 10.1126/sciadv.adz9893
UR - https://doi.org/10.1126/sciadv.adz9893
LA - en
ER -

CSL-JSON

{
"id": "10.1126/sciadv.adz9893",
"type": "article-journal",
"title": "Hippocampal place cells map terrain geometry independently of behavior",
"container-title": "Science advances",
"author": [
{
"family": "Grieves",
"given": "Roddy M."
},
{
"family": "Duvelle",
"given": "Éléonore"
},
{
"family": "Taube",
"given": "Jeffrey S."
}
],
"container-title-short": "Sci Adv",
"volume": "12",
"issue": "23",
"page": "eadz9893",
"DOI": "10.1126/sciadv.adz9893",
"PMID": "42234755",
"PMCID": "PMC13232613",
"ISSN": "2375-2548",
"publisher": "American Association for the Advancement of Science",
"URL": "https://doi.org/10.1126/sciadv.adz9893",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
3
]
]
}
}

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-026-72620-4 [code]
Grid maps are disrupted after large-scale arena expansion and recover with experience.
Journal: Nature communications
In common: CircStat, Curve Fitting Toolbox, Image Processing Toolbox, 2 other tools, extracellular electrophysiology (units, LFP), 6 references
[2] doi:10.1371/journal.pcbi.1013488 [code]
Evaluating place cell detection methods in Rats and Humans: Implications for cross-species spatial coding.
Journal: PLoS computational biology
In common: extracellular electrophysiology (units, LFP), rat, 9 references
[3] doi:10.1016/j.celrep.2026.117505 [code]
Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.
Journal: Cell reports
In common: extracellular electrophysiology (units, LFP), 9 references
[4] doi:10.1126/sciadv.aea1037 [code]
Distinct cortical spatial representations learned along disparate visual pathways.
Journal: Science advances
In common: CircStat, Curve Fitting Toolbox, Image Processing Toolbox, 2 other tools, 4 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 reports
In common: boundedline, CircStat, Curve Fitting Toolbox, 3 other tools, 2 references
[6] doi:10.1038/s41467-026-73263-1 [code]
Distributed neural codes of the 3D position in the marmoset frontal cortex and hippocampus.
Journal: Nature communications
In common: Image Processing Toolbox, Statistics and Machine Learning Toolbox, 6 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 Neuroscience
In common: CircStat, Curve Fitting Toolbox, Image Processing Toolbox, 2 other tools, extracellular electrophysiology (units, LFP), rat, 2 references
[8] doi:10.1371/journal.pcbi.1013487 [code]
Flexible navigation with neuromodulated cognitive maps.
Journal: PLoS computational biology
In common: 7 references
[9] doi:10.1038/s41467-026-73106-z [code]
Respiratory pauses highlight sleep architecture in mice.
Journal: Nature communications
In common: boundedline, CircStat, Curve Fitting Toolbox, 3 other tools, extracellular electrophysiology (units, LFP)
[10] doi:10.1038/s41586-026-10537-0 [code]
Sparse-to-dense coding transformation between hippocampal areas CA3 and CA1.
Journal: Nature
In common: 7 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.

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.