OSCR

Cat brains age like humans: translating time shows pet cats live to be natural models for human aging.

Code ↔ Paper

5 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 5 matches
  1. [1] § MATERIALS AND METHODS › Comparison of MRI data with other observations ↔ Supplemenrary_material 1.R, lines 604–670 · score 0.79 · standard deviation, bootstrapped sample, bootstrapped predictions, prediction intervals, replacement, spar
  2. [2] § RESULTS › Diverse feline populations are used to translate ages across species ↔ Supplementary material 2.R, lines 1–40 · score 0.74 · blood chemistry profiles, age related variation, age alignments, colony cats, alkaline, phosphorus
  3. [3] § MATERIALS AND METHODS › Blood chemistry profiles from the colony and Auburn CVM ↔ Supplementary material 2.R, lines 1–40 · score 0.65 · Blood chemistry profiles, colony cats, healthy, SRRC, females
  4. [4] § RESULTS › Domestic cats and wildcats are similar in their pace of development ↔ Supplementary material 4.R, lines 1–37 · score 0.64 · domestic cat, breed cat, wildcats, captive, slope, pace
  5. [5] § RESULTS › Translating time shows the pace of development and aging follows a complex trajectory ↔ Supplemenrary_material 1.R, lines 476–518 · score 0.50 · general linear model, event scale, longer, mice, species, fitted

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 672 lines · 25 KB · no license · 2 matches

  1. ### Translating ages across species. This script is part of
  2. ### Januel C, Morrow E, Gibson R, Gross A, de Sousa AA, Dames BA, Charvet CJ. Cat brains age like humans: Translating Time shows pet cats live to be natural models for human aging. Biology Open. 2026 May 18:bio-062604.
  3. ## libraries
  4. library(dplyr)
  5. library(readxl)
  6. library(tidyverse)
  7. library(Amelia)
  8. library(corrplot)
  9. library(stringi)
  10. library(splines)
  11. ### Open table S1 and call it dataset_breed1 ###
  12. # R.version.string: "R version 4.1.1 (2021-08-10); Platform: x86_64-apple-darwin17.0 (64-bit); Running under: macOS 15.7.4"
  13. # sessionInfo(): Amelia_1.8.1 --I have had issues with Amelia, which may have to do with the use of different R versions.
  14. dataset_breed1<-Table_S1 ## call Table_S1 dataset_breed1
  15. dataset_breed1<-as.data.frame(dataset_breed1)
  16. dataset_breed2<-cbind.data.frame(dataset_breed1[ ,1:6])
  17. dim(dataset_breed2)
  18. # Reorganize the data frame. Here, we average by species, time point and sex.
  19. df_subset <- dataset_breed2 %>%
  20. group_by(Species, Timepoint, Statistics, Sex) %>%
  21. mutate(row_id = row_number()) %>%
  22. ungroup()
  23. # Clean invisible characters from column R.
  24. df_subset$Timepoint <- stri_trim_both(
  25. stri_replace_all_regex(
  26. df_subset$Timepoint,
  27. pattern = "[\\p{C}\\x{00A0}\\x{200B}-\\x{200D}\\x{2060}\\x{FEFF}]",
  28. replacement = ""
  29. )
  30. )
  31. # Pivot the dataset, which restructures the dataset.
  32. pivoted_data <- df_subset %>%
  33. group_by(Timepoint, Statistics, Species, Sex) %>%
  34. summarise(mean_PCD = mean(PCD, na.rm = TRUE), .groups = "drop") %>%
  35. pivot_wider(
  36. names_from = Species,
  37. values_from = mean_PCD
  38. )
  39. ## Plot observations in humans versus cats
  40. plot(pivoted_data$Felis, pivoted_data$`Homo sapiens`, col="cornflowerblue",
  41. log="xy", pch=16)
  42. length(na.omit(pivoted_data$Felis))
  43. ## Plot observations in chimpanzees versus humans
  44. plot(pivoted_data$`Pan troglodytes`, pivoted_data$`Homo sapiens`, col="cornflowerblue",
  45. log="xy", pch=16)
  46. ## Organize the data
  47. pivoted_data$Statistics<-as.numeric(pivoted_data$Statistics)
  48. pivoted_data1<-cbind.data.frame(pivoted_data$Timepoint, pivoted_data$Statistics, pivoted_data$Sex,
  49. log10(pivoted_data$Felis),
  50. log10(pivoted_data$`Homo sapiens`),
  51. log10(pivoted_data$`Mus musculus`),
  52. log10(pivoted_data$`Pan troglodytes`))
  53. colnames(pivoted_data1)<-c("Timepoint", "Statistics", "Sex",
  54. "Cat", "Homo", "Mouse", "Chimp")
  55. pivoted_data1$Statistics<-as.numeric(pivoted_data1$Statistics)
  56. head(pivoted_data1) ## take a lookg at the data
  57. ## Quantify the number of NAs per row
  58. pivoted_data1$na <- apply(pivoted_data1[ ,4:7], 1, function(x) sum(is.na(x)))
  59. pivoted_data1$na<-as.numeric(pivoted_data1$na)
  60. hist(pivoted_data1$na)
  61. head(pivoted_data1)
  62. ## Filter the dataset based on NAs
  63. pivoted_data1<-subset(pivoted_data1, na<3)
  64. pivoted_data1$na<-NULL
  65. head(pivoted_data1)
  66. ## Make sure sex selective traits are sex selective
  67. pivoted_data1 <- pivoted_data1 %>%
  68. filter(!(Timepoint == "Female First reproduction (sex selective)" & Sex == "Male+Female"))
  69. pivoted_data1 <- pivoted_data1 %>%
  70. filter(!(Timepoint == "Female Sexual maturity is reached (sex selective)" & Sex == "Male+Female"))
  71. pivoted_data1 <- pivoted_data1 %>%
  72. filter(!(Timepoint == "Male Sexual maturity is reached (sex selective)" & Sex == "Male+Female"))
  73. ## Make sure that the variable is numeric
  74. pivoted_data1$Statistics<-as.character(pivoted_data1$Statistics) ## CHANGE CHARACTER AS NUMERIC
  75. #clean_data<-pivoted_data1
  76. ## Bound the possible ages for the generation of age translations
  77. bounds1 <- matrix(c(
  78. 4, log10(0.001), log10(30*365+65), # Cat
  79. 5, log10(0.001), log10(122.5*365+270), # Homo
  80. 6, log10(0.001), log10(4.0*365+18.5), # Mouse
  81. 7, log10(0.001), log10(68*365+243) # Chimp
  82. ), ncol = 3, byrow = TRUE)
  83. pivoted_data1$Timepoint<-as.character(pivoted_data1$Timepoint)
  84. pivoted_data1$Statistics<-as.character(pivoted_data1$Statistics)
  85. ## Impute the data using Amelia
  86. set.seed(123)
  87. pivoted_data1<-as.data.frame(pivoted_data1)
  88. head(pivoted_data1)
  89. tryCatch({
  90. imputed_data1 <- amelia(pivoted_data1, m = 10, idvars = c("Timepoint", "Sex", "Statistics"), parallel = "no",
  91. bounds = bounds1,
  92. )
  93. }, error = function(e) {
  94. cat("Amelia crashed:", conditionMessage(e), "\n")
  95. })
  96. summary(imputed_data1)
  97. imputed_data1$imputations$imp1
  98. ## find the correlation with highest correlation coefficient
  99. for (i in 1:10) {
  100. completed_data1<-imputed_data1$imputations[[i]]
  101. cor_matrix1 <- cor(completed_data1[ ,4:7], use = "complete.obs", method = "pearson")
  102. hist(cor_matrix1)
  103. print(i)
  104. print(min(cor_matrix1))
  105. }
  106. ## select an imputed dataset:
  107. completed_data1<-imputed_data1$imputations[[10]]
  108. completed_data1$Statistics<-pivoted_data1$Statistics
  109. pivoted_data1$Statistics<-as.character(pivoted_data1$Statistics)
  110. averaged_df <- completed_data1 %>%
  111. group_by(Timepoint, Statistics, Sex) %>%
  112. summarize(across(where(is.numeric), ~ mean(.x, na.rm = TRUE)), .groups = "drop")
  113. averaged_df_raw <- pivoted_data1 %>%
  114. group_by(Timepoint, Statistics, Sex) %>%
  115. summarize(across(where(is.numeric), ~ mean(.x, na.rm = TRUE)), .groups = "drop")
  116. ## Open Table S2 to look at breakdown of data and call it table S2 ##
  117. head(Table_S2)
  118. ## show different kinds of data (Figure 1)
  119. head(Table_S2); colnames(Table_S2)
  120. Table_S2$Cat<-as.numeric(Table_S2$Cat)
  121. Table_S2$Homo<-as.numeric(Table_S2$Homo)
  122. plot(10^Table_S2$Cat/365, 10^Table_S2$Homo/365, log="xy",
  123. col="cornflowerblue", pch=16, xlab="Cat (years post-conception)",
  124. ylab="Human (years post-conception)", cex=1.5, cex.lab=1.5, cex.axis=1.5)
  125. MRI<-subset(Table_S2, MRI_this_study==1)
  126. head(MRI); dim(MRI)
  127. points(10^MRI$Cat/365, 10^MRI$Homo/365, col="darkred", cex=1.5, pch=16)
  128. Disease<-subset(Table_S2, Disease==1)
  129. head(MRI); dim(MRI)
  130. points(10^Disease$Cat/365, 10^Disease$Homo/365, col="rosybrown2", cex=1.5, pch=16)
  131. Bone<-subset(Table_S2, Bone_ossification==1)
  132. points(10^Bone$Cat/365, 10^Bone$Homo/365, col="plum4", pch=16, cex=1.5,)
  133. Behavior<-subset(Table_S2, `Behavioral milestones`==1)
  134. points(10^Behavior$Cat/365, 10^Behavior$Homo/365, col="palegreen3", cex=1.5, pch=16)
  135. Anatomy<-subset(Table_S2, `Abrupt anatomical changes (not ossification)`==1)
  136. points(10^Anatomy$Cat/365, 10^Anatomy$Homo/365, col="antiquewhite4", cex=1.5, pch=16)
  137. Blood_work<-subset(Table_S2, `Blood work`==1)
  138. points(10^Blood_work$Cat/365, 10^Blood_work$Homo/365, col="deepskyblue4", cex=1.5, pch=16)
  139. legend("bottomright", legend=c("MRI", "Diseases",
  140. "Bone ossification", "Behavioral milestones",
  141. "Anatomy", "Blood work"),
  142. col=c("darkred", "rosybrown2",
  143. "plum4", "palegreen3", "antiquewhite4", "deepskyblue4"),
  144. pch=16, bty="n", pt.cex=1.25, cex=0.5)
  145. # Boxplot (Figure 1)
  146. options(scipen = 999)
  147. boxplot(10^averaged_df_raw$Mouse/365, 10^averaged_df_raw$Cat/365,
  148. 10^averaged_df_raw$Chimp/365, 10^averaged_df_raw$Homo/365, log="y",
  149. cex.axis=1.6, cex.lab = 1.6, ylab="Age of observations in years",
  150. col=c("grey", "cornflowerblue", "plum4", "darkred"))
  151. #plot(10^averaged_df$Cat/365, 10^averaged_df$Homo/365, log="xy", col="cornflowerblue", pch=16)
  152. ### compare humans versus cats
  153. plot(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365, log="xy", col="cornflowerblue", pch=16,
  154. xlab="Cats (years post-conception)", ylab="Human (years post-conception)",
  155. cex.lab=1.5, cex.axis=1.5)
  156. head(averaged_df_raw)
  157. c1<-cbind.data.frame(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365)
  158. c1<-na.omit(c1)
  159. df<-smooth.spline(log10(c1[ ,1]), log10(c1[ ,2]), df=30)
  160. x<-c(10, 16, 1, 65/365, 30/365, 365)
  161. lines(10^df$x, 10^df$y, col="cornflowerblue", lwd=2)
  162. ABC<-as.data.frame(predict(df, log10(x)))
  163. abline(h=10^ABC$y, col="cornflowerblue", lty=2)
  164. abline(v=x, col="cornflowerblue", lty=2)
  165. ## Relative amount of data in dataset (Figure 1)
  166. pie<-c(7.356076759, 1.918976546, 24.41364606, 4.371002132, 2.23880597,
  167. 11.08742004, 4.690831557, 19.7228145, 100*39/938, 100*0.255689424)
  168. labels<-c("Blood work", "MRI", "Bone ossification", "Tooth eruption",
  169. "Disease", "Behavioral milestone", "Transcription", "Anatomical changes",
  170. "Neurogenesis", "Other")
  171. bg_colors <- c("cornflowerblue", "antiquewhite3", "pink4", "steelblue",
  172. "plum3", "grey",
  173. "plum4", "antiquewhite4", "plum2", "pink4", "pink2", "grey")
  174. pie(pie, labels=labels)
  175. #############################################################################
  176. ########### Compare age translations with and without cat MRI data (Figure S1)
  177. #############################################################################
  178. dev.off()
  179. plot(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365, log="xy", col="darkred", pch=16,
  180. xlab="Cats (years post-conception)", ylab="Human (years post-conception)",
  181. cex.lab=1.5, cex.axis=1.5)
  182. MRI <- paste(c("interthalamic adhesion", "normalized whole brain volume \\(nWBV\\)"), collapse = "|")
  183. # Filter out the matching rows
  184. df_no_mri <- averaged_df_raw %>%
  185. filter(!stringr::str_detect(Timepoint, MRI))
  186. dim(df_no_mri); dim(averaged_df_raw)
  187. points(10^df_no_mri$Cat/365, 10^df_no_mri$Homo/365, col="cornflowerblue", pch=16)
  188. d1<-cbind.data.frame(10^df_no_mri$Cat/365, 10^df_no_mri$Homo/365)
  189. d1<-na.omit(d1)
  190. df_nomri<-smooth.spline(log10(d1[ ,1]), log10(d1[ ,2]), df=30)
  191. ###################################################################
  192. ### Calculate the % of variance explained by the model
  193. # Extract fitted values from the smooth spline, Ensure predictions are made correctly
  194. fitted_values <- predict(df_nomri, log10(d1[ ,1]))$y
  195. log_observed_values <- log10(d1[, 2])
  196. # Calculate residuals
  197. residuals <- log_observed_values - fitted_values
  198. # Calculate residual sum of squares
  199. rss <- sum(residuals^2)
  200. # Calculate total sum of squares
  201. mean_y <- mean(log_observed_values)
  202. tss <- sum((log_observed_values - mean_y)^2)
  203. # Calculate R-squared
  204. r_squared <- 1 - (rss / tss)
  205. r_squared
  206. ##### We fit prediction intervals (original smooth spline with spar = 0.9)
  207. da <- smooth.spline(log10(d1[, 1]), log10(d1[, 2]), spar = 0.9)
  208. original_predictions <- predict(da, log10(d1[, 1]))
  209. # Calculate residuals for observation variability (model error)
  210. residuals <- log10(d1[, 2]) - original_predictions$y
  211. residual_sd <- sd(residuals) # Standard deviation of residuals for prediction error
  212. # Set up bootstrap parameters
  213. set.seed(123) # For reproducibility
  214. n_bootstrap <- 1000 # Number of bootstrap samples
  215. x_vals <- log10(d1[, 1]) # x values in log scale for prediction
  216. bootstrap_predictions <- matrix(NA, nrow = length(x_vals), ncol = n_bootstrap)
  217. # Bootstrap loop
  218. for (i in 1:n_bootstrap) {
  219. # Resample the data with replacement
  220. boot_indices <- sample(seq_along(d1[, 1]), replace = TRUE)
  221. H1_boot <- d1[boot_indices, ]
  222. # Fit a smooth spline to the bootstrap sample
  223. da_boot <- smooth.spline(log10(H1_boot[, 1]), log10(H1_boot[, 2]), spar = 0.9)
  224. # Predict using the bootstrap spline
  225. boot_prediction <- predict(da_boot, x_vals)$y
  226. # Add random noise to capture observation variability
  227. bootstrap_predictions[, i] <- boot_prediction + rnorm(length(x_vals), mean = 0, sd = residual_sd)
  228. }
  229. # Calculate ±1 Standard Error Interval from bootstrap predictions
  230. standard_error <- apply(bootstrap_predictions, 1, sd)
  231. se_lower_bound <- original_predictions$y - standard_error
  232. se_upper_bound <- original_predictions$y + standard_error
  233. # Calculate the 95% Prediction Interval from bootstrap predictions
  234. lower_bound_95 <- apply(bootstrap_predictions, 1, quantile, probs = 0.025)
  235. upper_bound_95 <- apply(bootstrap_predictions, 1, quantile, probs = 0.975)
  236. # Sort values for plotting
  237. sorted_indices <- order(original_predictions$x)
  238. sorted_x <- original_predictions$x[sorted_indices]
  239. sorted_y <- original_predictions$y[sorted_indices]
  240. sorted_se_upper <- se_upper_bound[sorted_indices]
  241. sorted_se_lower <- se_lower_bound[sorted_indices]
  242. sorted_upper_95 <- upper_bound_95[sorted_indices]
  243. sorted_lower_95 <- lower_bound_95[sorted_indices]
  244. # Add the original smooth spline line
  245. lines(10^sorted_x, 10^sorted_y, col = "black", lwd = 2)
  246. # Add the ±1 SE interval band (narrower)
  247. polygon(c(10^sorted_x, rev(10^sorted_x)), c(10^sorted_se_upper, rev(10^sorted_se_lower)),
  248. col = rgb(0, 0, 1, alpha = 0.2), border = NA) # Light blue shading for ±1 SE
  249. ##################################################################
  250. ### Plots to compare data in humans versus cats
  251. plot(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365,
  252. col="cornflowerblue", pch=16, xlim=c(0.03, 50), ylim=c(0.03, 100), log="xy",
  253. xlab="Cat (years post-conception)", cex.lab=1.75, cex.axis=1.75,
  254. ylab="Human (years post-conception)")
  255. with(averaged_df_raw, {
  256. ok <- !is.na(Cat) & !is.na(Homo)
  257. x <- Cat[ok]
  258. y <- Homo[ok]
  259. fit <- smooth.spline(x, y, df = 10)
  260. x<-c(15/365, 30/365, 65/365, 0.5, 1, 5, 8, 15)
  261. A<-predict(fit, log10(x*365))$y
  262. abline(h=10^A/365, lty=2)
  263. Age<-predict(fit, x)$y
  264. print(10^A/365)
  265. abline(v=x, lty=2)
  266. lines(10^fit$x/365, 10^fit$y/365, col = "cornflowerblue", lwd = 2)
  267. })
  268. ## Figure 7. Plot chimpanzee versus cat data
  269. options(scipen = 999)
  270. plot(10^averaged_df_raw$Chimp/365, 10^averaged_df_raw$Cat/365,
  271. col="darkgrey", pch=16, log="xy", ylim=c(0.04, 18), xlim=c(0.17, 50),
  272. xlab="Chimpanzee (years post-conception)",
  273. ylab="Cat (years post-conception)", cex.lab=1.75, cex.axis=1.75) #log="xy",
  274. with(averaged_df_raw, {
  275. ok <- !is.na(Chimp) & !is.na(Cat)
  276. x <- Chimp[ok]
  277. y <- Cat[ok]
  278. fit <- smooth.spline(x, y, df = 12)
  279. x<-c(243/365, 10, 35)
  280. A<-predict(fit, log10(x*365))$y
  281. abline(h=10^A/365, lty=2)
  282. Age<-predict(fit, x)$y
  283. print(10^A/365)
  284. abline(v=x, lty=2)
  285. lines(10^fit$x/365, 10^fit$y/365, col = "black", lwd = 2)
  286. })
  287. ### Figure 7. Plot mouse versus cat data
  288. options(scipen = 999)
  289. plot(10^averaged_df_raw$Mouse/365, 10^averaged_df_raw$Cat/365,
  290. col="darkgrey", pch=16, log="xy",
  291. ylab="Cat (years post-conception)",
  292. xlab="Mouse (years post-conception)", cex.lab=1.75, cex.axis=1.75) #log="xy",
  293. with(averaged_df_raw, {
  294. ok <- !is.na(Mouse) & !is.na(Cat)
  295. x <- Mouse[ok]
  296. y <- Cat[ok]
  297. fit <- smooth.spline(x, y, df = 12)
  298. x<-c(18.5/365, 0.5, 1, 1.5)
  299. A<-predict(fit, log10(x*365))$y
  300. abline(h=10^A/365, lty=2)
  301. Age<-predict(fit, x)$y
  302. print(10^A/365)
  303. abline(v=x, lty=2)
  304. lines(10^fit$x/365, 10^fit$y/365, col = "black", lwd = 2)
  305. })
  306. ### Plot mouse versus human data
  307. options(scipen = 999)
  308. plot(10^averaged_df_raw$Mouse/365, 10^averaged_df_raw$Homo/365,
  309. col="darkgrey", pch=16, log="xy",
  310. xlab="Mouse (years post-conception)",
  311. ylab="Human (years post-conception)", cex.lab=1.75, cex.axis=1.75) #log="xy",
  312. with(averaged_df_raw, {
  313. ok <- !is.na(Mouse) & !is.na(Homo)
  314. x <- Mouse[ok]
  315. y <- Homo[ok]
  316. fit <- smooth.spline(x, y, df = 12)
  317. x<-c(18.5/365, 1, 1.5)
  318. A<-predict(fit, log10(x*365))$y
  319. abline(h=10^A/365, lty=2)
  320. Age<-predict(fit, x)$y
  321. print(10^A/365)
  322. abline(v=x, lty=2)
  323. lines(10^fit$x/365, 10^fit$y/365, col = "black", lwd = 2)
  324. })
  325. ### Plot chimpanzee versus human data
  326. options(scipen = 999)
  327. plot(10^averaged_df_raw$Chimp/365, 10^averaged_df_raw$Homo/365,
  328. col="darkgrey", pch=16, log="xy", xlim=c(0.08, 100), ylim=c(0.08, 100),
  329. ylab="Human (years post-conception)", cex.lab=1.75, cex.axis=1.75,
  330. xlab="Chimpanzee (years post-conception)", cex.lab=1.5, cex.axis=1.5) #log="xy",
  331. with(averaged_df_raw, {
  332. ok <- !is.na(Chimp) & !is.na(Homo)
  333. x <- Chimp[ok]
  334. y <- Homo[ok]
  335. fit <- smooth.spline(x, y, df = 12)
  336. x<-c(243/365, 10, 40)
  337. A<-predict(fit, log10(x*365))$y
  338. abline(h=10^A/365, lty=2)
  339. Age<-predict(fit, x)$y
  340. print(10^A/365)
  341. abline(v=x, lty=2)
  342. lines(10^fit$x/365, 10^fit$y/365, col = "black", lwd = 2)
  343. })
  344. summary(imputed_data1)
  345. weights<-c(0.5309168, 0.2046908, 0.5831557, 0.4413646)
  346. barplot(weights, col=c("cornflowerblue", "darkred", "grey", "plum4"),
  347. ylim=c(0, 1), cex.lab=3, cex.axis=3)
  348. ## create a variable
  349. events<-averaged_df[ ,4:7]
  350. ####################################################################################
  351. ############################ Use PCA to denoise the data ############################
  352. #####################################################################################
  353. # 1. Scale the data
  354. numeric_data <- events[, sapply(events, is.numeric)]
  355. scaled_data <- scale(numeric_data)
  356. scaled_center <- attr(scaled_data, "scaled:center")
  357. scaled_scale <- attr(scaled_data, "scaled:scale")
  358. # 2. PCA
  359. pca <- prcomp(scaled_data, center = TRUE, scale. = TRUE)
  360. # 3. Dimensionality reduction + denoising
  361. reduced <- pca$x[, 1:2] %*% t(pca$rotation[, 1:2]) # back to scaled space (approx)
  362. # 4. Inverse scale: from scaled back to original numeric values
  363. denoised_matrix <- sweep(reduced, 2, scaled_scale, "*")
  364. denoised_matrix <- sweep(denoised_matrix, 2, scaled_center, "+")
  365. # 5. Convert to data frame
  366. denoised_df <- as.data.frame(denoised_matrix)
  367. ## compare denoised with non-denoised
  368. plot(averaged_df$Cat, averaged_df$Homo)
  369. plot(denoised_df$Cat, denoised_df$Homo)
  370. ## Compare imputed versus observed values
  371. plot(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365, cex=0.5, xlab="Age in years cats",
  372. ylab="Age in years Humans", log="xy", cex.lab=2.5, cex.axis=2.5)
  373. points(10^denoised_df$Cat/365, 10^denoised_df$Homo/365, col="grey", cex=0.75, pch=16)
  374. points (10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365, col="cornflowerblue", pch=16)
  375. averaged_df1<-cbind.data.frame(averaged_df[ ,1:3], denoised_df)
  376. ######## Compute an event scale
  377. head(averaged_df1)
  378. Event_scale <- as.data.frame(apply(averaged_df1[ ,4:7], 1, function(row) {
  379. not_na <- !is.na(row)
  380. sum(row[not_na] * weights[not_na]) / sum(weights[not_na])
  381. }))
  382. ## Visualize distribution of observations before transforming it into an event scale
  383. head(Event_scale)
  384. colnames(Event_scale)<-c("Event_scale")
  385. hist(Event_scale$Event_scale)
  386. ## Generate the event scale
  387. Event_scale$Event_scale<-as.numeric(Event_scale$Event_scale)
  388. min<-min(Event_scale$Event_scale, na.rm=TRUE)
  389. max<-max(Event_scale$Event_scale, na.rm=TRUE)
  390. Event_scale1<-(Event_scale$Event_scale-min)/(max-min)
  391. Event_scale1<-as.data.frame(Event_scale1)
  392. compare<-cbind(Event_scale1, averaged_df_raw)
  393. compare1<-cbind(Event_scale1, averaged_df)
  394. ## plot data versus event scale
  395. options(scipen = 100)
  396. plot(Event_scale1[ ,1], 10^averaged_df_raw$Homo/365, log="y", ylab="Age in years post-conception",
  397. xlab="Event scale", cex=1.5, pch=16, cex.axis=1.1)
  398. points(Event_scale1[ ,1], 10^averaged_df_raw$Chimp/365, col="purple", pch=16, cex=1.1)
  399. points(Event_scale1[ ,1], 10^averaged_df_raw$Mouse/365, col="red", pch=16, cex=1.1)
  400. points(Event_scale1[ ,1], 10^averaged_df_raw$Cat/365, col="cornflowerblue", pch=16, cex=1.1)
  401. dim(Event_scale1)
  402. plot(Event_scale1[ ,1], 10^averaged_df_raw$Homo/365)
  403. points(Event_scale1[ ,1], 10^averaged_df_raw$Chimp/365, col="purple")
  404. points(Event_scale1[ ,1], 10^averaged_df_raw$Mouse/365, col="red")
  405. points(Event_scale1[ ,1], 10^averaged_df_raw$Cat/365, col="gold")
  406. ##### make more plots to visualize the data
  407. colnames(averaged_df_raw)
  408. head(averaged_df_raw)
  409. df_transformed <- as.data.frame(10^averaged_df_raw[ ,4:7])
  410. head(df_transformed)
  411. plot(df_transformed$Cat, df_transformed$Homo)
  412. # Add the event scale as a new column
  413. df_transformed$EventScale <- Event_scale1[,1]
  414. # Move EventScale to the first column (optional but tidy)
  415. df_transformed <- df_transformed %>%
  416. relocate(EventScale)
  417. # Convert from wide to long format
  418. df_long <- df_transformed %>%
  419. pivot_longer(
  420. cols = -EventScale,
  421. names_to = "Species",
  422. values_to = "Value"
  423. )
  424. ## fit a general linear model
  425. str(df_long)
  426. df_long$square<-df_long$EventScale^2
  427. df_long$cube<-df_long$EventScale^3
  428. df_long$quatro<-df_long$EventScale^4
  429. ## Get min and max of EventScale
  430. range_vals <- range(df_long$EventScale, na.rm = TRUE)
  431. ## Fit a smooth spline
  432. fit_spline <- lm(log10(Value) ~ Species * ns(EventScale, df = 5), data = df_long, na.action = na.exclude)
  433. summary(fit_spline) ## summary of model
  434. df_long$Predicted <- predict(fit_spline)
  435. head(df_long) ## take a look at the data
  436. ## Plot the output of the model
  437. species_colors <- c(
  438. "Homo" = "darkred",
  439. "Chimp" = "plum4",
  440. "Cat" = "cornflowerblue",
  441. "Mouse" = "black"
  442. )
  443. ## Check if there are other species and assign a default color if needed
  444. all_species <- unique(df_long$Species)
  445. missing_species <- setdiff(all_species, names(species_colors))
  446. if (length(missing_species) > 0) {
  447. # Assign remaining species a default color (e.g., grey)
  448. default_colors <- rep("grey", length(missing_species))
  449. names(default_colors) <- missing_species
  450. species_colors <- c(species_colors, default_colors)
  451. }
  452. ## Map species to colors
  453. point_colors <- species_colors[df_long$Species]
  454. point_colors
  455. head(df_long)
  456. ## Plot predicted values
  457. plot(df_long$EventScale, 10^df_long$Predicted/365,
  458. xlab = "Event Scale", ylab = "Predicted / log10(Value)", pch=16, log="y",
  459. col = point_colors, main = "Predicted vs log10(Value) by Species",
  460. xlim=c(0, 1.1))
  461. points(df_long$EventScale, df_long$Value/365, col = point_colors, cex=0.6)
  462. df_long$years<-df_long$Value/365
  463. df_long1<-cbind.data.frame(df_long$EventScale, df_long$Species, 10^df_long$Predicted/365, df_long$Value/365)
  464. ## plot predicted and observed values
  465. plot(df_long$EventScale, 10^df_long$Predicted/365,
  466. xlab = "Event Scale", ylab = "Predicted / log10(Value)", pch=16,
  467. col = point_colors, main = "Predicted vs log10(Value) by Species")
  468. points(df_long$EventScale, df_long$Value/365, col = point_colors, cex=0.75)
  469. legend("topleft", legend = names(species_colors), col = species_colors, pch = 16, title = "Species", cex=0.75)
  470. ########################################################################
  471. ### Compare predicted values from the model with observations (Figure S2)
  472. ########################################################################
  473. ## organize the data
  474. df1<-cbind.data.frame(df_long$EventScale, df_long$Species, df_long$Predicted)
  475. head(df1)
  476. colnames(df1)<-c("Eventscale", "Species", "Predicted")
  477. ## pivot the data
  478. matched_df <- df1 %>%
  479. pivot_wider(
  480. names_from = Species, # Column with "cat" or "human"
  481. values_from = Predicted # Column with the numbers
  482. )
  483. head(matched_df) ## take a look at the data
  484. ### Compare cats with humans
  485. plot(10^matched_df$Cat/365, 10^matched_df$Homo/365, xlim=c(0.02, 20), ylim=c(0.02, 100),
  486. log="xy", col="darkred", pch=16, cex=1.5, xlab="Cats (years post-conception)",
  487. ylab="Human (years post-conception)", cex.lab=1.25, cex.axis=1.25)
  488. points(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365, col="cornflowerblue", pch=16)
  489. ### Calculate the % of variance explained by the model
  490. head(averaged_df_raw)
  491. d1_total<-cbind.data.frame(10^averaged_df_raw$Cat/365, 10^averaged_df_raw$Homo/365)
  492. d1_total<-na.omit(d1_total)
  493. df_total1<-smooth.spline(log10(d1_total[ ,1]), log10(d1_total[ ,2]), df=30)
  494. fitted_values <- predict(df_total1, log10(d1_total[ ,1]))$y
  495. log_observed_values <- log10(d1_total[, 2])
  496. # Calculate residuals
  497. residuals <- log_observed_values - fitted_values
  498. # Calculate residual sum of squares
  499. rss <- sum(residuals^2)
  500. # Calculate total sum of squares
  501. mean_y <- mean(log_observed_values)
  502. tss <- sum((log_observed_values - mean_y)^2)
  503. # Calculate R-squared
  504. r_squared <- 1 - (rss / tss)
  505. r_squared
  506. # Fit the original smooth spline with spar = 0.9
  507. da <- smooth.spline(log10(d1_total[, 1]), log10(d1_total[, 2]), spar = 0.9)
  508. original_predictions <- predict(da, log10(d1_total[, 1]))
  509. dim(d1_total)
  510. # Calculate residuals for observation variability (model error)
  511. residuals <- log10(d1_total[, 2]) - original_predictions$y
  512. residual_sd <- sd(residuals) # Standard deviation of residuals for prediction error
  513. # Set up bootstrap parameters
  514. set.seed(123) # For reproducibility
  515. n_bootstrap <- 1000 # Number of bootstrap samples
  516. x_vals <- log10(d1[, 1]) # x values in log scale for prediction
  517. bootstrap_predictions <- matrix(NA, nrow = length(x_vals), ncol = n_bootstrap)
  518. # Bootstrap loop
  519. for (i in 1:n_bootstrap) {
  520. # Resample the data with replacement
  521. boot_indices <- sample(seq_along(d1[, 1]), replace = TRUE)
  522. H1_boot <- d1[boot_indices, ]
  523. # Fit a smooth spline to the bootstrap sample
  524. da_boot <- smooth.spline(log10(H1_boot[, 1]), log10(H1_boot[, 2]), spar = 0.9)
  525. # Predict using the bootstrap spline
  526. boot_prediction <- predict(da_boot, x_vals)$y
  527. # Add random noise to capture observation variability
  528. bootstrap_predictions[, i] <- boot_prediction + rnorm(length(x_vals), mean = 0, sd = residual_sd)
  529. }
  530. # Calculate ±1 Standard Error Interval from bootstrap predictions
  531. standard_error <- apply(bootstrap_predictions, 1, sd)
  532. se_lower_bound <- original_predictions$y - standard_error
  533. se_upper_bound <- original_predictions$y + standard_error
  534. # Calculate the 95% Prediction Interval from bootstrap predictions
  535. lower_bound_95 <- apply(bootstrap_predictions, 1, quantile, probs = 0.025)
  536. upper_bound_95 <- apply(bootstrap_predictions, 1, quantile, probs = 0.975)
  537. # Sort values for plotting
  538. sorted_indices <- order(original_predictions$x)
  539. sorted_x <- original_predictions$x[sorted_indices]
  540. sorted_y <- original_predictions$y[sorted_indices]
  541. sorted_se_upper <- se_upper_bound[sorted_indices]
  542. sorted_se_lower <- se_lower_bound[sorted_indices]
  543. sorted_upper_95 <- upper_bound_95[sorted_indices]
  544. sorted_lower_95 <- lower_bound_95[sorted_indices]
  545. # Add the original smooth spline line
  546. lines(10^sorted_x, 10^sorted_y, col = "black", lwd = 2)
  547. # Add the ±1 SE interval band (narrower)
  548. polygon(c(10^sorted_x, rev(10^sorted_x)), c(10^sorted_se_upper, rev(10^sorted_se_lower)),
  549. col = rgb(0, 0, 1, alpha = 0.25), border = NA) # Light blue shading for ±1 SE

Supplemenrary_material 1.R, no license · at the source

Overview

Authors: Capucine Januel1,2, Elijah Morrow1, Ryan Gibson1, Amanda Gross3, Alexandra A. de Sousa1, Brier A. Rigby Dames1,4, Christine J. Charvet1
  1. Department of Anatomy, Physiology & Pharmacology, College of Veterinary Medicine, Auburn University, Auburn, AL 36849, USA
  2. Ecole Nationale Vétérinaire de Toulouse, Toulouse 31076, France
  3. Scott-Ritchey-Research Center, College of Veterinary Medicine, Auburn University, Auburn, AL 36849, USA
  4. Centre for Accountable, Responsible, and Transparent AI (ART-AI), Department of Computer Science, University of Bath, Bath BA2 7AY, UK
Institutions: École Nationale Vétérinaire de Toulouse (France); Auburn University (United States); University of Bath (United Kingdom)
Journal: Biology open, volume 15, issue 6, article bio062604
Dates: received 4 April 2026; accepted 7 May 2026; published online 22 June 2026; in print June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1242/bio.062604 · PMID 42145034 · PMCID PMC13382973 · OpenAlex W4412830726
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), other (organism), clinical / translational (subfield)
Methods: Smoothing, state filtering, decompositions, Statistics, Physiology & signal measures
Keywords: Translational, Aging, Development, Pet, Cat, Rate
MeSH: Aging*, Brain*, Pets*, Animals, Cats, Humans, Magnetic Resonance Imaging, Male (* major topic)
Topic: Human-Animal Interaction Studies (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Citations: not cited yet (Europe PMC); 65 references in the paper

Abstract

Whether an animal can achieve a lifespan equivalent to a human in their 80s remains an open question. Cats may serve as valuable models for human aging because there is some evidence that they can develop human related aging patterns. Here, we leveraged 3754 observations extracted from age-related brain variation, blood chemistry profiles, and other data to equate ages across the lifespan of humans and cats. We used structural MR scans (7T and 3T MRI) from pet and colony cats to quantify age-related brain metrics during aging. Cat and human brains exhibit similar age-related patterns of brain atrophy. We used common patterns of brain change and other health-related metrics to generate age alignments across the lifespan to late stages of life (e.g. an 80-year-old human equates to a 15-year-old cat). We also collected observations across multiple cat populations, including pets, zoos, and colonies to encapsulate individual variation in cross-species age alignments. One major finding to emerge is that pet cats are studied at significantly older ages than colony cats, and pet cats demonstrate a high degree of age-related brain atrophy. We demonstrate that it is feasible to translate ages across the lifespan of humans and cats.

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

Repositories

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

supp:PMC13382973/biolopen-15-062604-Dataset1.zip

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: R (1)
Size: 1 file, 1 script
Software Heritage: not checked
Found in: the supplementary material
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
1 file

supp:PMC13382973/biolopen-15-062604-Dataset2.zip

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: R (1)
Size: 1 file, 1 script
Software Heritage: not checked
Found in: the supplementary material
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
1 file

supp:PMC13382973/biolopen-15-062604-Dataset3.zip

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 0 files, 0 scripts
Software Heritage: not checked
Found in: the supplementary material
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)

supp:PMC13382973/biolopen-15-062604-Dataset4.zip

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: R (1)
Size: 1 file, 1 script
Software Heritage: not checked
Found in: the supplementary material
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
1 file

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 3 scripts, each with its path and the digest of its content;
  • 5 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 6 keywords, 8 MeSH terms, 2 funders, 62 references.

Cite

This paper

Januel, C., Morrow, E., Gibson, R., Gross, A., de Sousa, A. A., Rigby Dames, B. A., & Charvet, C. J. (2026). Cat brains age like humans: translating time shows pet cats live to be natural models for human aging. Biology open, 15(6), bio062604. https://doi.org/10.1242/bio.062604

BibTeX

@article{januel2026cat,
author = {Januel, Capucine and Morrow, Elijah and Gibson, Ryan and Gross, Amanda and de Sousa, Alexandra A. and Rigby Dames, Brier A. and Charvet, Christine J.},
title = {{Cat brains age like humans: translating time shows pet cats live to be natural models for human aging}},
journal = {Biology open},
year = {2026},
month = jun,
volume = {15},
number = {6},
pages = {bio062604},
publisher = {Company of Biologists},
issn = {2046-6390},
doi = {10.1242/bio.062604},
url = {https://doi.org/10.1242/bio.062604},
pmid = {42145034},
pmcid = {PMC13382973}
}

RIS

TY - JOUR
AU - Januel, Capucine
AU - Morrow, Elijah
AU - Gibson, Ryan
AU - Gross, Amanda
AU - de Sousa, Alexandra A.
AU - Rigby Dames, Brier A.
AU - Charvet, Christine J.
TI - Cat brains age like humans: translating time shows pet cats live to be natural models for human aging
T2 - Biology open
J2 - Biol Open
PY - 2026
DA - 2026/06/22
VL - 15
IS - 6
SP - bio062604
SN - 2046-6390
PB - Company of Biologists
DO - 10.1242/bio.062604
UR - https://doi.org/10.1242/bio.062604
LA - en
ER -

CSL-JSON

{
"id": "10.1242/bio.062604",
"type": "article-journal",
"title": "Cat brains age like humans: translating time shows pet cats live to be natural models for human aging",
"container-title": "Biology open",
"author": [
{
"family": "Januel",
"given": "Capucine"
},
{
"family": "Morrow",
"given": "Elijah"
},
{
"family": "Gibson",
"given": "Ryan"
},
{
"family": "Gross",
"given": "Amanda"
},
{
"family": "de Sousa",
"given": "Alexandra A."
},
{
"family": "Rigby Dames",
"given": "Brier A."
},
{
"family": "Charvet",
"given": "Christine J."
}
],
"container-title-short": "Biol Open",
"volume": "15",
"issue": "6",
"page": "bio062604",
"DOI": "10.1242/bio.062604",
"PMID": "42145034",
"PMCID": "PMC13382973",
"ISSN": "2046-6390",
"publisher": "Company of Biologists",
"URL": "https://doi.org/10.1242/bio.062604",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
22
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1016/j.xpro.2026.104667
Protocol for diffusion magnetic resonance imaging and tractography in ex vivo mouse models.
Journal: STAR protocols
In common: structural MRI / diffusion, 3 references
[2] doi:10.1038/s41467-026-73071-7 [code]
Brain maintenance biomarkers from structural and functional interactions in aging and neurodegeneration.
Journal: Nature communications
In common: structural MRI / diffusion, clinical / translational, 2 references
[3] doi:10.1038/s41598-026-49034-9
Multimodal preclinical study of long-term effects of prenatal ultrasound on the mouse central nervous system.
Journal: Scientific reports
In common: structural MRI / diffusion, 2 references
[4] doi:10.1038/s41467-026-71360-9 [code]
Perinatal brain developmental transition revealed by transcriptomic and proteomic analyses of Bama miniature pigs.
Journal: Nature communications
In common: tidyverse, other, 1 reference
[5] doi:10.1111/jcpp.70178 [code]
What makes a lonely child: environmental, health, and multimodal neuroimaging correlates of prospective loneliness in the ABCD study.
Journal: Journal of child psychology and psychiatry, and allied disciplines
In common: tidyverse, structural MRI / diffusion, clinical / translational, 1 reference
[6] doi:10.3389/fnsys.2026.1753562
When the gatekeeper falls: developmental vulnerability of the thalamic reticular nucleus in neonatal and pediatric hypoxic-ischemic brain injury.
Journal: Frontiers in systems neuroscience
In common: 2 references
[7] doi:10.1162/imag.a.1290 [code]
Calibration of MRI-based reference intervals to new samples.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: structural MRI / diffusion, 2 references
[8] doi:10.1016/j.isci.2026.116439 [code]
Decoding the role of transcriptomic clocks in the human prefrontal cortex.
Journal: iScience
In common: tidyverse, 1 reference
[9] doi:10.1186/s12916-026-04869-x [code]
The tissue-specific effects of glucose-lowering drug targets on aging mediated through DNA methylation: a multi-omics genetic study.
Journal: BMC medicine
In common: tidyverse, 1 reference
[10] doi:10.21203/rs.3.rs-9060414/v1 [code]
Cross-Species Aging Knowledge Integration into Agentic AI Platform Uncovers Conserved Mechanisms
Journal: Research Square (preprint)
In common: tidyverse, 1 reference

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.