Introduction

The data presented were generated using Gemini to be similar to a series of experiments completed during my MSc in Neuroscience (Svendsen, 2023) and were later published in the Journal of Pharmacology and Experimental Therapeutics (Svendsen et al., 2025). The data consist of confocal microscopy images of immunohistochemical staining for the neuronal activity marker cFos in L6-S1 spinal cord slices (Fig 1). The neurons within the spinal cord are discretely organized and the different layers receive signals from specific parts of the body. In this context, a larger number of cFos positive neurons located in the dorsal horn indicates greater nociceptive (pain) signalling from the stimulated tissue (Harris, 1998; Abdullah et al., 2020). This experiment used the dextran-sulfate sodium (DSS) model of inflammatory bowel disease (Chassaing et al., 2015) and examined the efficacy of a hypothetical Drug as treatment for the associated acute visceral pain. Mice were divided in four groups:

  1. Negative control mice received normal water and the drug vehicle (Water)
  2. Positive control mice received DSS adn the drug vehicle (DSS)
  3. Experimental group 1 which received DSS and Drug A (DrugA)
  4. Experimental group 2 which received DSS and Drug B (DrugB)
 Fig 1. Example images of immunohistochemical staining for the neuronal activity marker cFos in the lumbosacral dorsal horn from unpublished experiments

Fig 1. Example images of immunohistochemical staining for the neuronal activity marker cFos in the lumbosacral dorsal horn from unpublished experiments

#Library

library(tidyverse)
library(skimr)
library(car)
library(ggpubr)
library(RColorBrewer)
library(ggsignif)
library(rstatix)

Cleaning

Import and inspect data.

cfos.dat <- read.csv(file = "./Gemini_cFos.csv", header = T, sep =",")

summary(cfos.dat)
##   Condition             Count          Mouse          
##  Length:200         Min.   : 1.00   Length:200        
##  Class :character   1st Qu.:13.00   Class :character  
##  Mode  :character   Median :22.50   Mode  :character  
##                     Mean   :25.21                     
##                     3rd Qu.:37.00                     
##                     Max.   :50.00
glimpse(cfos.dat)
## Rows: 200
## Columns: 3
## $ Condition <chr> "DrugB", "DrugB", "DrugB", "DrugB", "DrugB", "DrugB", "DrugB…
## $ Count     <int> 14, 16, 23, 28, 17, 7, 32, 50, 29, 26, 13, 14, 7, 27, 16, 36…
## $ Mouse     <chr> "d21", "d21", "d21", "d21", "d21", "d22", "d22", "d22", "d22…

Rename headers and rename negative control.

cfos.dat <- cfos.dat %>% #lowercase headers
  rename_with(tolower)

cfos.dat[cfos.dat == "Vehicle"]<- "Water" #replace "Vehicle" with "Water"

Verify data types.

is.factor(cfos.dat$condiion)
## [1] FALSE
cfos.dat$condition = as.factor(cfos.dat$condition)
is.factor(cfos.dat$condition)
## [1] TRUE
is.factor(cfos.dat$mouse)
## [1] FALSE
cfos.dat$mouse = as.factor(cfos.dat$mouse)
is.factor(cfos.dat$mouse)
## [1] TRUE

Reorder data.

sort_order <- c("Water", "DSS", "DrugA", "DrugB") #define order

cfos.dat_sorted <- cfos.dat %>% 
  mutate(condition = fct_relevel(condition, sort_order)) %>% 
  arrange(condition)

Analysis

Compute average cFos count per mouse and store n value.

The raw data consist of multiple images of different slices of spinal column within the relavent level; subsequently, the average for each mouse must be computed. We will also store the resulting n-values in an object for easy reporting.

mouse.dat <- aggregate(cfos.dat_sorted[,2], list(cfos.dat_sorted$mouse, cfos.dat_sorted$condition), FUN = mean)

names(mouse.dat)[1]<-'mouse'
names(mouse.dat)[2]<-'condition'
names(mouse.dat)[3]<-'count_avg'

n_values <-table(mouse.dat$condition)
print(n_values)
## 
## Water   DSS DrugA DrugB 
##    10    10    10    10

ANOVA and pairwise comparison using Tukey’s honestly significant difference.

anova.cfos <- aov(count_avg ~ condition, data = mouse.dat)
anova <- Anova(anova.cfos, type ="II")
print(anova)  
## Anova Table (Type II tests)
## 
## Response: count_avg
##           Sum Sq Df F value    Pr(>F)    
## condition 3354.7  3  42.726 5.973e-12 ***
## Residuals  942.2 36                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey <- tukey_hsd(anova.cfos)
print(knitr::kable(tukey, caption = "TukeyHSD"))
## 
## 
## Table: TukeyHSD
## 
## |term      |group1 |group2 | null.value| estimate|  conf.low| conf.high|    p.adj|p.adj.signif |
## |:---------|:------|:------|----------:|--------:|---------:|---------:|--------:|:------------|
## |condition |Water  |DSS    |          0|    19.70|  13.53819|  25.86181| 0.00e+00|****         |
## |condition |Water  |DrugA  |          0|    23.18|  17.01819|  29.34181| 0.00e+00|****         |
## |condition |Water  |DrugB  |          0|     8.76|   2.59819|  14.92181| 2.67e-03|**           |
## |condition |DSS    |DrugA  |          0|     3.48|  -2.68181|   9.64181| 4.36e-01|ns           |
## |condition |DSS    |DrugB  |          0|   -10.94| -17.10181|  -4.77819| 1.66e-04|***          |
## |condition |DrugA  |DrugB  |          0|   -14.42| -20.58181|  -8.25819| 1.60e-06|****         |

The ANOVA showed a main effect of condition. The follow-up pairwise comparisons showed the negative and positive control groups (Water and DSS, respectively) to be significantly different suggesting that the experimental model performed as expected; therefore, we can examine our experimental groups. There was no effect of Drug A; however, Drug B showed a significant reduction compared to the DSS group.

Visualization

Select pairwise comparisons for the figure.

Based on the results discussed above, there are 4 main comparisons that should be shown in the figure:

  1. Water and DSS to demonstrate that the model performed as expected.
  2. Drug A and DSS to show that this dose was ineffective.
  3. Drug B and DSS to show that this dose was effective.
  4. Drug B and water to show that this dose did not reduce responses to negative control levels.
tukey_figure <- tukey[c(1,3,4,5),] #select rows containing pairwise comparisons

Create a Boxplot.

bp <- ggboxplot(mouse.dat, x = "condition", y = "count_avg",
                fill = "condition", 
                add = "dotplot" , add.params = list(size = 1.6, alpha = 1), 
                ylab = "cFos+ Nuclei per Section", xlab = "Condition")+
  coord_cartesian(
    xlim = NULL,
    ylim = c(0, 80),
    expand = TRUE,
    default = FALSE,
    clip = "off")+
  stat_pvalue_manual(tukey_figure, 
                     label = "p.adj.signif", #to show exact p-value use "p.adj"
                     y.position = 45, step.increase = 0.3)+ #p-value bars location
  theme(legend.position = "none") +#remove legend
  scale_fill_brewer(palette ="Set1") #add colors
bp

Conclusion

Results showed a significant effect of condition (F(3) = 42.726, p < 0.001). Post-hoc analysis (Tukey HSD) showed significant differences between Water and DSS conditions (p < 0.001) suggesting that our DSS model and cFos measure performed as expected. While treatment with Drug A did not reduce cFos counts compared to DSS controls (p = 0.43610), Drug B did significantly reduce cFos counts compared to DSS controls (p = 0.0016). Notably, cFos counts for Drug B were still significantly greater than non-DSS (Water) controls (p = 0.0027). Together, these results suggest that treatment with Drug B ameliorated visceral nociception in the DSS model of IBD.