Abstract
Place cells, spatially responsive hippocampal cells, provide the neural substrate supporting navigation and spatial memory. Historically most studies of these neurons have used electrophysiological recordings from implanted electrodes but optical methods, measuring intracellular calcium, are becoming increasingly common. Several methods have been proposed as a means to identify place cells based on their calcium activity but there is no common standard and it is unclear how reliable different approaches are. Here we tested four methods that have previously been applied to two-photon hippocampal imaging or electrophysiological data, using both model datasets and real imaging data. These methods use different parameters to identify place cells, including the peak activity in the place field, compared to other locations (the Peak method); the stability of cells’ activity over repeated traversals of an environment (Stability method); a combination of these parameters with the size of the place field (Combination method); and the spatial information held by the cells (Information method). The methods performed differently from each other on both model and real data. In real datasets, vastly different numbers of place cells were identified using the four methods, with little overlap between the populations identified as place cells. Therefore, choice of place cell detection method dramatically affects the number and properties of identified cells. Ultimately, we recommend the Peak method be used in future studies to identify place cell populations, as this method is robust to moderate variations in place field within a session, and makes no inherent assumptions about the spatial information in place fields, unless there is an explicit theoretical reason for detecting cells with more narrowly defined properties.
Author summary
Place cells are hippocampal cells that have spatially constrained receptive fields, the place field. These cells have been widely studied in the context of navigation, more recently using virtual reality environments in combination with optical methods of recording neuronal activity. However, there is a lack of consensus regarding how to identify place cells in these data. In this study we tested the sensitivity and specificity of four methods of identifying place cells. By comparing these methods and quantifying the populations of place cells they identify, we aimed to increase our understanding of exactly the populations that are currently being studied under the name “place cells”. Although the appropriate method may depend on the experimental design, we generally recommend a single method going forward, which will increase consensus within the field about what should be included in a place cell population, and allow us to better compare results between studies.
Introduction
Place cells are a subset of hippocampal pyramidal cells that fire selectively when the subject is in a certain location [1], and provide a sparse population code for self-location. Studies revealing their properties, including location-specific firing [1], directional selectivity [2] and context-dependence [3] have been vital for our understanding of how the hippocampus codes space. [4]. Place cells are characterised by their place field, which is a spatially stable location where the cell preferentially fires. Depending on the size of the environment, place cells can have one or multiple place fields [5]. The place fields may change location between different environments, a phenomenon called remapping. Place cells are also relevant to understanding clinical conditions such as Alzheimer’s disease, as in mouse models of Alzheimer’s disease they show impaired firing [6] linked to memory deficits.
Since their discovery, place cells have been extensively studied in real world environments–both open field and constrained—using electrophysiological recordings while animals either explore freely or perform directed spatial tasks. In these studies, cells are generally included in analyses based on a variety of properties, including their peak firing rate, waveform, sparseness of the place field or spatial selectivity (e.g. [3,7–9]). Further analyses sometimes require the place fields of these cells to have additional properties, such as a maximum number of place fields allowed, or a stable place field over time (see e.g. [7,8,10]).
However, methodological advances now also allow place cells to be studied in vivo using calcium imaging [11–13], enabling large populations (n>100) of cells to be recorded for multiple sessions. This method requires the brain to be stationary during recording, which necessitates the use of a Virtual Reality (VR) environment. Often a visual VR is used during imaging, consisting of one or multiple screens displaying an environment that the mouse can control by running on a ball or wheel. With a ball, the mouse is able to move in two dimensions (e.g. [14]), whereas with a wheel, mice can only move backwards and forwards. These types of VR limit the animal’s ability to look around, and provide sparse sensory feedback; for example, whisking does not provide information about the environment. Place cells also respond differently in VR environments compared to the real world, showing broader place fields and increased directionality [15].
Several studies using one-dimensional environments (i.e. corridors) have revealed that hippocampal pyramidal cells represent other features in addition to location, such as reward [16] and travelled distance [17]. It is unclear to what extent these features are coded by separate populations of cells in the hippocampus or cells that, under other circumstances such as a dedicated navigation task, might be recruited as place cells. To resolve this, it is important to be able to accurately define place cells within such one-dimensional environments, but currently different studies use widely varying methods making comparisons between studies problematic.
Varying definitions of place cells have been chosen to account for the constraints imposed by the imaging methodology. Unlike electrophysiological recordings, imaging detects changes in intracellular calcium levels rather than direct readouts of action or synaptic potentials. The non-linear relationship between calcium transients and spike rates makes it hard to accurately estimate spike rates from two-photon data [18], so adopting exactly the same methods as used in electrophysiological recordings is not possible. In addition, the exact waveform of the spikes, another characteristic used to classify place cells (e.g. [7]), is unknown. Instead, studies have tended to use adaptations of some, but not all, of the imaging equivalents of peak firing rate, sparseness of off-location firing, and place field stability to define a cell as a place cell: Dombeck et al. [11] categorised a cell as a place cell based on a combination of properties of that cell’s apparent place fields, including the size, peak calcium fluorescence and the ratio of the firing within and outside the field. This method, or variations of it, have subsequently been adopted in several studies (e.g. [19–21]). Fournier et al. [22] proposed a statistical method that uses the peak activity in the rate map of a cell and compares it to the peak activity in shuffled versions of the cell. An alternative approach [23] detects place cells from the stability of their activity as a function of location, a method based on those used in electrophysiology experiments [3]. Lastly, Ziv et al. [24] defined place cells based on the mutual information between the cells and the location of the animal, a method which is also used widely [25–27]. However, it is unclear what biases these different methods exhibit and to what extent their classification criteria are equivalent–in short, do they identify the same neurons as place cells?
In this paper we aim to address the lack of consensus on how to identify place cells in two-photon data in a one-dimensional VR environment. We compare the performance of two established methods for the identification of place cells in two-photon data (the methods used by Dombeck et al. [11] and Ziv et al. [24]), another method that is often using to characterize place cells in electrophysiological studies (e.g. [3,7], described by O’Leary et al. [23]) as well as one method developed for use on electrophysiology data which has been adapted for use in imaging–described by Fournier et al. [22]. We applied them to a range of synthetic model cell populations to explore whether cells identified as place cells by each of these methods possess similar characteristics. We conclude that in a range of mock datasets the method developed by Fournier et al., which we call the Peak method, is best suited to identify place cells, having a high sensitivity and specificity, and lacking assumptions about spatial information held by the place cells. As a result, we recommend this method for the identification of place cells in two-photon imaging data. Our data also show that choice of identification method is important, as the methods classify different, largely non-overlapping populations of cells as place cells.
Results
Place cell detection by the Combination and Stability methods is sensitive to the properties of place fields and the number of times mice traverse the environment
We evaluated the performance and suitability of four different approaches for detecting place cells (S1 Fig):
The Peak method, which classifies cells as place cells based on the average rate of firing (approximated by fluorescence change in two-photon data) in one location being higher than in the rest of the environment [28];
The Stability method, which identifies place cells as those with stable firing patterns across locations over time [23];
The Combination method, which requires place cells to fire more across a contiguous stretch of the environment than at baseline and to fire in this location on at least 20% of traversals [11].
The Information method, which classifies cells based on the increased amount of spatial information the cells hold about the animal’s location [24].
We selected the four methods for varying reasons. The Peak method was originally applied to electrophysiological data, and its simplicity allows for the application to fluorescence data with minimal adaptations. Similarly, the Stability method was based on methods used for characterising place cells in electrophysiological recordings (e.g. [3]), while the Information method, or variations thereof, have previously been used to detect place cells in both electrophysiological [26] and fluorescence data [27]. This makes these three methods promising candidates for application across the two recording paradigms. In contrast, the Combination method was designed specifically for fluorescence data, and has been widely employed in the field (e.g. [11,20,25]).
To characterise the four different approaches for detecting place cells we applied them to synthetic datasets consisting of 20 true place cells and 80 random cells, matching the prevalence of place cells found using patch-clamp recordings [29]. Mouse location for each dataset was generated using experimentally acquired locomotion time courses from mice running through a linear virtual reality environment (S2 Fig, 8 datasets: 4 mice, 2 sessions per mouse). The dataset contained a total of 184 traversals of the environment, with mice running 23 traversals per session on average. Model fluorescence maps were generated by applying the synthetic cell profiles to 50 randomly selected traversals (Fig 1A and 1B). Periods where the mouse was not running–defined as having a velocity below 2 cm/s–were removed (Fig 1C and 1D).
Fluorescence maps of the place cells were modelled using a Gaussian to simulate changes in fluorescence as a function of location, where the mean determined the place field centre and sigma the field width. We used a default width of 50cm, based on widths previously reported in a virtual environments [11,29]. Synthetic data was linearly scaled to match the peak values observed in our own two-photon CA1 data (Fig 1E). We distributed place field centres evenly across the 200 cm long track, then convolved the place field with the position of the mouse to determine the fluorescence map of each cell over time (Fig 1E, bottom 20 cells, Fig 1F). We also included 80 control cells (Fig 1E, top 80 cells, Fig 1G) without place-dependence. Poisson noise, which in the default model had an average fluorescence of 0.18% of the default peak height, was then added to the traces of all cells. Lastly, the four different place cell classification methods were applied to these fluorescence maps.
We could therefore vary the parameters that determine the fluorescence map (Gaussian peak, width and location, number of traversals of the environment), each with a different effect on the properties of the model cells (S3 Fig), to determine how much the properties of the place field affect their detection by the different methods. To assess place cell classification performance, we first calculated how many place and non-place cells were correctly identified by each method (true positives and true negatives), versus the number of false positive and false negative identifications. From these values, we then calculated the sensitivity (the proportion of place cells that were correctly detected), and the specificity (the proportion of cells identified as place cells that actually were place cells) of each method (Methods, Eqs (1) and (2)). A perfect detection method would therefore have a selectivity of 1 and a specificity of 1.
Number of traversal
First, we determined the impact of the number of times the mouse ran through the environment on place cell detection by varying the number of traversals used to generate the model datasets from 2 to 100 (Fig 1H and 1I). We generated 10 model datasets for each number of traversals.
The Peak, Stability and Information methods had a high sensitivity regardless of the number of traversals included in the dataset (Fig 1H). Both the Peak and Information methods also displayed a stable specificity across the range of traversals, with a mean of 0.99 and 0.95 respectively, reflecting their requirement that a true place cell’s activity is in the top 1% and 5% (respectively) of shuffled data (Fig 1I). However, the Stability method saw a decreasing specificity with an increase in traversals, with a specificity of 0.76 at 100 traversals, i.e. more non-place cells were classified as place cells as the number of traversals increased. This is likely because with an increase in traversals, the Poisson noise of the non-place cells will increasingly average out over the traversals, thus resulting in an increased correlation between the fluorescence maps of the first and second halves of the session for the non-place cells. This increases the number of false positives, and thus results in a decrease in specificity. The Combination method increased in sensitivity as the number of traversals increased from 2 to 20, above which it stabilised with a sensitivity of 0.79. The specificity of this method remained 1 regardless of the number of traversals included.
Thus our simulations predict that the Combination method would fail to detect at least 27% of hippocampal place cells, while up to 23% of the place cells identified by the Stability method would be false positives, and accuracy for both methods is affected by the number of times mice run through the environment.
Place field properties
We next tested the effect of manipulating the width of the model place fields and their peak “fluorescence” on the ability of the four methods to detect the place cells (Fig 2C–2F). First, we varied the width of the place field between 20 and 200 cm, equivalent to 10 to 100% of the total environment length, while keeping the peak value at a ΔF/F of 1.3 (see S4 Fig for example place cells). For the Peak, Stability and Information methods, varying place cell width did not materially affect sensitivity. However, the sensitivity of the Combination method was generally lower than the other methods, only approaching their sensitivity for place fields between 80 and 120 cm, and failing to detect any place field narrower than 40 cm or broader than 160 cm. Specificity of place cell detection was high for the Peak, Combination and Information methods and unaffected by the place field width, whereas it was generally lower when using the Stability method (Fig 2D). It increased linearly with place field width for this method, presumably because the correlation between the fluorescence maps of the non-place cells and place cells decreases as the width increases.
We then varied the peak of the place field between a ΔF/F of 0.0001 and 2 (equivalent to 0.008% to 155% of the average fluorescence map peak measured in our two-photon data), keeping the place field width at 50 cm. Sensitivity was only affected using the Peak, Stability and Information methods at extremely low, and therefore unrealistic, peak values (< 0.1, or fewer than 8% of peaks in our real data; Fig 2E). The sensitivity for the Combination method was generally lower and increased with place cell peak size. The specificity was not affected by changes in peak values for any of the methods (Fig 2F).
Next, we varied the number of place fields for each place cell, up to 4 place fields per cell (S5 Fig). The Peak, Stability and Information methods were able to identify the model place cells, regardless of the number of place fields, with a high sensitivity, while the Combination method showed a dramatic drop in sensitivity above 2 place fields. Specificity was relatively unaffected in all methods by increasing the number of place fields, though was maximal using the Stability method when cells had 4 place fields.
Finally, we varied both the place field width and peak values at the same time (S6 Fig). The results reflect those when varying each parameter individually, illustrating the high general sensitivity of the Peak, Stability and Information methods and the much narrower performance of the Combination method, which has high sensitivity at only a narrow range of widths and with high peak fluorescence values. Conversely specificity is high overall for the Peak, Combination, and Information methods, but for the Stability method is lower across the range of parameters tested and lowest for narrow place fields.
In summary, the Combination method detected fewer model place cells and was the most affected by realistic variations in place field properties, while the Stability method classified more non-place cells as place cells and this tendency increased with narrower place fields. Both the Peak and Information methods were sensitive and specific over the whole range of place field properties tested, though the Peak method slightly outperformed the Information method, having a higher specificity.
Variability and reliability decrease detection of model place cells, particularly by the Combination method
Because, physiologically, cells do not fire with identical profiles to repeated presentations of a stimulus [30], we simulated how the inherent variability of place cells affected their detection by the different methods. We manipulated the reliability of place cell responses by varying the percentage of traversals in which they fired (Fig 3A) and the location of the place field centre, by shifting the position of the activation peak with respect to the average firing field a percentage of the place field width (Fig 3B). The exact traversals that cells fired in were uniformly randomized, while the exact deviation of the place field centre was randomized using a Gaussian probability curve, and was repeated 10 times for each parameter.
The Peak, Stability and Information methods increased their sensitivity as cells became more reliable, reaching a maximum when cells fired in over 30% of traversals. The Combination method also increased in sensitivity with increased reliability, but at a slower rate, reaching a lower maximum sensitivity only when cells fired in 100% of traversals (Fig 3C). Varying reliability did not affect the specificity of any of the methods (Fig 3D). The effect of reliability on the Peak and Information methods comes not from any explicit comparison of cells across traversals, but because unreliability decreases the size of the place field peak in the average fluorescence map, due to the existence of traversals in which the cell is inactive.
Increased variability of the location of the place field centre caused a reduction of sensitivity above 50% variability for the Peak and Combination methods, above 80% variability for the Stability method, and above 120% for the Information method (Fig 3E). Specificity of all methods was again unaffected by changes in variability (Fig 3F).
When changing both the variability and reliability, results were again similar to varying each individually, with maximal sensitivity for all methods occurring when cells had high reliability and low variability (Fig 3G), and stability being similar across all conditions (Fig 3H).
Overall, the Information method had the highest sensitivity, especially across highly variable model cells. However, its specificity was lower across the board than the Peak method, for which the sensitivity was lower at a high variability. This difference is likely due to the respective percentile thresholds (99th for the Peak method and 95th for the Information). The response pattern of the Peak method is arguably preferable in this instance, as highly variable cells which are active in different locations from traversal to traversal do not fit within what is understood to be a place cell. Conversely, the Combination method’s sensitivity was decreased by even small decreases in reliability, while the Stability method was more robust than the Peak method to high variability, but less so compared to the Information method, and had low overall specificity.
Place cell parameters affect methods differently in variable populations
Although the modulation of the various place cell parameters (peak, width, reliability and variability) illustrate the effect of the singular parameters on the performance of the methods, having the same parameter setting for each place cell is unlikely to reflect real place cell populations. Moreover, we only combined 2 subsets of parameters (peak and width, reliability and variability), but not all four. Therefore, to mimic a more realistic model population, we performed a further simulation, where we randomly selected a place field peak, width, variability and reliability for each individual cell of the population (Fig 4A). As a result, each of the 100 cells in the population had a different combination of these parameters. In this simulation, we did not include control cells, as we expected enough modelled cells to behave unlike place cells (i.e. those with a low reliability, high variability, low peak and/or high width, Fig 4B). We repeated this simulation 20 times, each time determining the percentage of cells classified as place cells by each of the methods.
We found a significant difference in the number of place cells identified by each of the methods (p = 1.14x10-14, repeated measures ANOVA), with the Information method detecting the highest number (65.6 +/- 5.7% (mean +/- std)), followed by the Peak method (40.2 +/- 5.3%) and the Stability method (27.8 +/- 3.4%), while the Combination method only classified 10.2 +/- 3.4% of cells as place cells. Interestingly, despite the Stability method having a high sensitivity and low specificity in the previous simulations, this method classified a lower number of cells as place cells compared to the Peak and Information methods, which previously had a higher specificity. This is likely because the increased variability of the population will cause an increase in the intercell correlation compared to the simulations where the place fields were all strictly in different positions and equidistant from each other. This will therefore cause an increase in the correlation threshold required for cells to be included as place cells, and thus an increase in specificity and decrease in sensitivity, resulting in a lower number of cells included as place cells overall. At the same time, on average the place cells will be less correlated than in our previous simulations, where cells always were highly consistent in all but the manipulated variable, and thus fewer are presumably sufficiently correlated to be classified as place cells (e.g. many will have higher variability and lower reliability so activity will vary from traversal to traversal).
We were interested to see if the same model place cells were identified by the different methods, or if different methods identified independent populations. To this end, we determined the overlap between each of the methods, and compared this to the overlap expected by chance. All combinations of methods had a higher overlap than expected by chance (Fig 4D, p = 4.4x10-15, p = 2.2x10-10, p = 2.2x10-16, p = 5.8x10-10, p = 4.4x10-15, p = 2.1x10-10 for the Peak-Stability, Peak-Combination, Peak-Information, Stability-Combination, Stability-Information and Combination-Information comparisons respectively, paired t-tests with Holm-Bonferroni correction for multiple comparisons), indicating that an overlapping population of cells were identified as place cells by the different methods.
Lastly, we examined how the various place field parameters affected the percentage of cells identified by the methods. For each population, we determined the percentage of cells with a particular value for each parameter (e.g. all cells with a width of 100 cm, regardless of the values for the other parameters) that were identified as place cells. This illustrates again the difference in the percentage of cells identified by each method (Fig 4E–4H), but shows that the effect of the parameters is largely the same across the methods (e.g. increasing place field width decreases the number of place cells identified by each method). In addition, the way each parameter affected the percentage of place cells showed a similar trend to the effect of these parameters on the sensitivity in the previous model (Figs 2 and 3), though the maximum percentage of place cells detected is lower in each case than the suggested by the sensitivity. This is presumably due to the increased sources of variation in the place cell activity in this simulation: a cell with optimal reliability is likely to be sub-optimal in the other parameters. The notable exception to this is the Combination method, which previously only identified cells as place cells when their field width was within a window between 20 and 120 cm (Fig 2C). In this latest simulation, however, no such defined window exists and, like the other methods, the number of cells decreases gradually as place field width decreases. This is likely because a place cell with a small place field but a high variability can still be classified as a place cell by the Combination method, as increased variability will cause the place field in the average fluorescence map to seem wider, as illustrated in S3M Fig, so that it falls within the window for detection.
The information method detects the most place cells in real datasets
The performance of the different methods of place cell detection on model data predicts that, on real datasets, the Peak method will have the highest sensitivity and specificity, with the Combination method being less sensitive and the Stability method often being less specific. This would suggest that in a real dataset, the Combination method would identify fewer place cells than the other two methods, while the Stability method, because it has a higher false positive rate on model data, might (inaccurately) detect more cells than the Peak method.
To test this, we collected neuronal calcium data from the stratum pyramidale of dorsal CA1 in 4 mice (8 imaging sessions in total) traversing through a 1D virtual reality corridor of 200 cm (Fig 5A). We applied each of the four methods to these data to identify which cells could be categorised as place cells (Fig 5B). There was a highly significant difference in the percentage of cells classed as place cells by the different methods (p = 1.35x10-9, linear mixed-effects model with method as a fixed-effect and mouse ID, with session number nested, as a random effect), with the Information method detecting the highest number (47.0 +/- 12.2% (mean +/- std)), followed by the Peak method (34.5 +/- 11.1%) and the Stability method (16.5+/- 8.8%), while the Combination method only classified 3.9 +/- 1.9% of cells as place cells. The properties of these cells can be seen in an example recording showing the fluorescence maps of all cells, ordered by location (Fig 5C). In addition, the populations of cells identified by each of the methods are shown (Fig 5D–5G). Although no ground-truth exists for what should be included as a place cell, most identified cells seem to have place fields, suggesting classifications are largely appropriate.
Differences between detection in modelled and real data
Based on the results from our modelled datasets, we expected the Stability method to classify more cells in a real dataset as place cells than the Peak or Information methods, but in fact it identified significantly fewer (p = 0.0012 and p<0.0001 respectively, Tukey post-hoc comparison). We probed the reasons for this difference both by modulating the properties of the modelled cells and inspecting examples of real cells identified differently by the different methods. Because the Stability method compares the activity of each cell to that of other cells in the population, while the Peak and Information methods compare each cell to a shifted version of themselves, the properties of non-place cells could preferentially affect the performance of the Stability method. We therefore modulated the number and firing properties of the modelled non-place cells to see if this reduced the number of cells identified by the Stability method. Increasing the percentage of place cells and adding random calcium peaks to the non-place cells resulted in an increase in specificity (S7A–S7F Fig), likely because it decreased the correlation of the fluorescence maps of the first and second halves of the sessions for the non-place cells. In addition, we tested the effect of having a population with fully overlapping place fields, which again caused an increase in specificity (S7G–S7I Fig). Lastly, adding in random calcium peaks to the place cells in addition to the non-place cells caused a similar increase in specificity for the Stability as adding them only to non-place cells (S7J–S7L Fig). Although these factors decrease the overall number of place cells detected by the Stability method, due to the reduction of false positives, this could not wholly account for the observed decrease in cells detected in real data compared to the other methods.
Visual inspection of the firing properties of cells identified by the Peak and Information methods, but not by the Stability method, however, showed that the difference in detection is caused largely by cells that have different place fields at different times in the session (S8 Fig), in addition to cases where cells either gain or lose a place field during the session. The Stability method fails to identify these cells, because their mean activity over location for the first half of the session is different from the second. This type of structured variation in the place field location was not captured by our simulations of place field activity, because reliability and variability were varied randomly, which did not affect the ability of the Stability method to detect place cells. Minor changes to the Stability method or experimental design should prevent this effect, for example by comparing odd to even traversals, or by adding a familiarisation period for the animals at the start of each session which could ensure place fields are more stable when the experiment begins. In addition, a paradigm where the animals repeatedly enter the environment, as is the case in our experiment because traversals are separated by a tunnel, may induce switching between concurrent spatial maps [27], thus decreasing the overall stability of the cells. However, it is an open question whether some of the cells identified by the Peak and Information methods should really be classified as place cells, for example those with unstable place fields over the session.
Different populations of real CA1 pyramidal cells are identified as place cells by the different methods
To understand whether the different methods simply identify more or fewer of the same population of cells as place cells, we determined the percentage of all ROIs that were identified by two methods. Only 1.1% of cells were classed as place cells by all four methods. 11.1 +/- 7.6% of ROIs were identified as place cells by both the Peak and Stability methods (Fig 5H), while only 2.8 +/- 2.2% of ROIs were identified as place cells by the Peak and Combination methods. The Peak method showed a large overlap with the Information method, with 28.7 +/- 11.2% of cells identified as place cells in both methods. Only 1.1 +/- 1.2% of cells were classed as place cells in both the Stability and Combination methods, while 12.8 +/- 9.3% of cells were identified as place cells in both the Stability and Information methods. The information and Combination methods identified 3.2 +/- 1.6% as place cells. These overlaps were significantly different between pairs of methods, when corrected for expected overlap given the different percentages of cells identified by each method (p = 0.0014, linear mixed-effects model with method as a fixed-effect, expected overlap as a covariate and mouse ID, with session number nested, as random effects). This significant difference is due to a higher overlap between the Peak and Information methods compared to the other combinations of methods (p = 0.075, p = 0.01, p = 0.003, p = 0.002, p = 0.004 compared to Peak-Stability, Peak-Combination, Stability-Combination, Stability-Information and Combination-Information respectively, Tukey post-hoc comparison). Indeed, we only observed a significant different overlap from the expected overlap by chance for the Peak-Information comparison (p<0.0001, Tukey post-hoc comparison), but not for any of the other comparisons (p = 0.059, p = 0.59, p = 0.88, p = 0.084 and p = 0.62 for the Peak-Stability, Peak-Combination, Stability-Combination, Stability-Information and Combination-Information comparisons respectively) This suggests that the Peak and Information methods identify an overlapping population of cells, but this population is independent of the cells indentified by the other two methods. These results are notably different from our findings in the simulated populations (Fig 4), where all methods identified an overlapping population of cells. This suggests that additional variation is present in the real data that we did not capture in our model datasets, but that influences place cell identification by the different methods. Such variation could include out of field firing or structured variations in the place field over a session, as demonstrated in S8 Fig.
Identified place cell populations differ on key characteristics
To better understand the nature of the different populations of cells identified by each method, we characterised their properties, comparing basic physical features, and functional characteristics. Place cells and non-place cells identified by the different methods were of similar sizes (Fig 6A; a smaller size could indicate a noisier image and a higher chance that the automated cell detection by Suite2P had made a mistake as identifying it as a cell). Place cells and non-place cells identified by all methods were also similarly active, as assessed by both mean and maximum spiking rate (Fig 6B and 6C, calculated from the fluorescence profile [31]).
To investigate the information about location carried in place or non-place cells identified by the different methods, we calculated the mutual information between the cell’s activity and the animal’s location, providing an approximation of the spatial information carried in each cell’s calcium signals [32–34]. More spatial information was carried in place cells identified by the Peak and Information method compared to non-place cells, but there was no difference in mutual information held by the place cell and non-place cell populations for the Stability or Combination methods (Fig 6D). This is likely because cells containing spatial information that the Peak and Information methods would call place cells are classified as non-place cells using the Stability or Combination method. However, even the cells classified as non-place cells in the Peak and Information method contain some level of spatial information. Indeed, a previous study found that cells may convey information about location without being defined as a place cell [35]. For example, a cell whose activity ramps up gradually as the mouse progresses through the environment does not have a clear place field and will not be included as such in these methods but does communicate substantial spatial information.
Place cells exhibit no particular spatial organisation [11], and any such organisation compared to non-place cells might indicate an unwanted selection by one of the methods, e.g. based on illumination levels in one part of the field of view. Therefore, we determined the physical location of the detected place cells within the field of view of the recording. We expect the place cells and non-place cells to be randomly distributed within the field of view, as previously reported [11]. We determined the location of the centroid of each cell, labelled them as either place cell or non-place cell according to the different methods and then determined the distance from each place cell to all other place cells, and each place cell to all other non-place cells (Fig 6E). Place cells were no more similar in location to other place cells than to non-place cells for any of the methods, suggesting that place cell detection is not being influenced by position within the field of view.
Dependence of place cell detection on model parameters
The lack of overlap between cells identified by the different methods suggests that they identify fundamentally different populations of cells as being place cells, i.e. there is not a single population of cells that fits all the different definitions of place cells used by the different methods. To explicitly test for this, we calculated the extent to which the parameters which underlie classification for the Peak and Stability (peak intensity and correlation in firing across the session, respectively) were represented in the groups of place cells that were selected by each other method (The Combination method uses several parameters so could not be analysed in this way, and the parameter for the Information method was already compared by testing the mutual information). The Peak and Information methods had significantly higher peak intensity in the place cell group compared to the non-place cells (Fig 6F), while there was no difference between the place and non-place cells for the Stability and Combination methods.
Place cells identified by all methods had an increased correlation in activity across the session in place cells compared to non-place cells–i.e. they were more stable (Fig 6G). Thus, the Peak, Combination and Information methods also select for stable cells–likely because stable place cells are consistently active in the same location across traversals, yielding on average a robust peak, which in turns leads to increased spatial information.
Though both the peak intensity and stability are parameters used as a measure to identify place cells in their respective methods, the Peak method compares the values of each individual cell to the peaks of shuffled versions of that same cell, while the Stability method compares the correlation to randomly selected other cells, rather than comparing the values to an absolute threshold. This means that place cells are not necessarily the cells with the highest absolute peaks or highest correlation, but rather the highest value relative to their own shuffled controls. Therefore, we calculated the percentile these values fell in, relative to the shuffled controls, for each cell. Place cells identified by all methods had an increased percentile score for both the stability and the peak parameters (Fig 6H and 6I).
To understand why the methods select place cell populations with similar peak intensity and stability, we determined to what extent the parameters used to define place cells were independent from each other. We correlated the percentiles for the peak intensity and intra-session correlation for each cell across all datasets (Fig 6J). There was a small but significant correlation between the percentiles for peak fluorescence and intra-session correlation (Pearson correlation coefficient, R = 0.13, p = 3.7x10-5). Although this suggests the two measures are not completely independent–cells with high peak values have a tendency to have more highly-correlated firing patterns within a session–we did not see this reflected in the overlap between the methods (Figs 4H and S7H). This may be because the correlation coefficient between peak intensity and intra-session correlation is too low to have an impact. In addition, it may be the case that the more correlated cells are not the same as those that reach the threshold for inclusion as a place cell in one or both methods, so are not reflected in the place cell overlap.
Optimisation of the combination method
The Combination method identified many fewer cells in our data than in previously publications [11,20] or the other two methods applied here. We wondered if this could be due to the number of thresholds the Combination method applies, ([11,20] code to implement the Combination method shared by the authors), requiring putative place cells to fall within specific parameter ranges. These were presumably optimised for the published datasets and may make the method less transferable to other datasets. To test this, we investigated how varying these parameters and thresholds affected place cell detection in our model and experimental datasets (S9 Fig; Methods). Sensitivity for detecting model place cells could be improved by increasing the threshold for place field fluorescence compared to baseline (S9B Fig) or reducing the threshold in-field/out-field fluorescence ratio to 2 (S9E Fig), but neither modification caused a substantial increase in the number of cells classed as place cells in experimental data (3.9%; S9G Fig). Instead, the critical feature of the Combination method is the bootstrapping method, which splits the fluorescence data into chunks and shuffles them. Cells are only classed as place cells if fewer than 5% of each cell’s shuffles also fit the classification criteria. If we replaced the bootstrapping methods from the Combination method with that of the Peak method, which instead offsets fluorescence traces relative to time, causing more disruption to the association between fluorescence and location, we identified 14.8% of ROIs in our experimental data as place cells (S9G Fig), which is within the published range using the Combination method [11], though below the numbers identified by the Peak or Information methods in our data (Fig 5B). Some of these newly identified cells now overlapped with those identified by other methods, 9.3% of all ROIs now overlapping with cells identified by the Peak method,5.6% overlapping with those identified with the Stability method (S9H Fig), and 11.7% with the Information method. Therefore, when using the new bootstrapping method, around 75% of PCs identified by the Combination method were also identified by the Peak method. However, the levels of overlap between the Combination method and the other methods were still as expected given the frequency of detection by each method (p = 0.17, p = 0.30, p = 0.10 for the Peak-Combination, Stability-Combination and Combination-Information comparisons respectively, Tukey post-hoc comparison following a linear mixed-effects model with method as a fixed-effect and mouse ID, with session number nested, as a random effect). This means that the cells identified by each method are still likely to be from independent populations (i.e. if a cell is classified as a place cell by one method that does not increase its chance of being classified as a place cell by another method).
Discussion
We compared four different methods for detecting place cells in two-photon calcium imaging data from mice running through a one-dimensional environment, comparing sensitivity and specificity of the different methods to model cell data, and whether they identified the same real populations of cells as place cells. The methods performed very differently at detecting model place cells and were differentially sensitive to changing parameters (e.g. number of traversals of the environment, place cell width, consistency of firing). This suggested that variability in firing properties across real hippocampal CA1 pyramidal cells would lead to different cells being classified as place cells by the different methods. This proved to be the case: there was very little overlap in real CA1 place cell populations classified by the different methods, except for the Peak and Information methods, which largely overlapped, because the key features used by the different methods to classify place cells proved only weakly correlated. When research groups use these different methods to detect place cells, they therefore identify and study largely independent populations of cells. Researchers should therefore explicitly consider the properties they are selecting for when choosing a place cell detection method, as this decision will determine which cells they do and do not select. In the future, use of a single method across different groups would better allow comparison of results across the field. The increased selectivity and specificity of both the Peak and Information method when using model data, leads us to conclude that these methods will usually be the best for detecting place cells in calcium imaging data. However, compared to the Information method, the Peak method does not inherently make assumptions regarding the spatial information held by potential place (or non-place) cells, and this neutrality to the information contained within the activity better reflects the capacity of cells without a clear location peak to contain spatial information [35]. Finally, the Peak method has previously been successfully employed to detect place cells in electrophysiological recordings [24], making it widely applicable beyond two-photon recordings. Therefore, we believe the Peak method will usually be the preferred method for place cell classification. Nevertheless, some curation of detected cells may still be desirable, as some cells identified by the Peak method showed unstable firing patterns that may be considered too dissimilar to the firing properties of a traditional place cell.
What is a place cell?
Because our results reveal that the choice of detection method will determine the population of cells identified as place cells by a given experiment, it is important to consider what the “desirable” properties of a place cell are, and whether the different classification methods detect these properties. O’Keefe’s first description of place cells defined them as “those for which the rat’s position on the maze was a necessary condition for maximal unit firing.” [1]. Of the four methods we assess here, the Peak method comes perhaps closest to this original definition, requiring cells to have high and consistent firing in one location compared to others, by statistically comparing whether the peak response consistently occurs at the same location. The Combination method achieves something similar by requiring firing to be above a certain threshold for a defined range of place field sizes, while the Stability method only requires the firing pattern to be stable over location and time without the explicit requirement for the peak to be highest in one location. The Information method uses the cells’ spatial information, which does capture the definition, but also makes the assumption that place cells always have an increased amount of spatial information, which is not necessarily the case [35]. For example, cells’ activity could ramp over space, thus containing spatial information without having a clear peak in activity in a given location.
The reason for the divergence of place cell definitions from the initial more constrained description is the increased emergence of variability in “place cell” properties. We now know that the size, shape, number and stability of place fields are not constant but can be affected by the environment and where in CA1 they are recorded: Place fields are wider, and more numerous, in larger environments, more stable in the presence of cues and smaller and less spatially selective in dorsal vs. medial CA1 [36–40]. Clearly methods that discriminate place from non-place cells according to a rigid interpretation of the “classic” definition will miss cells with these more variable properties. Indeed, we found that the Combination method has a lower sensitivity to detect cells with a place field outside a narrow range (100–120 cm), and failed to detect place cells as variability of place field position increased or reliability of firing reduced. Thus, we predict that experimental manipulations that alter the size of the environment and number of cues provided would reduce the number of place cells identified using the Combination method, but not using the Peak method.
Similar changes in place cell properties can occur due to the method of acquiring neural data, impacting on which might be the most appropriate method to choose to detect these cells. Many experiments that record the activity of large populations of cells, either using calcium imaging, as here, or multi-channel electrode arrays are conducted in head-restrained mice, while the animals are running on a 1D linear track [11,41–43]. These conditions likely cause place cells in our experiments to have broader place fields than in real world environments [15,44], and to be more directionally-sensitive, due to the 1D nature of our linear track [11,45]. The place cell detection method used for such imaging data therefore needs to recognise these less sharply tuned activity patterns. Both the Peak and Information methods found larger numbers of place cells in the experimental data, and selected cells which were both relatively stable and spatially selective. This increased number selected as place cells in our head-restrained imaging data occurred perhaps because of their broader spatial selectivity compared to classic tetrode recordings, suggesting that similar studies using head-fixed mice and linear tracks would also miss spatially-selective cells if a more conservative method were employed.
Less controllable variations in experiments between labs, for example the amount the mice run in an experiment, will also differentially affect the number of cells classed as place cells by the different methods. Our simulations suggested that all four methods would be more sensitive at detecting place cells as mice made more traversals of the environment, but the Combination method would miss cells with even relatively high numbers of traversals (missing over 50% of cells when 10 traversals were made). Furthermore, the Stability method increasingly falsely characterised non-place cells as place cells as the number of traversals increased, because non-place cells had higher intracell correlations as the number of traversals increased. Thus, only the Peak and Information methods could correctly identify place cells with low or high numbers of traversals. Choice of place cell categorisation method will therefore clearly affect the number of cells identified in experiments where animals run to different degrees. Crucially, however, the confounding of place cell identification with running behaviour in 2 of the 3 methods could lead to inaccurate conclusions about how experimental manipulations affect place coding. If, for example, mice of a certain genotype run less, generating fewer traversals, they could appear to have fewer place cells using the Combination method, or more place cells if using the Stability method, without the number of “true” place cells having changed.
In this study, we only investigated the effect of varying the number of traversals on place cell detection, but other characteristics of the locomotion may also have an effect, for example running speed or the amount of starting and stopping. As these effects may interact with the environment or task, (for example, mice slowing down before a reward delivery), we suggest testing the performance of a chosen method of place cell detection on a model dataset with the expected locomotion characteristics before using it to detect place cells experimentally. We provide source code (https://github.com/DoriMG/place_cell_methods) to facilitate this process, into which experiment-specific patterns of locomotion can be loaded and used to predict place cell detection using the four methods described here.
Lastly, in our simulations we modelled each cell independently. By modelling our cells this way, we are potentially missing out on network dynamics within the population, where cells fire dependently on each other, or are synchronously affected by a third factor, such as global theta oscillations. However, because each cell is individually evaluated in the Peak, Combination and Information methods, these methods will not be affected by such dynamics, and as such adding network dynamics to our models would not affect these results. In the case of the Stability method, the cells are compared to shuffles across the population, and both the sensitivity and the specificity of this method will very likely be affected by network dynamics. An increased correlation across the population will cause an increase in the shuffled correlation, thus a higher threshold for intracell correlation for cells to be classified as a place cell. If the increase in threshold is large enough, the sensitivity of the Stability method will therefore decrease, classifying fewer place cells, while increasing the specificity, meaning fewer non-place cells will be falsely marked as place cells. Indeed, we saw a similar effect on specificity for the Stability method when all place fields in the population were in the same location, causing an increased correlation across the population (S7I Fig).
In addition to correlations of activity across the population of pyramidal cells, network dynamics may also cause the activity of a cell in a given traversal to depend on its own prior activity (e.g. if a cell fires in traversal n, it might be more likely to fire in traversal n+1). Such an intracell dependence will affect the Peak, Combination and Information methods in the same way as they are affected by altering the reliability (i.e. how much activity varies across location across all traversals), as these methods classify place cells based on the average fluorescence map across all traversals, and do not take individual traversals into account. However, the Stability method may be affected if such dependency between traversals causes a cell to lose or gain a place field, or if the place field shifts position between the first and second half of the session, as demonstrated in S8 Fig. Therefore, if one expects strong network dynamics to be present in a population of place cells, we recommend using caution when employing the Stability method.
In conclusion, because place cells have a more variable activity pattern than was originally thought, particularly across the large populations and range of experimental paradigms permitted by calcium imaging, classification methods should be sufficiently able to identify cells that vary in terms of the size, and reliability and variability of their place field location. However, the different methods we tested select largely different populations of cells which differ in key characteristics, highlighting that choice of place cell classification method is critical for the conclusions a study will draw as to the nature of place cells. We provide model place cell code to help researchers test their how their chosen methods or experimental manipulations might affect detection and the properties of place cells in their data. However, we suggest that consensus in the field for an identification method would help inter-study comparability. Overall, we found that the Peak method demonstrated the optimal high selectivity and specificity for selecting model place cells that was robust to moderate changes in place field properties but decreased appropriately as the reliability and variability for the place field decreased. It detected many place cells in a real dataset and these cells carried more mutual information about location than non-place cells, but without the concerns of false positives of the Information method. The Peak method has previously been successfully applied to electrophysiological recordings [28], and we therefore would predict that the properties of place cells in imaging data detected using the Peak method will most accurately reflect the properties of place cells detected in a similar manner in electrophysiological studies. Because of its simplicity and lack of assumptions about the spatial information held by place and non-place cells, for most experimental designs we would therefore recommend use of the Peak method for classifying place cells in calcium imaging data, but advise that whichever method is chosen, experimenters consider the likely impact of that method choice on the cells identified.
Materials and methods
Ethics statement
Experiments were approved by the UK Home Office, in accordance with the 1986 Animal (Scientific Procedures) Act as well as the University of Sussex Animal Welfare Ethical Review Board.
Animals
Experiments used four C57/BL6 mice (2 female, 2 male) expressing the genetically-encoded calcium indicator GCaMP6f under the control of a Thy-1 promoter (C57BL/6J-Tg(Thy1-GCaMP6f)GP5.5Dkim/J). The mice were housed in a 12h reverse dark/light cycle environment at a temperature of 22°C and were given ad libitum access to food and water.
Hippocampal cranial window surgery
Surgery was performed when mice were a minimum age of eight weeks. Before surgery, mice received subcutaneous injections of dexamethasone (60 μL, 2mg/mL), saline (400 μL) and buprenorphine (40 μL, 0.3mg/mL diluted 1:10 in saline) to reduce inflammation, for hydration, and pain relief respectively. Mice were maintained at 0.8–2.0% isofluorane anaesthesia for the duration of the surgery. Body temperature was maintained at 37°C using a homeothermic blanket (PhysioSuite, Kent Scientific Corporation). A craniotomy was inserted above dorsal CA1 as previously described [29]. Briefly, the skin above the skull was removed and the skull was scored to increase the surface area for binding dental cement. A custom-made stainless steel headplate was then fixed to the skull with black dental cement (Unifast Powder mixed with black ink (1:15 w/w) and Unifast Liquid). A 3 mm diameter craniotomy was then performed 2mm posterior to bregma and 1.5 mm lateral to the sagittal suture. Following the removal of the skull flap and the dura, brain tissue overlying the hippocampus was aspirated (New Askir 30, CA-MI Srl) until vertical striations of the corpus callosum were visible. We then inserted a custom 3D printed cannula (2.4 mm ID, 3 mm OD, 1.5 mm height) made of a biocompatible Dental SG resin (FormLabs) so that the glass coverslip at the bottom of the cannula lay directly on top of the brain tissue. The top of the cannula had a rim (0.2mm height, 3 mm OD) resting on top of the skull, which was attached using tissue adhesive (3M VetBond) and then covered with more dental cement. A rubber ring was then attached on top of the headplate for subsequent use as a well for the water needed for the water-immersion microscope objective. The mice were given an injection of meloxicam (125 μL, 5 mg/ml) as an analgesic near the end of the surgery and then received meloxicam (200 μL, 1.5 mg/mL) for 4 days following the surgery via oral admission. Their health was monitored and they were weighed daily.
Two-photon imaging
Habituation
A week or more after surgery, the mouse was habituated to the imaging rig by head-fixing it for an increasing amount of time each day for at least a week before it was imaged. During the habituation it was also presented with the virtual reality environment several times to make it familiar with this setup.
Imaging rig (S2 Fig)
The mice were head-fixed above a polystyrene cylinder, on which they could run. The cylinder was fitted with a rotary encoder (Kübler, 4096 pulses per revolution). Two screens in front of the mice were used to display a custom virtual reality (VR) environment designed using ViRMEn [46].
Stimulus presentation
The virtual reality environment presented to the mice was a wide corridor, 200 cm long and 80 cm wide, with patterned walls (30 cm high) and floor (see S2 Fig). Three sets of objects (spatial cues) were present outside the walls: blue square pillars with white stripes, light blue cones with white and gray diagonal stripes and grey cylinders with green dots. The objects were placed at 65 cm, 140 cm and 200 cm from the start of the corridor. All objects were 100 cm high and visible from the start of the arena. Both before and after the wide corridor was a dark grey tunnel with a diameter of 30 cm, 50 cm long before the corridor and 45 cm long after the corridor) which served to allow smooth transitions between multiple presentations of the environment. The mice were not required to perform a task while in the virtual environment.
Data acquisition
The stratum pyramidale of dorsal CA1 was imaged using a two-photon microscope (Scientifica) with a water-immersion objective (CFl75 LWD 16X W, Nikon; 0.80 numerical aperture, 3 mm working distance). GCaMP6f was excited using a Chameleon Vision II Ti:Sapphire laser (Coherent) at a wavelength of 940nm with a gallium arsenide phosphide photomultiplier tube. We used the ScanImage software (Vidrio Technologies, MATLAB) to control the microscope and collect data. The stratum pyramidale was identified from the presence of densely packed cell bodies. Image acquisition used a wide field-of-view (547 x 547 μm) at a low resolution to optimise the acquisition rate (128x128 pixels, 7.51Hz, pixel size 4.27 μm). Sessions lasted between 44 and 45 minutes.
Image analysis
Preprocessing
Preprocessing was conducted using Suite2P software [31]. Firstly, images were registered using the default settings, then regions of interest (ROIs) corresponding to pyramidal cell bodies were identified based on their morphology (having a diameter of approximately 2 pixels/8.5 μm) and a tau, the decay time for the calcium indicator, of 0.8. We trained a classifier by manually curating the detected ROIs based on the mean image of the original recording, the shape and the activity pattern of the ROI. On average 58 +/- 4% of ROIs were excluded per imaging session. We obtained the calcium signal corrected for neuropil activity for each ROI from the Suite2P output.
For each ROI, fluorescence time courses were normalised to baseline fluorescence by dividing the whole trace by the average intensity in that ROI during the first 100 frames of the recording. For calculations of fluorescence maps, any frames where the mouse was stationary were excluded (defined as the speed being below 10% of the maximum speed).
An extra pre-processing step was used in Dombeck et al. [11] and associated papers, described in full in [12], so we at first used this step as well when replicating this method (hereafter referred to as the Combination method). After ROI extraction and normalisation the whole time series was divided by the baseline, which was defined as the 8th percentile of values in each ~15 second interval. Significant transients were then identified as calcium events that started when fluorescence deviated more than 2 standard deviations from the baseline and ended when the fluorescence returned to less than 0.5 standard deviations from the baseline. Fluorescence outside of the significant events was set to 0. However, we noticed that this preprocessing step led to place cell activity appearing negative, and thus these cells being rejected, if their activity was shorter than 15s and occurred in the presence of a negative baseline. For our data, this led to all cells being rejected at this stage. We therefore did not use this preprocessing method in our analyses.
Subsequently, to test whether the lack of preprocessing explained the low number of cells identified using this method, we amended the preprocessing method to correct for slow drifts in the baseline while preventing division by a negative baseline, by subtracting rather than dividing by the baseline. This caused a significant increase in the sensitivity of the Combination method compared to non-preprocessed traces (S7A Fig).
Model data generation
We generated model place cells to test the performance of the place cell detection methods. Time series of calcium responses of model cells were generated using real locomotion traces of mice running through a linear virtual environment. 8 datasets containing 184 traversals were split into separate traversals and model locomotion traces were generated by randomly selecting the required number of traversals (each traversal could be selected more than once). Model place cell properties (described below) were convolved with these locomotion traces to generate a fluorescence map for each cell, with the same “frame rate” as used in the real imaging sessions used to acquire locomotion (7.51 Hz).
For each dataset, we included 20 model place cells–in which fluorescence was modulated by spatial location–and 80 non-place cells–whose fluorescence was independent of location. This ratio was chosen to mimic the percentage of place cells typically reported in experiments using a one-dimensional track and two-photon microscopy [11]. The inclusion of non-place cells was crucial as some of the place cell detection methods use comparisons with other cells in their definition, and thus rely on the population containing non-place cells as well as place cells.
For the model place cells each place field was modelled as a 1D Gaussian field centred at equidistant locations covering the entire environment, mimicking previously reported place cell populations [11,41] (Fig 2A). The sigma of the Gaussian was set to 12.5 cm, such that 95% of values– 4 times sigma–fall within the place field width of 50 cm, the average place field width reported by Dombeck et al. [11]. The peak of the Gaussian (1.3) was determined using the top 10% of each cell’s fluorescence in its fluorescence map from 992 cells from 8 datasets.
The noise in all cells was modelled using a Poisson distribution (generated using the MATLAB poissrnd function), with lambda estimated from the raw traces of 992 cells from 8 datasets. The median lambda of the 10% of cells that had the best Poisson fit (235.1, as estimated from the sum of squared errors; SSE) was used as the lambda for our model noise. Raw noise was generated using this parameter, then ΔF/F of this noise was calculated to obtain the normalised noise used in the model cells. The average ΔF/F of the noise, as tested on 10000 traces each with a length of 1000, was 0.0024 +- 0.0467, which is 0.18% of the peak value.
Non-place cell traces usually consisted of only noise (Fig 2B, top 80 cells), generated as above, while the noise was added to the generated place field for the place cells (Fig 2B, bottom 20 cells). For S7 Fig, we also considered the impact of non-spatial firing of non-place cells. In our real data, there were on average 0.0062 peaks per frame, i.e. a calcium peaks occurred about every 160 frames. We therefore randomly added a range of peaks to non-place cell traces, from 0–0.02 peaks per frame.
Manipulation of place cells
We manipulated the place cell properties in order to model the imperfect nature of real place cells. We varied the place field width, peak, reliability, spatial variability and the number of place fields per place cell. We performed further simulations where we varied the percentage of place cells, the occurrence of random calcium peaks and the coverage of the environment by the place fields.
Place field width
The place field width was varied by varying the sigma of the Gaussian field for each place cell.
Place field peak
The place field peak was varied by scaling the Gaussian model using a single scalar. This way, the shape of the Gaussian remained, while the overall peak could be increased or decreased.
Number of place fields
We varied the number of place fields between 1 and 4, spaced to cover the whole environment but with no overlap. The upper limit of 4 place fields was therefore set by the size of the place field (50 cm) and the environment length (2 m).
Reliability
We defined the reliability of a place cell as the probability it will have a place field in a given traversal. The probability Pfield was between 0 and 1, where Pfield = 0 meant the place cells did not have a place field in any traversal, and Pfield = 1 meant the place cells had place fields in every traversal. At a probability between the 0 and 1 the place cells had place fields in a randomly selected proportion of traversals equal to Pfield times the total number of traversals.
Spatial variability
We defined the variability of a place cell as the average deviation of the place field per traversal from the centre of the average place field. We modelled this by defining a Gaussian centered around the centre of the average place field, with a flatter Gaussian (i.e. higher sigma) equating to a higher variability. For each traversal we drew a value from this Gaussian distribution to be the centre of the place field for that traversal.
Percentage of place cells
The percentage of cells that were designated as place cells out of 100 total cells was varied.
Occurrence of random calcium peaks
We varied the occurrence of random calcium peaks in the control cells alone (S7D–S7F Fig) or all cells (S7J–S7L Fig). The occurrence in a measure of peaks per frame was measured, and this number was used as the probability for any given frame to contain a calcium peak, to create an occurrence map. This occurrence map was then convoluted with the calcium shape extracted from our real data, to create a realistic calcium peak.
Place field coverage
In the default simulations the place fields of the place cells were at equidistant locations covering the entire environment. We performed an additional simulation where the place fields of all place cells were in the same location, thus not covering the entire environment.
Performance measures
To calculate the performance of the place cell detection methods, we calculated the sensitivity and specificity of each method using the number of true positives (TP), true negatives (TN), false positives (FP) and false negatives (FN). The sensitivity is a measure of how well the method is able to find all the true place cells in the dataset, while the specificity is a measure of how specific the method is for identifying just true place cells without false positives.
(1) |
(2) |
Place cell detection methods
We tested four methods for place cell detection (S1 Fig) all of which have all been used in previous studies to identify place cells.
Peak method
This method of place cell detection was described for electrophysiology data from mice running through a 1D virtual corridor [22]. We adapted the original method for use with fluorescence data as follows: We first calculated the fluorescence maps (the average fluorescence in each location bin) for each cell from which we determined the peak fluorescence for each cell. The neuronal fluorescence data was then randomly shuffled 500 times relative to the location data by shifting the fluorescence data in time randomly by at least 5 seconds. Because the running speed of the mouse is not constant, this alters the fluorescence at each location and therefore the “peakiness” of the fluorescence map. Each cell’s fluorescence map and peak fluorescence was then determined for each shuffle. Any cell with a true peak fluorescence in the top 1% of all shuffles was deemed a place cell. Thus, the peak method detects cells with high fluorescence in a place field compared to the baseline.
Stability method
The stability method was developed by O’Leary [23] and is based on classic methods of detecting place cells in real-world two-dimensional (2D) environments which require place cells to have a consistent place field over multiple traversals (e.g. [3]). First, a separate fluorescence map was calculated for each cell for each of the two halves of a recording session and the linear correlation between these two fluorescence maps was calculated. These correlation coefficients were then compared to control values obtained by comparing the fluorescence map of the first half of a session for that cell with the fluorescence maps of the second half of other randomly selected cells in the dataset (100 repeats per cell with redraws). The within-cell correlation of the cell was compared to all the shuffles for that cells, and if the correlation was above the 95th percentile of the shuffles, it was deemed a place cell.
Combination method
The Combination method [11,19,20] uses a combination of the level of fluorescence above baseline, with stability of firing over different traversals. It uses pre-processed fluorescence traces of cells that have been thresholded so they only include significant transients, followed by a number of thresholding steps to find “true” place fields. This method has been modified over the three publications cited above, the most recent of which was used here. First, the fluorescence map was calculated from the preprocessed traces for each cell and possible place fields were determined by thresholding the fluorescence map with a cut-off value of 0.25 times the difference between the peak fluorescence value and the baseline. Possible place fields were defined as having above-threshold fluorescence in contiguous locations for at least 20 cm and less than 120 cm. Each field was also required to have one bin with a value of at least 10% of the mean fluorescence of that cell over the session. The mean fluorescence in each place field was then divided by the mean fluorescence outside of the place field, and cells were only deemed place cells if the in-field/out-field ratio was higher than or equal to 4. Lastly, the cells were required to have a significant transient, as defined in the pre-processing thresholding step, in at least 20% of the traversals of the environment. All traces were shuffled 1000 times with respect to location and classified using the above methods. Only cells that were classified as place cells in fewer than 5% of the shuffles were considered to be true place cells. Thus, the Combination method requires place cells to significantly increase fluorescence from baseline over a contiguous place field, with some stability of responding over time.
Information method
This method of place cell detection has been used in freely moving mice running either through a square or circular environment [24], or a corridor [27]. The original method relied on the detection of calcium events, but to reduce the effect of such preprocessing we adapted the method to be applied directly to the relative fluorescence. As using the fluorescence directly has been shown to accurately reflect the spatial information [34], we do not expect this to negatively impact the method’s ability to detect place cells. We first calculated the fluorescence maps (the average fluorescence in each location bin) for each cell from which we determined the spatial information using Eq 3, where N is the number of bins, fi is the fluorescence in bin i of the fluorescence map, and f is the average fluorescence across the map. For the spatial information we assumed a uniform occupancy (i.e. that the mouse spent the same amount of time in each location bin). The neuronal fluorescence data was then randomly shuffled 500 times relative to the location data by shifting the fluorescence data in time randomly by at least 5 seconds, the same procedure we employed for the Peak method. Each cell’s fluorescence map and spatial information was then determined for each shuffle. Any cell with spatial information in the top 5% of all shuffles was deemed a place cell. Thus, the peak method detects cells with high level of spatial information in a place field compared to the baseline.
(3) |
Model cell properties
The way in which varying the different characteristics of model place cells affects their properties was illustrated (S3 Fig). By comparing real cell properties (e.g. of FWHM) to the modeled variables (e.g. width), experimenters can predict the impact of their choice of place cell classification method on detection of their real world cells.
Full width at half maximum
We used the full width at half maximum (FWHM) as representation of the place field width. We calculated the maximum value within the fluorescence map, and then determined the width of the place field at half this value. Notably, this value will be lower than the width defined in the model, because the FWHM is a conservative representation of the width.
Stability
The stability was again defined as the correlation coefficient between the fluorescence maps of the first and the second half of the session, as used in the Stability method.
Mutual information
Mutual information between the fluorescence traces and the location of the animal was calculated using Eq 3, as described above.
Out/in ratio
The out/in ratio was the mean fluorescence outside of the place field divided by the fluorescence within the place field, and is a measure of the signal to noise ratio of the place field. A lower number represents a higher signal to noise ratio.
Place cell properties
The place cells were characterized using several of the Suite2P outputs (ROI size, average and maximum spiking rate) [31], in addition to characteristics that were calculated using custom analyses:
Mutual information
Mutual information between the fluorescence traces and the location of the animal was calculated using Eq 3, as described above.
Cell-cell distance
The cell-cell distance was calculated as the mean distance in pixels between the centre of the ROIs for all cells of one type (i.e. place cell or non-place cell) within the field of view.
Peak intensity
The peak intensity was the size of the largest peak (in ΔF/F) in the fluorescence cell, as used in the Peak method.
Stability
The stability as defined as the correlation coefficient between the fluorescence maps of the first and the second half of the session, as used in the Stability method.
Peak percentile
The peak percentile was the percentile score of the peak intensity compared to the peak intensity of the shuffles, as used in the Peak method.
Stability percentile
The peak percentile was the percentile score of the stability compared to the stability of the shuffles, as used in the Stability method.
Statistical analysis
All statistical tests were conducted in R [47]. Where appropriate, a Shapiro–Wilk test was used to test the data for normality. If the data was determined not to deviate from a normal distribution (p>0.05), we performed the appropriate parametric test, otherwise a non-parametric test was applied. The tests performed for each comparison are detailed in the text. Linear mixed models were performed in R using the lme4 package (version 1.1–23). All other statistical tests were performed in R using the rstatix package (version 0.6.0).
Supporting information
Acknowledgments
With thanks to Alice O’Leary and Daniel Dombeck for sharing their code. We would like to thank O. Hall-Bird and M. Hall-Bird for their insights and useful suggestions on this project.
Data Availability
All data files are available from the Figshare repository (DOI: 10.6084/m9.figshare.13560548). Model generation and analysis code is available from the GitHub repository (https://github.com/DoriMG/place_cell_methods), or linked from www.brainenergylab.com.
Funding Statement
This work was supported by a Sussex Neuroscience PhD studentship for D.M.G, a MRC Discovery Award (MR/S026495/1; mrc.ukri.org) for K.S. and C.N.H, an Academy of Medical Sciences/Wellcome Trust Springboard Award (acmedsci.ac.uk) for C.N.H., a MRC Project grant (MR/S026495/1) for C.N.H. and a Wellcome Senior Research Fellowship (212281/Z/18/Z; Wellcome.org) for C.B.. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
References
- 1.O’Keefe J. Place units in the hippocampus of the freely moving rat. Exp Neurol. 1976;51(1):78–109. doi: 10.1016/0014-4886(76)90055-8 [DOI] [PubMed] [Google Scholar]
- 2.McNaughton BL, Barnes CA, O’Keefe J. The contributions of position, direction, and velocity to single unit activity in the hippocampus of freely-moving rats. Exp brain Res. 1983;52(1):41–9. doi: 10.1007/BF00237147 [DOI] [PubMed] [Google Scholar]
- 3.Anderson MI, Jeffery KJ. Heterogeneous modulation of place cell firing by changes in context. J Neurosci. 2003;23(26):8827–35. doi: 10.1523/JNEUROSCI.23-26-08827.2003 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Wilson MA, McNaughton BL. Dynamics of the hippocampal ensemble code for space. Science (80-). 1993;261(5124):1055–8. [DOI] [PubMed] [Google Scholar]
- 5.Fenton AA, Kao H-Y, Neymotin SA, Olypher A, Vayntrub Y, Lytton WW, et al. Unmasking the CA1 ensemble place code by exposures to small and large environments: more place cells and multiple, irregularly arranged, and expanded place fields in the larger space. J Neurosci. 2008;28(44):11250–62. doi: 10.1523/JNEUROSCI.2862-08.2008 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Cacucci F, Yi M, Wills TJ, Chapman P, O’Keefe J. Place cell firing correlates with memory deficits and amyloid plaque burden in Tg2576 Alzheimer mouse model. Proc Natl Acad Sci. 2008;105(22):7863–8. doi: 10.1073/pnas.0802908105 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Grieves RM, Jedidi-Ayoub S, Mishchanchuk K, Liu A, Renaudineau S, Jeffery KJ. The place-cell representation of volumetric space in rats. Nat Commun. 2020;11(1):1–13. doi: 10.1038/s41467-019-13993-7 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Huxter J, Burgess N, O’Keefe J. Independent rate and temporal coding in hippocampal pyramidal cells. Nature. 2003;425(6960):828. doi: 10.1038/nature02058 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Brun VH, Otnæss MK, Molden S, Steffenach H-A, Witter MP, Moser M-B, et al. Place cells and place recognition maintained by direct entorhinal-hippocampal circuitry. Science (80-). 2002;296(5576):2243–6. doi: 10.1126/science.1071089 [DOI] [PubMed] [Google Scholar]
- 10.Hayman RMA, Chakraborty S, Anderson MI, Jeffery KJ. Context-specific acquisition of location discrimination by hippocampal place cells. Eur J Neurosci. 2003;18(10):2825–34. doi: 10.1111/j.1460-9568.2003.03035.x [DOI] [PubMed] [Google Scholar]
- 11.Dombeck DA, Harvey CD, Tian L, Looger LL, Tank DW. Functional imaging of hippocampal place cells at cellular resolution during virtual navigation. Nat Neurosci. 2010; doi: 10.1038/nn.2648 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Dombeck DA, Khabbaz AN, Collman F, Adelman TL, Tank DW. Imaging large-scale neural activity with cellular resolution in awake, mobile mice. Neuron. 2007;56(1):43–57. doi: 10.1016/j.neuron.2007.08.003 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Kinsky NR, Sullivan DW, Mau W, Hasselmo ME, Eichenbaum HB. Hippocampal place fields maintain a coherent and flexible map across long timescales. Curr Biol. 2018;28(22):3578–88. doi: 10.1016/j.cub.2018.09.037 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Cohen JD, Bolstad M, Lee AK. Experience-dependent shaping of hippocampal CA1 intracellular activity in novel and familiar environments. Elife. 2017;6:e23040. doi: 10.7554/eLife.23040 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Chen G, King JA, Lu Y, Cacucci F, Burgess N. Spatial cell firing during virtual navigation of open arenas by head-restrained mice. Elife. 2018;7:e34789. doi: 10.7554/eLife.34789 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Gauthier JL, Tank DW. A dedicated population for reward coding in the hippocampus. Neuron. 2018;99(1):179–93. doi: 10.1016/j.neuron.2018.06.008 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Villette V, Malvache A, Tressard T, Dupuy N, Cossart R. Internally recurring hippocampal sequences as a population template of spatiotemporal information. Neuron. 2015;88(2):357–66. doi: 10.1016/j.neuron.2015.09.052 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Chen T-W, Wardill TJ, Sun Y, Pulver SR, Renninger SL, Baohan A, et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature. 2013;499(7458):295. doi: 10.1038/nature12354 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Rickgauer JP, Deisseroth K, Tank DW. Simultaneous cellular-resolution optical perturbation and imaging of place cell firing fields. Nat Neurosci. 2014; doi: 10.1038/nn.3866 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Sheffield MEJ, Adoff MD, Dombeck DA. Increased prevalence of calcium transients across the dendritic arbor during place field formation. Neuron. 2017;96(2):490–504. doi: 10.1016/j.neuron.2017.09.029 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Dong C, Madar AD, Sheffield MEJ. Distinct place cell dynamics in CA1 and CA3 encode experience in new environments. Nat Commun. 2021;12(1):1–13. doi: 10.1038/s41467-020-20314-w [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Fournier J, Saleem AB, Diamanti EM, Wells MJ, Harris KD, Carandini M. Modulation of visual cortex by hippocampal signals. bioRxiv. 2019;586917. [Google Scholar]
- 23.O’Leary A, Muessig L, Wills T, Cacucci F, Barry C. Cortical and Cortico-Hippocampal Circuits: Spatial Navigation III. Soc Neurosci 2019. 2019;Chicago, I(2019 Neuroscience Meeting Planner).
- 24.Ziv Y, Burns LD, Cocker ED, Hamel EO, Ghosh KK, Kitch LJ, et al. Long-term dynamics of CA1 hippocampal place codes. Nat Neurosci. 2013;16(3):264. doi: 10.1038/nn.3329 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Mao D, Molina LA, Bonin V, McNaughton BL. Vision and locomotion combine to drive path integration sequences in mouse retrosplenial cortex. Curr Biol. 2020;30(9):1680–8. doi: 10.1016/j.cub.2020.02.070 [DOI] [PubMed] [Google Scholar]
- 26.Duvelle É, Grieves RM, Liu A, Jedidi-Ayoub S, Holeniewska J, Harris A, et al. Hippocampal place cells encode global location but not connectivity in a complex space. Curr Biol. 2021;31(6):1221–33. doi: 10.1016/j.cub.2021.01.005 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Sheintuch L, Geva N, Baumer H, Rechavi Y, Rubin A, Ziv Y. Multiple maps of the same spatial context can stably coexist in the mouse hippocampus. Curr Biol. 2020;30(8):1467–76. doi: 10.1016/j.cub.2020.02.018 [DOI] [PubMed] [Google Scholar]
- 28.Fournier J, Saleem AB, Diamanti EM, Wells MJ, Harris KD, Carandini M. Mouse Visual Cortex Is Modulated by Distance Traveled and by Theta Oscillations. Curr Biol. 2020; doi: 10.1016/j.cub.2020.07.006 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Harvey CD, Collman F, Dombeck DA, Tank DW. Intracellular dynamics of hippocampal place cells during virtual navigation. Nature. 2009;461(7266):941. doi: 10.1038/nature08499 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Fenton AA, Muller RU. Place cell discharge is extremely variable during individual passes of the rat through the firing field. Proc Natl Acad Sci U S A [Internet]. 1998. Mar 17;95(6):3182–7. Available from: https://pubmed.ncbi.nlm.nih.gov/9501237 doi: 10.1073/pnas.95.6.3182 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Pachitariu M, Stringer C, Dipoppa M, Schröder S, Rossi LF, Dalgleish H, et al. Suite2p: beyond 10,000 neurons with standard two-photon microscopy. Biorxiv. 2017;61507. [Google Scholar]
- 32.Skaggs WE, McNaughton BL, Gothard KM. An information-theoretic approach to deciphering the hippocampal code. In: Advances in neural information processing systems. 1993. p. 1030–7. [Google Scholar]
- 33.Etter G, Manseau F, Williams S. A probabilistic framework for decoding behavior from in vivo calcium imaging data. Front Neural Circuits. 2020;14:19. doi: 10.3389/fncir.2020.00019 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Climer JR, Dombeck DA. Information theoretic approaches to deciphering the neural code with functional fluorescence imaging. bioRxiv. 2020; [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Meshulam L, Gauthier JL, Brody CD, Tank DW, Bialek W. Collective behavior of place and non-place neurons in the hippocampal network. Neuron. 2017;96(5):1178–91. doi: 10.1016/j.neuron.2017.10.027 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Park E, Dvorak D, Fenton AA. Ensemble place codes in hippocampus: CA1, CA3, and dentate gyrus place cells have multiple place fields in large environments. PLoS One. 2011;6(7):e22349. doi: 10.1371/journal.pone.0022349 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Hussaini SA, Kempadoo KA, Thuault SJ, Siegelbaum SA, Kandel ER. Increased size and stability of CA1 and CA3 place fields in HCN1 knockout mice. Neuron. 2011;72(4):643–53. doi: 10.1016/j.neuron.2011.09.007 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Maurer AP, VanRhoads SR, Sutherland GR, Lipa P, McNaughton BL. Self-motion and the origin of differential spatial scaling along the septo-temporal axis of the hippocampus. Hippocampus. 2005;15(7):841–52. doi: 10.1002/hipo.20114 [DOI] [PubMed] [Google Scholar]
- 39.Jung MW, Wiener SI, McNaughton BL. Comparison of spatial firing characteristics of units in dorsal and ventral hippocampus of the rat. J Neurosci. 1994;14(12):7347–56. doi: 10.1523/JNEUROSCI.14-12-07347.1994 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Muller RU, Kubie JL. The effects of changes in the environment on the spatial firing of hippocampal complex-spike cells. J Neurosci. 1987;7(7):1951–68. doi: 10.1523/JNEUROSCI.07-07-01951.1987 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Bourboulou R, Marti G, Michon F-X, El Feghaly E, Nouguier M, Robbe D, et al. Dynamic control of hippocampal spatial coding resolution by local visual cues. Elife. 2019;8:e44487. doi: 10.7554/eLife.44487 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Saleem AB, Diamanti EM, Fournier J, Harris KD, Carandini M. Coherent encoding of subjective spatial position in visual cortex and hippocampus. Nature. 2018;562(7725):124–7. doi: 10.1038/s41586-018-0516-1 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Dombeck DA, Reiser MB. Real neuroscience in virtual worlds. Curr Opin Neurobiol. 2012;22(1):3–10. doi: 10.1016/j.conb.2011.10.015 [DOI] [PubMed] [Google Scholar]
- 44.Aghajan ZM, Acharya L, Moore JJ, Cushman JD, Vuong C, Mehta MR. Impaired spatial selectivity and intact phase precession in two-dimensional virtual reality. Nat Neurosci. 2015;18(1):121. doi: 10.1038/nn.3884 [DOI] [PubMed] [Google Scholar]
- 45.Navratilova Z, Hoang LT, Schwindel CD, Tatsuno M, McNaughton BL. Experience-dependent firing rate remapping generates directional selectivity in hippocampal place cells. Front Neural Circuits. 2012;6:6. doi: 10.3389/fncir.2012.00006 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Aronov D, Tank DW. Engagement of neural circuits underlying 2D spatial navigation in a rodent virtual reality system. Neuron. 2014;84(2):442–56. doi: 10.1016/j.neuron.2014.08.042 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47.Team RC. R: A language and environment for statistical computing. 2013; [Google Scholar]