A novel ambient temperature preference test.

A Schematic of the chamber preference test from the top. Grey outlines the outer enclosure and the dashed line the internal cage. Peltier elements (grey oval shapes) were combined with fans for precise control of the temperature. See Figure S1 for a more detailed view. B A representative image of an animal exploring the chambers. Coloured dots represent the tracked keypoints on the animal and reference points in the enclosure. C Tracking of an example animal for 30 minutes at 31 °C (right chamber) and 34 °C (left chamber). D Density maps of the x-position of the animal in C over 30 minutes; binned in three-minute long intervals, concatenated, and interpolated. Dashed lines represent the tunnel connecting both chambers. E Density maps as in D with one-minute bins of all animals from wildtype (n = 48), Trpv1-/- (n = 15) and Trpm2-/- (n = 28) genotypes. F Proportion of time spent in the test chamber for animals shown in E over time, binned in three-minute long intervals. * (p <0.05), ** (p <0.01). See Table S2 for statistical details. G Exemplary behaviour of the animal in C and D over the first 120 seconds of the experiment, highlighting the visit frequency and duration of time spent in each chamber. The dashed line represents the tunnel connecting the chambers. H Overview of the frequency and length of the visits to the test chamber for 15 randomly sampled animals per genotype, shown in E. Each visit is coloured by the log2 of its length to highlight varying visit lengths.

Loss of TRPV1 or TRPM2 leads to a reduction in WSN abundance.

A Experimental paradigm of temperature stimulation. Three sequential and increasing temperature stimuli of 25 seconds, with 5 minute inter-stimulus intervals. Traces represent mean temperatures for wildtype, Trpv1-/-, and Trpm2-/- cultures. B Heat map showing representative normalized (ΔF/F0) calcium response of WSNs (60 randomly sampled cells per genotype). C Zoom-in of the mean and standard deviation of the three warm-temperature stimuli shown in A. D The proportions of responders to each stimulus in relation to all imaged neurons from wildtype (7 animals, 21 FOVs, 6928 cells), Trpv1-/- (5 animals, 17 FOVs, 5410 cells), and Trpm2-/- (6 animals, 18 FOVs, 6131 cells). Each dot represents a field of view (FOV). * (p <0.05), ** (p <0.01), *** (p <0.001). See Table S2 for statistical details.

Trpv1-/- diminishes the response to dynamic temperature changes.

A Temperature traces from three exemplary imaging sessions. B Individual calcium traces (ΔF/F0) of 10 representative thermosensitive neurons from each genotype in response to the applied stimuli. The position of the dashed line indicates the time when the cells exceeded 10 % of their maximum ΔF/F0 during the stimulus. C Mean and standard deviation of the three warm-temperature stimuli shown in A. The dotted line indicates the separation between the dynamic and static phases, defined by the end of the peak of the smoothed temperature change rate. D Response onset of all recorded WSNs. Each row represents a single FOV (see Figure 2D). Each triangle indicates the time point at which the individual cell responds to the stimulus as shown in B. Dotted line as in C. E Density plot of response time points for each genotype and stimulus. * (p <0.05), **** (p <0.0001). See Table S2 for statistical details.

High TRPV1 expression levels promote dynamic warm-temperature detection and enhance temperature preference.

A Mean temperatures from all experiments and imaging sessions for wildtype (3 animals, 6 FOVs, 3133 cells) and Trpv1OX (2 animals, 5 FOVs, 3754 cells) cultures. B Examples of normalized (ΔF/F0) calcium responses of WSNs responding to any of the stimuli depicted in A. 42 randomly sampled cells from each genotype. C Mean and standard deviation of the three warm-temperature stimuli applied. The dotted line indicates the separation between the dynamic phase and the static phase (see Figure 3C). D Response initiation of all WSNs imaged from wildtype and Trpv1OX animals. Each row represents an individual imaging session. Each triangle denotes the time point at which the cell responds to the stimulus, as shown in Figure 3B. Dotted line as in C. E Density representation of response time points for each genotype and stimulus.F Density maps of all wildtype (n = 48) and Trpv1OX (n = 12) animals in the CPT over time. G Proportion of time spent in the test chamber for animals shown in F over time, binned in 3-minute intervals. H Overview of the frequency and length of the visits to the test chamber for all animals shown in F. Each visit is coloured by the log2 of its length to highlight varying visit lengths. * (p <0.05), ** (p <0.01), *** (p <0.001). See Table S2 for statistical details.

Modelling the varying roles of TRPV1 and TRPM2 on warm-temperature detection.

A Two example episodes of an animal inside the CPT, crossing from one chamber to the other (see Figure 1G). Dashed line represents crossing time points between chambers. B Examples of possible evidence accumulation process for the two episodes in A using a Drift Diffusion Model (DDM). C and D Simulations of a drift diffusion process with fixed starting points (z = 0.5) and bound (a = 1) while varying drift rates (v in C) and noise (sv in D). E and F depict the resulting distributions of visit lengths when simulating 1000 trials with the parameters from C and D, respectively. G Distributions of visit lengths at 31 °C vs. 34 °C in wildtype animals. Insets show the estimated parameters for v and sv at each temperature and the Kullback-Leibler (KL) divergence between the model (continuous density line) and the empirical data (histogram). See Figure S5 for all model fits. H Drift v and noise sv estimates for both neutral (31 °C, solid line) and test (25 °C to 38 °C, dashed line) chambers for wildtype animals resulting from hierarchical Markov chain Monte Carlo (MCMC) sampling. I Neutral chamber (31 °C) corrected and wildtype-subtracted estimates of drift and noise for all genotypes. The dashed line represents the wildtype reference. Points indicate individual MCMC samples, and vertical lines the median of each distribution.

List of organisms, reagents, software, and algorithms used in the study.

Samples sizes and summary statistics. Only significant results (p < 0.05) shown. The exceptions are cases in which no statistically significant result was obtained in all comparisons of a test.

Establishing a novel ambient temperature preference test. Related to Figure 1.

A Schematic of the chamber preference test (CPT) from the top (upper panel) and side (lower panel). A styrofoam enclosure ensures adequate thermal isolation (grey shading). Peltier elements (dark grey ovals) equipped with fans allow the rapid circulation of heat throughout the chamber. Two wall thermometers allow monitoring and regulation of the chamber temperature in a closed-loop fashion. A steel cage (dashed pink line) marks the area where the animals move around freely. A stainless-steel floor (pink) allows easy clean-up and adaptation of the ambient temperature. A transparent top (blue) allows video recording and tracking of the animal position throughout the experiment. Two ambient and floor thermometers were used to calibrate the corresponding wall thermometer to achieve the desired ambient temperature in each chamber. B and D Exemplary temperature development at the beginning of an experimental day for each chamber and thermometer indicated in A. Neutral chamber set to 31 °C shown in D. Test chamber set to 38 °C shown in B. Insets C and E zoom-in onto the temperature recordings once the chambers stabilized (around 90 minutes of pre-warming). F Stability of ambient and wall temperature in chamber 1 (Ch1) and 2 (Ch2) when opening the enclosure to replace animals. The dashed line shows the time point of opening the enclosure. Floor temperature remained unaffected (data not shown). G Shown are wall, ambient, and floor temperatures at 31 °C neutral temperature and 34 °C or 38 °C test temperatures in chamber 1 (Ch1) and chamber 2 (Ch2). H Calculated ambient temperature gradient in the CPT at 31 °C neutral and 38 °C test temperatures. The dashed line shows the tunnel connecting both chambers. I Comparison of CPT and conventional TPT temperature preference assays in the same cohort of wildtype (n = 12) and Trpm2-/- (n = 17) animals, shown in CPT (Figure 1). J Density maps of the x-position of wildtype (n = 41) and thermally ablated animals (Trpv1Abl, n = 13) at 31 °C vs 34 °C. Binned in 1-minute bins, concatenated, and interpolated. Dashed lines represent the tunnel connecting both chambers. K Proportion of time spent on the test side of animals shown in J. L Overview of the frequency and length of the visits to the test chamber 7 randomly sampled animals from J and K. Each visit is coloured by the log2 of its length to highlight varying visit lengths. * (p <0.05), ** (p <0.01), *** (p <0.001). See Table S2 for statistical details.

Temperature preference behaviour of all genotypes to 25 °C including Trpm8-/- animals.

Related to Figure 1. A Density maps of the x-position of the animals shown in CPT (Figure 1) when given the choice of 25 °C and 31 °C (reference temperature), over time. B Proportion of time spent at 25 °C for animals from A. C Visit lengths to the 25 °C chamber over time for 11 randomly sampled animals per genotype from A. D Crossing behaviour of animals from CPT (Figure 1) at different testing temperatures, over time. Each row represents one of 11 randomly sampled animals from each genotype at the indicated temperatures. Each dot is a crossing event from one chamber to the other. The colour denotes the variability in crossing rate (crosses per minute) for each animal. E Density occupation map of the Trpm8-/- animals at different test temperatures, over time. F Proportion of time spent at test side in 3-minute bins of animals from E. Visit lengths to the 25 °C chamber over time for animals in E. G Overview of the frequency and length of the visits to the test chamber for 8 randomly sampled animals per genotype and temperatures from E. Each visit is coloured by the log2 of its length to highlight varying visit lengths. * (p <0.05), *** (p <0.001). See Table S2 for statistical details.

Comparison of culturing conditions for primary sensory neurons and their response to warm and hot temperatures.

Related to Figure 2. A and B Heat map showing normalized calcium responses (ΔF/F0) of individual cells (each row represents 1 cell) of a single FOV of 300 randomly sampled primary DRG neurons cultured overnight (A) or for three days (B) in response to 5 consecutive and increasing temperature stimuli. C Fraction of responding cells in relation to all imaged cells for overnight and three-day cultures in response to the temperature stimuli. Means and SEMs of overnight (4 animals, 8 FOVs, 2028 cells) and three-day (15 animals, 43 FOVs, 21149 cells) cultures. D Split violin plots showing the distributions of the maximum ΔF/F0 for all responding cells during each stimulus. E The post- and pre-stimulus difference for each cell in each stimulus for both conditions. A window of 25 seconds before and after each stimulus was used to calculate the mean ΔF/F0 for each window. A difference of 0 indicates that a cell was able to completely return to its baseline after responding to the stimulus. F The proportions of responders to each temperature stimulus in relation to all imaged neurons in cells cultured overnight from wildtype (4 animals, 8 FOVs, 2028 cells), Trpv1-/- (2 animals, 6 FOVs, 1714 cells), and Trpm2-/- (3 animals, 5 FOVs, 1816 cells). G and H Experimental paradigm of temperature stimulation. Five sequential and increasing temperature stimuli of 25 seconds with 5 minutes inter-stimulus intervals followed by capsaicin (1µM) and high potassium stimulation. Capsaicin was used to identify TRPV1-positive cells and high potassium to identify neuronal cells. The traces represent mean temperatures of the FOV shown in H. H Examples of normalized (ΔF/F0) calcium responses of temperature-sensitive cells sampled from all FOVs and experiments (n = 250 cells per genotype). I Mean and standard deviation of the five temperature stimuli applied. J The proportions of responders to each temperature stimulus in relation to all imaged neurons from wildtype (7 animals, 21 FOVs, 6928 cells), Trpv1-/- (5 animals, 17 FOVs, 5410 cells), and Trpm2-/- (6 animals, 18 FOVs, 6131 cells). Each dot represents an individual FOV. Note that the fraction of WSNs is small (6 ± 3 %) and therefore necessitates large sample sizes for robust estimations of effects caused by gain- and loss-of-function models. * (p <0.05), ** (p <0.01), *** (p <0.001). See Table S2 for statistical details.

Responses to dynamic and static segments of warm and hot temperature stimuli.

Related to Figures 3 and 4. A Mean and standard deviation of the five warm-temperature stimuli applied. The dotted line indicates the transition between the dynamic and the static phases of the temperature stimuli. B Response initiation of all temperature-responsive cells imaged. Each row represents a FOV. Each triangle denotes the time point at which the cell begins to respond to the stimulus. Dotted line as in A. C Density representations of response time points for each genotype and stimulus. D and E same as A and B, except that only wildtype DRG cultures are included; cells are separated into two subgroups based on their responsiveness to capsaicin (orange: responsive, grey: non-responsive). F Density estimates of the response time points shown in E. * (p <0.05), *** (p <0.001), **** (p <0.0001). See Table S2 for statistical details.

Model fits and DDM simulations for all genotypes and test temperatures.

A and B Comparison of different model parameter combinations. To ensure that the DDM only reaches the upper bound, the bias z was kept fixed to 0.9, while all other parameters were allowed to either be predictors or fit to the entire data (floating) (A). Model performance was compared and ranked by calculating the expected log pointwise predictive density (ELPD) by Pareto smoothed importance sampling leave-one-out cross-validation (LOO) (B). Horizontal error bars depict the standard error of the ELPD-LOO. The chosen model is indicated in red. C Density estimates and histograms for collected empirical data (histogram) and 1000 simulated trials (density – solid line) using the medians for drift and noise estimated for each genotype and chamber via Markov chain Monte Carlo (MCMC). Insets detail the temperature of the chamber, the used values for drift (v) and noise (sv), and the Kullback-Leibler divergence (KL) between the simulated distribution and the empirical data. D Simulated evidence accumulation processes for each genotype and test temperature for a 30-minute experiment. Parameters for drift, noise, and bound (starting point fixed to 0.88) were sampled randomly from the MCMC chains. Each line represents a trial. The plots are overlaid with a two-dimensional density of the resulting points, to highlight the general trajectory and the spread of the process.