OSCR

The Development of Hippocampal-Cortical Functional Connectivity in Infants and Toddlers.

Code ↔ Paper

6 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 6 matches
  1. [1] § Materials and Methods › Data Processing and Analyses › Hierarchical Clustering Analysis ↔ R_superclusters_leave1out.Rmd, lines 33–89 · score 0.74 · Euclidean distance, subtracted posterior, distance matrix, Ward, hemispheres, hierarchical
  2. [2] § Materials and Methods › Data Processing and Analyses › Hierarchical Clustering Analysis ↔ R_hierarchical_clustering.Rmd, lines 66–80 · score 0.67 · Euclidean distance, distance matrix, hierarchical clustering, Ward
  3. [3] § Results › Maturation of Functional Connectivity Along the Hippocampal Long‐Axis Reveals Canonical Cortical Networks Associated With Cognition in Adults ↔ R_superclusters_stats.Rmd, lines 188–220 · score 0.61 · Post hoc, pairwise comparisons, way interaction, model, superclusters, bins
  4. [4] § Results › Maturation of Functional Connectivity Along the Hippocampal Long‐Axis Reveals Canonical Cortical Networks Associated With Cognition in Adults ↔ R_hierarchical_clustering.Rmd, lines 159–196 · score 0.59 · cingulo opercular, medial parietal, mPFC, entorhinal, parahippocampal, dorsal
  5. [5] § Materials and Methods › Statistical Analyses ↔ R_superclusters_stats.Rmd, lines 188–220 · score 0.55 · Post hoc, FDR, emmeans, residuals, omnibus, pairwise
  6. [6] § Materials and Methods › Data Processing and Analyses › Cluster Validation ↔ R_superclusters_stats.Rmd, lines 797–852 · score 0.51 · parahippocampal supercluster, cross validated, selection, bias, weighted, axis

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 Markdown · 948 lines · 39 KB · MIT · 3 matches

  1. ---
  2. title: "Supercluster Statistics"
  3. output: html_notebook
  4. ---
  5. Version 1.0, July 2025, SA
  6. This script calculates a weighted average of data clustered together 100% consistently across leave1out iterations, and runs the statistical comparisons for each supercluster.
  7. It plots the supercluster connectivity profiles in Figure 4.
  8. It also runs the statistical analyses and plots for inside vs outside infantile amnesia window comparisons (Figure 5)
  9. Input: threshMat.csv and Hippo_BinxAxis_F_betas.txt
  10. # Packages and functions
  11. ```{r}
  12. library(dplyr)
  13. library(stringr)
  14. library(emmeans)
  15. library(ggplot2)
  16. library(nlme)
  17. library(car)
  18. library(Rmisc)
  19. ```
  20. # Read in and prepare the data
  21. ```{r}
  22. ### specify directory, CHANGE TO YOUR PATH
  23. dir<-"/Your/path/here"
  24. #### read in binarized, thresholded matrix.
  25. ### 1 is where clustering was consistent across all subjects, 0 was inconsistent
  26. data_threshMat <- read.csv(paste(dir, "/threshMat.csv", sep=""), header = FALSE)
  27. ### get rid of diagonal and lower triangle of the binarized matrix
  28. diag(data_threshMat)<-0
  29. data_threshMat[lower.tri(data_threshMat)]<-0
  30. ### read in our original data and format it for our purposes
  31. data <- read.table(paste(dir, "/Hippo_BinxAxis_F_betas.txt", sep=""), header = TRUE)
  32. ### keep the top 44 clusters for cluster threshold of 10
  33. data<-subset(data, clust < 45)
  34. ## collapse over hem for each subj
  35. data_ag_hem<-aggregate(data[, "beta"], by=(list(data$subj, data$ax, data$bin, data$clust)), mean)
  36. colnames(data_ag_hem)<-c("subj","ax","bin","clust","beta")
  37. ```
  38. # Analyses using leave-one-out cross validation
  39. ## Selectively average ant and post separately
  40. ```{r}
  41. #### specify which clusters/rois go into each supercluster
  42. supercluster_1<-c(1,6,7,28,34,36,41,43)
  43. supercluster_2<-c(2,3,9,11,13,14,16,19,20,22,24,30,31,32,37,38,40,44)
  44. supercluster_3<-c(4,15,17,23,25,26,29,33,35,39)
  45. supercluster_4<-c(5,10)
  46. supercluster_5<-c(8,12,27,42)
  47. supercluster_6<-c(18,21)
  48. ### append supercluster info to our dataframe
  49. data_ag_hem<-mutate(data_ag_hem, supercluster = case_when(clust %in% supercluster_1 ~ 1,
  50. clust %in% supercluster_2 ~ 2,
  51. clust %in% supercluster_3 ~ 3,
  52. clust %in% supercluster_4 ~ 4,
  53. clust %in% supercluster_5 ~ 5,
  54. clust %in% supercluster_6 ~ 6))
  55. ### loop through to create a column of ages and append to our dataframe
  56. ages<-as.data.frame(c("00mo", "01mo", "02mo", "03mo", "04mo", "05mo", "06mo", "07mo", "08mo", "09mo", "10mo", "11mo", "12mo", "13mo", "14mo", "15mo", "16mo", "17mo", "18mo", "19mo", "20mo", "21mo", "22mo", "23mo", "24mo", "25mo", "26mo"))
  57. colnames(ages)<-c("age")
  58. for (r in 1:nrow(data_ag_hem)){
  59. for (a in 1:nrow(ages))
  60. if ((str_detect(data_ag_hem[r,"subj"], pattern = ages[a,])) ==TRUE) {
  61. data_ag_hem[r,"age"]<-a-1
  62. } else if ((str_detect(data_ag_hem[r,"subj"], pattern = "00mo"))) {
  63. data_ag_hem[r,"age"]<-0
  64. }
  65. }
  66. ### initialize some empty lists to append to later, for each supercluster
  67. data_sc_1<-data.frame(matrix(nrow=0, ncol=6))
  68. colnames(data_sc_1)<-c("subj","bin","age","ax","superclust","beta")
  69. data_sc_2<-data.frame(matrix(nrow=0, ncol=6))
  70. colnames(data_sc_2)<-c("subj","bin","age","ax","superclust","beta")
  71. data_sc_3<-data.frame(matrix(nrow=0, ncol=6))
  72. colnames(data_sc_3)<-c("subj","bin","age","ax","superclust","beta")
  73. data_sc_4<-data.frame(matrix(nrow=0, ncol=6))
  74. colnames(data_sc_4)<-c("subj","bin","age","ax","superclust","beta")
  75. data_sc_5<-data.frame(matrix(nrow=0, ncol=6))
  76. colnames(data_sc_5)<-c("subj","bin","age","ax","superclust","beta")
  77. data_sc_6<-data.frame(matrix(nrow=0, ncol=6))
  78. colnames(data_sc_6)<-c("subj","bin","age","ax","superclust","beta")
  79. ### loop through matrix and when there is a 1, average the two roi hippo-cortical conn values together
  80. for (r in 1:nrow(data_threshMat)) {
  81. for (c in 1:ncol(data_threshMat)) {
  82. if (data_threshMat[r,c]==1){
  83. #print("yes")
  84. temp_subset<-subset(data_ag_hem, (clust==r | clust==c))
  85. ### average across clust
  86. temp_agg<-aggregate(temp_subset[, "beta"], by=(list(temp_subset$subj,temp_subset$bin, temp_subset$age, temp_subset$ax, temp_subset$supercluster)), mean)
  87. colnames(temp_agg)<-c("subj","bin","age","ax","superclust","beta")
  88. if (temp_agg[1,"superclust"]=="1") {
  89. data_sc_1<-rbind(data_sc_1, temp_agg)
  90. }
  91. if (temp_agg[1,"superclust"]=="2") {
  92. data_sc_2<-rbind(data_sc_2, temp_agg)
  93. }
  94. if (temp_agg[1,"superclust"]=="3") {
  95. data_sc_3<-rbind(data_sc_3, temp_agg)
  96. }
  97. if (temp_agg[1,"superclust"]=="4") {
  98. data_sc_4<-rbind(data_sc_4, temp_agg)
  99. }
  100. if (temp_agg[1,"superclust"]=="5") {
  101. data_sc_5<-rbind(data_sc_5, temp_agg)
  102. }
  103. if (temp_agg[1,"superclust"]=="6") {
  104. data_sc_6<-rbind(data_sc_6, temp_agg)
  105. }
  106. }
  107. }
  108. }
  109. ### data for each supercluster weighted by consistency across leave-one-out analysis
  110. data_sc_1<-aggregate(data_sc_1[, "beta"], by=(list(data_sc_1$subj, data_sc_1$bin, data_sc_1$age, data_sc_1$ax)), mean)
  111. colnames(data_sc_1)<-c("subj","bin","age","ax","beta")
  112. data_sc_1$supercluster<-1
  113. data_sc_2<-aggregate(data_sc_2[, "beta"], by=(list(data_sc_2$subj, data_sc_2$bin, data_sc_2$age, data_sc_2$ax)), mean)
  114. colnames(data_sc_2)<-c("subj","bin","age","ax","beta")
  115. data_sc_2$supercluster<-2
  116. data_sc_3<-aggregate(data_sc_3[, "beta"], by=(list(data_sc_3$subj, data_sc_3$bin, data_sc_3$age, data_sc_3$ax)), mean)
  117. colnames(data_sc_3)<-c("subj","bin","age","ax","beta")
  118. data_sc_3$supercluster<-3
  119. ## nothing in this one, parahippocampal. Because the ROIs were not clustered together 100% of the time.
  120. # data_sc_4<-aggregate(data_sc_4[, "beta"], by=(list(data_sc_4$subj, data_sc_4$bin)), mean)
  121. # colnames(data_sc_4)<-c("subj","bin","beta")
  122. # data_sc_4$supercluster<-4
  123. data_sc_5<-aggregate(data_sc_5[, "beta"], by=(list(data_sc_5$subj, data_sc_5$bin, data_sc_5$age, data_sc_5$ax)), mean)
  124. colnames(data_sc_5)<-c("subj","bin","age","ax","beta")
  125. data_sc_5$supercluster<-5
  126. data_sc_6<-aggregate(data_sc_6[, "beta"], by=(list(data_sc_6$subj, data_sc_6$bin, data_sc_6$age, data_sc_6$ax)), mean)
  127. colnames(data_sc_6)<-c("subj","bin","age","ax","beta")
  128. data_sc_6$supercluster<-6
  129. #data_LOO<-rbind(data_sc_1,data_sc_2,data_sc_3,data_sc_5,data_sc_6)
  130. data_SC_all<-rbind(data_sc_1, data_sc_2, data_sc_3, data_sc_5, data_sc_6)
  131. ```
  132. ## Omnibus test across superclusters
  133. ```{r}
  134. ### turn variables into factors
  135. data_SC_all$bin<-as.factor(data_SC_all$bin)
  136. data_SC_all$supercluster<-as.factor(data_SC_all$supercluster)
  137. ## model
  138. ### can take some time to run, can alternatively read in saved output model RDS below
  139. # model<-lme(beta ~ ax*bin*supercluster, random= ~1|subj, weights=varIdent(form=~1|bin*ax*supercluster), data=data_SC_all, control = lmeControl(msMaxIter=1000, msMaxEval=1000), na.action=na.omit)
  140. model<-readRDS('/your/path/here/mod1_weighted_ax_bin_supercluster.rda') ### CHANGE TO YOUR PATH. OR RUN ABOVE MODEL.
  141. ## model diagnostics
  142. hist(residuals(model))
  143. plot(model)
  144. ## stats
  145. anova(model)
  146. #### post hocs
  147. ## these are the pairwise comparisons used in the manuscript
  148. ## stats for 2 way interactions for each supercluster can be found next to each subplot below
  149. emmeans(model, list(pairwise ~ ax|bin|supercluster), adjust = "none")
  150. emmeans(model, list(pairwise ~ bin|ax|supercluster), adjust = "none")
  151. ### save the output, if desired
  152. # capture.output(emmeans(model, list(pairwise ~ bin|ax|supercluster), adjust = "fdr"), file="/Users/audrainsp/Library/CloudStorage/OneDrive-NationalInstitutesofHealth/BabyHippos/R_BabyHippos/GitHub/mod2_weighted_ax_bin_supercluster_emmeans1_fdr_updated.doc")
  153. #
  154. # capture.output(emmeans(model, list(pairwise ~ ax|bin|supercluster), adjust = "fdr"), file="/Users/audrainsp/Library/CloudStorage/OneDrive-NationalInstitutesofHealth/BabyHippos/R_BabyHippos/GitHub/mod2_weighted_ax_bin_supercluster_emmeans2_fdr_updated.doc")
  155. ```
  156. ## Models and Plots
  157. Note: images will be saved to your Downloads folder
  158. ### Cingulo-opercular supercluster
  159. ```{r, fig.height=4,fig.width=4.5}
  160. ## prepare the data
  161. data_SC<-data_sc_1 ### this is weighted averaged data across component clusters
  162. data_SC$bin<-as.factor(data_SC$bin)
  163. ## run the model
  164. model<-lme(beta ~ ax*bin, random= ~1|subj, weights=varIdent(form=~1|bin), data=data_SC, na.action=na.omit)
  165. ## model diagnostics
  166. # hist(residuals(model))
  167. # plot(model)
  168. # stats
  169. anova(model)
  170. ## summarize for plotting
  171. stats<-summarySE(data=data_SC, measurevar = "beta", groupvars = c("bin","ax"), na.rm=TRUE)
  172. stats$upper_se<-stats$beta + stats$se
  173. stats$lower_se<-stats$beta - stats$se
  174. ## plot
  175. tiff("~/Downloads/cing_operc.tiff", units="in", width=4.5, height=4, res=1000)
  176. ggplot(stats, aes(x=bin, y=beta, group=ax)) +
  177. geom_line(size=1, aes(linetype="solid", color=ax)) +
  178. geom_errorbar(width = .0, aes(ymin=lower_se, ymax=upper_se)) +
  179. theme_classic() +
  180. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  181. scale_x_discrete(limits=c("1", "2", "3", "4"), labels=c("0-6", "7-12", "13-18","19-25"))+
  182. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  183. scale_color_manual(values=c('#152370','#6577a1')) +
  184. geom_hline(yintercept=0)+
  185. # ggtitle("cingulo-opercular
  186. # supercluster")+
  187. labs(x="age", y="connectivity", color="hippocampal axis")
  188. dev.off()
  189. ```
  190. ### Dorsal frontal parietal supercluster
  191. ```{r, fig.height=4,fig.width=4.5}
  192. ## prepare the data
  193. data_SC<-data_sc_2 ### this is weighted averaged data across component clusters
  194. data_SC$bin<-as.factor(data_SC$bin)
  195. ## run the model
  196. model<-lme(beta ~ ax*bin, random= ~1|subj, data=data_SC, weights=varIdent(form=~1|bin), na.action=na.omit)
  197. ## model diagnostics
  198. hist(residuals(model))
  199. plot(model)
  200. ## stats
  201. anova(model)
  202. ## summarize for plotting
  203. stats<-summarySE(data=data_SC, measurevar = "beta", groupvars = c("bin","ax"), na.rm=TRUE)
  204. stats$upper_se<-stats$beta + stats$se
  205. stats$lower_se<-stats$beta - stats$se
  206. ## plot
  207. tiff("~/Downloads/dFPN.tiff", units="in", width=4.5, height=4, res=1000)
  208. ggplot(stats, aes(x=bin, y=beta, group=ax)) +
  209. geom_line(size=1, aes(linetype="solid", color=ax)) +
  210. geom_errorbar(width = .0, aes(ymin=lower_se, ymax=upper_se)) +
  211. theme_classic() +
  212. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  213. scale_x_discrete(limits=c("1", "2", "3", "4"), labels=c("0-6", "7-12", "13-18","19-25"))+
  214. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  215. scale_color_manual(values=c('#4bf52a','#bdf7b2')) +
  216. geom_hline(yintercept=0)+
  217. # ggtitle("dorsal frontal parietal
  218. # supercluster")+
  219. labs(x="age", y="connectivity", color="hippocampal axis")
  220. dev.off()
  221. ```
  222. ### mPFC-STS supercluster
  223. ```{r, fig.height=4,fig.width=4.5}
  224. ## prepare the data
  225. data_SC<-data_sc_3 ### this is weighted averaged data across component clusters
  226. data_SC$bin<-as.factor(data_SC$bin)
  227. ## run the model
  228. model<-lme(beta ~ ax*bin, random= ~1|subj, weights=varIdent(form=~1|bin), data=data_SC, na.action=na.omit)
  229. ## model diagnostics
  230. # hist(residuals(model))
  231. # plot(model)
  232. ## stats
  233. anova(model)
  234. ## summarize for plotting
  235. stats<-summarySE(data=data_SC, measurevar = "beta", groupvars = c("bin","ax"), na.rm=TRUE)
  236. stats$upper_se<-stats$beta + stats$se
  237. stats$lower_se<-stats$beta - stats$se
  238. ## plot
  239. tiff("~/Downloads/mPFCSTS.tiff", units="in", width=4.5, height=4, res=1000)
  240. ggplot(stats, aes(x=bin, y=beta, group=ax)) +
  241. geom_line(size=1, aes(linetype="solid", color=ax)) +
  242. geom_errorbar(width = .0, aes(ymin=lower_se, ymax=upper_se)) +
  243. theme_classic() +
  244. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  245. scale_x_discrete(limits=c("1", "2", "3", "4"), labels=c("0-6", "7-12", "13-18","19-25"))+
  246. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  247. scale_color_manual(values=c('#f2f207','#fafab4')) +
  248. geom_hline(yintercept=0)+
  249. # ggtitle("vmPFC-STS
  250. # supercluster")+
  251. labs(x="age", y="connectivity", color="hippocampal axis")
  252. dev.off()
  253. ```
  254. ### Medial parietal supercluster
  255. ```{r, fig.height=4,fig.width=4.5}
  256. ## prepare the data
  257. data_SC<-data_sc_5 ### this is weighted averaged data across component clusters
  258. data_SC$bin<-as.factor(data_SC$bin)
  259. ## run the model
  260. model<-lme(beta ~ ax*bin, random= ~1|subj, weights=varIdent(form=~1|bin), data=data_SC, na.action=na.omit)
  261. ## model diagnostics
  262. # hist(residuals(model))
  263. # plot(model)
  264. ## stats
  265. anova(model)
  266. ## summarize for plotting
  267. stats<-summarySE(data=data_SC, measurevar = "beta", groupvars = c("bin","ax"), na.rm=TRUE)
  268. stats$upper_se<-stats$beta + stats$se
  269. stats$lower_se<-stats$beta - stats$se
  270. ## plot
  271. tiff("~/Downloads/parietal.tiff", units="in", width=4.5, height=4, res=1000)
  272. ggplot(stats, aes(x=bin, y=beta, group=ax)) +
  273. geom_line(size=1, aes(linetype="solid", color=ax)) +
  274. geom_errorbar(width = .0, aes(ymin=lower_se, ymax=upper_se)) +
  275. theme_classic() +
  276. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  277. scale_x_discrete(limits=c("1", "2", "3", "4"), labels=c("0-6", "7-12", "13-18","19-25"))+
  278. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  279. scale_color_manual(values=c('#fa750f','#faa666')) +
  280. geom_hline(yintercept=0)+
  281. # ggtitle("medial parietal
  282. # supercluster")+
  283. labs(x="age", y="connectivity", color="hippocampal axis")
  284. dev.off()
  285. ```
  286. ### Entorhinal supercluster
  287. ```{r, fig.height=4,fig.width=4.5}
  288. ## prepare the data
  289. data_SC<-data_sc_6 ### this is weighted averaged data across component clusters
  290. data_SC$bin<-as.factor(data_SC$bin)
  291. ## run the model
  292. model<-lme(beta ~ ax*bin, random= ~1|subj, weights=varIdent(form=~1|bin), data=data_SC, na.action=na.omit)
  293. ## model diagnostics
  294. # hist(residuals(model))
  295. # plot(model)
  296. ## stats
  297. anova(model)
  298. ## summarize for plotting
  299. stats<-summarySE(data=data_SC, measurevar = "beta", groupvars = c("bin","ax"), na.rm=TRUE)
  300. stats$upper_se<-stats$beta + stats$se
  301. stats$lower_se<-stats$beta - stats$se
  302. ## plot
  303. tiff("~/Downloads/EC.tiff", units="in", width=4.5, height=4, res=1000)
  304. ggplot(stats, aes(x=bin, y=beta, group=ax)) +
  305. geom_line(size=1, aes(linetype="solid", color=ax)) +
  306. geom_errorbar(width = .0, aes(ymin=lower_se, ymax=upper_se)) +
  307. theme_classic() +
  308. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  309. scale_x_discrete(limits=c("1", "2", "3", "4"), labels=c("0-6", "7-12", "13-18","19-25"))+
  310. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  311. scale_color_manual(values=c('#28fcfc','#bfffff')) +
  312. geom_hline(yintercept=0)+
  313. # ggtitle("entorhinal
  314. # supercluster")+
  315. labs(x="age", y="connectivity", color="hippocampal axis")
  316. dev.off()
  317. ```
  318. ## LOESS plots to visualize continuous data
  319. Plotting anterior and posterior data separately and overlaid for best visualization
  320. ### Cingulo-opercular supercluster
  321. ```{r, fig.height=4,fig.width=4.5}
  322. SC_data<-subset(data_sc_1, supercluster==1 & ax=="ant")
  323. tiff("~/Downloads/CP_1.tiff", units="in", width=4.5, height=4, res=1000)
  324. ggplot(SC_data, aes(y=beta, x=age)) +
  325. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  326. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  327. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  328. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  329. geom_point(size=2, alpha=0.7) +
  330. geom_smooth(method="loess", level=0.95, col="#152370") +
  331. theme_classic() +
  332. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  333. scale_shape_manual(values=c(20))+
  334. guides(shape = FALSE, size = FALSE)+
  335. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  336. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  337. labs(y = "connectivity (Fisher z)",
  338. x = "age (months)",
  339. title = "")
  340. dev.off()
  341. SC_data<-subset(data_sc_1, supercluster==1 & ax=="post")
  342. tiff("~/Downloads/CP_2.tiff", units="in", width=4.5, height=4, res=1000)
  343. ggplot(SC_data, aes(y=beta, x=age)) +
  344. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  345. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  346. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  347. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  348. geom_point(size=2, alpha=0.7) +
  349. geom_smooth(method="loess", level=0.95, col="#6577a1") +
  350. theme_classic() +
  351. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  352. scale_shape_manual(values=c(20))+
  353. guides(shape = FALSE, size = FALSE)+
  354. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  355. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  356. labs(y = "connectivity (Fisher z)",
  357. x = "age (months)",
  358. title = "")
  359. dev.off()
  360. ### both plots overlaid
  361. SC_data<-subset(data_sc_1, supercluster==1)
  362. tiff("~/Downloads/CP_3.tiff", units="in", width=4.5, height=4, res=1000)
  363. ggplot(SC_data, aes(y=beta, x=age, group=ax, color=ax)) +
  364. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  365. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  366. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  367. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  368. geom_smooth(method="loess", level=0.95) +
  369. scale_color_manual(values=c("#152370","#6577a1"))+
  370. theme_classic() +
  371. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  372. scale_shape_manual(values=c(20))+
  373. guides(shape = FALSE, size = FALSE)+
  374. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  375. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  376. labs(y = "connectivity (Fisher z)",
  377. x = "age (months)",
  378. title = "")
  379. dev.off()
  380. ```
  381. ### Dorsal frontal parietal supercluster
  382. ```{r, fig.height=4,fig.width=4.5}
  383. SC_data<-subset(data_sc_2, supercluster==2 & ax=="ant")
  384. tiff("~/Downloads/FPN_1.tiff", units="in", width=4.5, height=4, res=1000)
  385. ggplot(SC_data, aes(y=beta, x=age)) +
  386. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  387. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  388. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  389. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  390. geom_point(size=2, alpha=0.7) +
  391. geom_smooth(method="loess", level=0.95, col="#4bf52a") +
  392. theme_classic() +
  393. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  394. scale_shape_manual(values=c(20))+
  395. guides(shape = FALSE, size = FALSE)+
  396. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  397. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  398. labs(y = "connectivity (Fisher z)",
  399. x = "age (months)",
  400. title = "")
  401. dev.off()
  402. SC_data<-subset(data_sc_2, supercluster==2 & ax=="post")
  403. tiff("~/Downloads/FPN_2.tiff", units="in", width=4.5, height=4, res=1000)
  404. ggplot(SC_data, aes(y=beta, x=age)) +
  405. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  406. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  407. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  408. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  409. geom_point(size=2, alpha=0.7) +
  410. geom_smooth(method="loess", level=0.95, col="#a2f792") +
  411. theme_classic() +
  412. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  413. scale_shape_manual(values=c(20))+
  414. guides(shape = FALSE, size = FALSE)+
  415. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  416. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  417. labs(y = "connectivity (Fisher z)",
  418. x = "age (months)",
  419. title = "")
  420. dev.off()
  421. SC_data<-subset(data_sc_2, supercluster==2)
  422. tiff("~/Downloads/FPN_3.tiff", units="in", width=4.5, height=4, res=1000)
  423. ggplot(SC_data, aes(y=beta, x=age, group=ax, color=ax)) +
  424. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  425. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  426. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  427. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  428. geom_smooth(method="loess", level=0.95) +
  429. scale_color_manual(values=c("#4bf52a","#bdf7b2"))+
  430. theme_classic() +
  431. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  432. scale_shape_manual(values=c(20))+
  433. guides(shape = FALSE, size = FALSE)+
  434. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  435. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  436. labs(y = "connectivity (Fisher z)",
  437. x = "age (months)",
  438. title = "")
  439. dev.off()
  440. ```
  441. ### mPFC-STS supercluster
  442. ```{r, fig.height=4,fig.width=4.5}
  443. SC_data<-subset(data_sc_3, supercluster==3 & ax=="ant")
  444. tiff("~/Downloads/STS_1.tiff", units="in", width=4.5, height=4, res=1000)
  445. ggplot(SC_data, aes(y=beta, x=age)) +
  446. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  447. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  448. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  449. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  450. geom_point(size=2, alpha=0.7) +
  451. geom_smooth(method="loess", level=0.95, col="#f2f207") +
  452. theme_classic() +
  453. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  454. scale_shape_manual(values=c(20))+
  455. guides(shape = FALSE, size = FALSE)+
  456. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  457. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  458. labs(y = "connectivity (Fisher z)",
  459. x = "age (months)",
  460. title = "")
  461. dev.off()
  462. SC_data<-subset(data_sc_3, supercluster==3 & ax=="post")
  463. tiff("~/Downloads/STS_2.tiff", units="in", width=4.5, height=4, res=1000)
  464. ggplot(SC_data, aes(y=beta, x=age)) +
  465. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  466. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  467. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  468. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  469. geom_point(size=2, alpha=0.7) +
  470. geom_smooth(method="loess", level=0.95, col="#fafab4") +
  471. theme_classic() +
  472. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  473. scale_shape_manual(values=c(20))+
  474. guides(shape = FALSE, size = FALSE)+
  475. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  476. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  477. labs(y = "connectivity (Fisher z)",
  478. x = "age (months)",
  479. title = "")
  480. dev.off()
  481. SC_data<-subset(data_sc_3, supercluster==3)
  482. tiff("~/Downloads/STS_3.tiff", units="in", width=4.5, height=4, res=1000)
  483. ggplot(SC_data, aes(y=beta, x=age, group=ax, color=ax)) +
  484. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  485. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  486. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  487. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  488. geom_smooth(method="loess", level=0.95) +
  489. scale_color_manual(values=c("#f2f207","#fafab4"))+
  490. theme_classic() +
  491. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  492. scale_shape_manual(values=c(20))+
  493. guides(shape = FALSE, size = FALSE)+
  494. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  495. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  496. labs(y = "connectivity (Fisher z)",
  497. x = "age (months)",
  498. title = "")
  499. dev.off()
  500. ```
  501. ### Medial parietal supercluster
  502. ```{r, fig.height=4,fig.width=4.5}
  503. SC_data<-subset(data_sc_5, supercluster==5 & ax=="ant")
  504. tiff("~/Downloads/parietal_1.tiff", units="in", width=4.5, height=4, res=1000)
  505. ggplot(SC_data, aes(y=beta, x=age)) +
  506. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  507. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  508. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  509. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  510. geom_point(size=2, alpha=0.7) +
  511. geom_smooth(method="loess", level=0.95, col="#fa750f") +
  512. theme_classic() +
  513. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  514. scale_shape_manual(values=c(20))+
  515. guides(shape = FALSE, size = FALSE)+
  516. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  517. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  518. labs(y = "connectivity (Fisher z)",
  519. x = "age (months)",
  520. title = "")
  521. dev.off()
  522. SC_data<-subset(data_sc_5, supercluster==5 & ax=="post")
  523. tiff("~/Downloads/parietal_2.tiff", units="in", width=4.5, height=4, res=1000)
  524. ggplot(SC_data, aes(y=beta, x=age)) +
  525. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  526. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  527. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  528. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  529. geom_point(size=2, alpha=0.7) +
  530. geom_smooth(method="loess", level=0.95, col="#faa666") +
  531. theme_classic() +
  532. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  533. scale_shape_manual(values=c(20))+
  534. guides(shape = FALSE, size = FALSE)+
  535. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  536. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  537. labs(y = "connectivity (Fisher z)",
  538. x = "age (months)",
  539. title = "")
  540. dev.off()
  541. SC_data<-subset(data_sc_5, supercluster==5)
  542. tiff("~/Downloads/parietal_3.tiff", units="in", width=4.5, height=4, res=1000)
  543. ggplot(SC_data, aes(y=beta, x=age, group=ax, color=ax)) +
  544. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  545. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  546. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  547. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  548. geom_smooth(method="loess", level=0.95) +
  549. scale_color_manual(values=c("#fa750f","#faa666"))+
  550. theme_classic() +
  551. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  552. scale_shape_manual(values=c(20))+
  553. guides(shape = FALSE, size = FALSE)+
  554. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  555. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  556. labs(y = "connectivity (Fisher z)",
  557. x = "age (months)",
  558. title = "")
  559. dev.off()
  560. ```
  561. ### Entorhinal supercluster
  562. ```{r, fig.height=4,fig.width=4.5}
  563. SC_data<-subset(data_sc_6, supercluster==6 & ax=="ant")
  564. tiff("~/Downloads/EC_1.tiff", units="in", width=4.5, height=4, res=1000)
  565. ggplot(SC_data, aes(y=beta, x=age)) +
  566. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  567. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  568. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  569. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  570. geom_point(size=2, alpha=0.7) +
  571. geom_smooth(method="loess", level=0.95, col="#28fcfc") +
  572. theme_classic() +
  573. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  574. scale_shape_manual(values=c(20))+
  575. guides(shape = FALSE, size = FALSE)+
  576. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  577. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  578. labs(y = "connectivity (Fisher z)",
  579. x = "age (months)",
  580. title = "")
  581. dev.off()
  582. SC_data<-subset(data_sc_6, supercluster==6 & ax=="post")
  583. tiff("~/Downloads/EC_2.tiff", units="in", width=4.5, height=4, res=1000)
  584. ggplot(SC_data, aes(y=beta, x=age)) +
  585. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  586. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  587. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  588. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  589. geom_point(size=2, alpha=0.7) +
  590. geom_smooth(method="loess", level=0.95, col="#bfffff") +
  591. theme_classic() +
  592. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  593. scale_shape_manual(values=c(20))+
  594. guides(shape = FALSE, size = FALSE)+
  595. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  596. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  597. labs(y = "connectivity (Fisher z)",
  598. x = "age (months)",
  599. title = "")
  600. dev.off()
  601. SC_data<-subset(data_sc_6, supercluster==6)
  602. tiff("~/Downloads/EC_3.tiff", units="in", width=4.5, height=4, res=1000)
  603. ggplot(SC_data, aes(y=beta, x=age, group=ax, color=ax)) +
  604. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  605. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  606. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  607. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  608. geom_smooth(method="loess", level=0.95) +
  609. scale_color_manual(values=c("#28fcfc","#bfffff"))+
  610. theme_classic() +
  611. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  612. scale_shape_manual(values=c(20))+
  613. guides(shape = FALSE, size = FALSE)+
  614. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  615. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  616. labs(y = "connectivity (Fisher z)",
  617. x = "age (months)",
  618. title = "")
  619. dev.off()
  620. ```
  621. # Analyses without using leave-one-out cross validation
  622. ## Parahippocampal Supercluster
  623. As the parahippocampal supercluster was the only one that did not show 100% clustering consistency, we cannot do selective averaging here. So just plot the raw data to see what it looks like. This is not corrected for subject-level bias as the other superclusters are.
  624. ### Models and plot
  625. ```{r, fig.height=4,fig.width=4.5}
  626. ## define the parahippocampal supercluster
  627. data_SC<-subset(data_ag_hem, supercluster=="4")
  628. ## next collapse over clusters
  629. data_SC<-aggregate(data_SC[, "beta"], by=(list(data_SC$subj, data_SC$ax, data_SC$bin)), mean)
  630. colnames(data_SC)<-c("subj","ax","bin","beta")
  631. ## make a factor
  632. data_SC$bin<-as.factor(data_SC$bin)
  633. ## model it
  634. model<-lme(beta ~ ax*bin, random= ~1|subj, data=data_SC, na.action=na.omit, weights=varIdent(form=~1|bin), control = lmeControl(msMaxIter=1000, msMaxEval=1000))
  635. ## model diagnostics
  636. # hist(residuals(model))
  637. # plot(model)
  638. ## stats
  639. anova(model)
  640. ## posthocs
  641. emmeans(model, list(pairwise ~ ax|bin), adjust = "fdr")
  642. emmeans(model, list(pairwise ~ bin|ax), adjust = "fdr")
  643. ## summarize for plotting
  644. stats<-summarySE(data=data_SC, measurevar = "beta", groupvars = c("bin","ax"), na.rm=TRUE)
  645. stats$upper_se<-stats$beta + stats$se
  646. stats$lower_se<-stats$beta - stats$se
  647. ## plot
  648. tiff("~/Downloads/test.tiff", units="in", width=4.5, height=4, res=1000)
  649. ggplot(stats, aes(x=bin, y=beta, group=ax)) +
  650. geom_line(size=1, aes(linetype="solid", color=ax)) +
  651. geom_errorbar(width = .0, aes(ymin=lower_se, ymax=upper_se)) +
  652. theme_classic() +
  653. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), axis.text=element_text(size=18),
  654. plot.title = element_text(size=26, face="bold", hjust=0.5), legend.position="bottom") +
  655. theme(text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  656. scale_x_discrete(limits=c("1", "2", "3", "4"), labels=c("0-6", "7-12", "13-18","19-25"))+
  657. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  658. scale_color_manual(values=c('#f5200c','#fc9288')) +
  659. geom_hline(yintercept=0)+
  660. # ggtitle("parahippocampal
  661. # supercluster")+
  662. labs(x="age (months)", y="connectivity", color="hippocampal axis")
  663. dev.off()
  664. ```
  665. ### LOESS continuous plots
  666. ```{r, fig.height=4,fig.width=4.5}
  667. ## subset
  668. data_SC<-subset(data_ag_hem, supercluster=="4" & ax == "ant") ## it's made up of clusters 5 and 10
  669. ## next collapse over clusters
  670. data_SC<-aggregate(data_SC[, "beta"], by=(list(data_SC$subj, data_SC$ax, data_SC$age, data_SC$supercluster)), mean)
  671. colnames(data_SC)<-c("subj","ax", "age", "supercluster","beta")
  672. ## plot
  673. tiff("~/Downloads/PH_1.tiff", units="in", width=4.5, height=4, res=1000)
  674. ggplot(data_SC, aes(y=beta, x=age)) +
  675. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  676. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  677. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  678. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  679. geom_point(size=2, alpha=0.7) +
  680. geom_smooth(method="loess", level=0.95, col="#f5200c") +
  681. theme_classic() +
  682. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  683. scale_shape_manual(values=c(20))+
  684. guides(shape = FALSE, size = FALSE)+
  685. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  686. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  687. labs(y = "connectivity (Fisher z)",
  688. x = "age (months)",
  689. title = "")
  690. dev.off()
  691. data_SC<-subset(data_ag_hem, supercluster==4 & ax=="post")
  692. tiff("~/Downloads/PH_2.tiff", units="in", width=4.5, height=4, res=1000)
  693. ggplot(data_SC, aes(y=beta, x=age)) +
  694. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  695. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  696. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  697. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  698. geom_point(size=2, alpha=0.7) +
  699. geom_smooth(method="loess", level=0.95, col="#fc9288") +
  700. theme_classic() +
  701. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  702. scale_shape_manual(values=c(20))+
  703. guides(shape = FALSE, size = FALSE)+
  704. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  705. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  706. labs(y = "connectivity (Fisher z)",
  707. x = "age (months)",
  708. title = "")
  709. dev.off()
  710. ### both plots overlaid
  711. data_SC<-subset(data_ag_hem, supercluster==4)
  712. tiff("~/Downloads/PH_3.tiff", units="in", width=4.5, height=4, res=1000)
  713. ggplot(data_SC, aes(y=beta, x=age, group=ax, color=ax)) +
  714. geom_vline(xintercept = 6, color="grey", linetype="solid") +
  715. geom_vline(xintercept = 12, color="grey", linetype="solid") +
  716. geom_vline(xintercept = 18, color="grey", linetype="solid") +
  717. geom_vline(xintercept = 25, color="grey", linetype="solid") +
  718. geom_smooth(method="loess", level=0.95) +
  719. scale_color_manual(values=c("#f5200c","#fc9288"))+
  720. theme_classic() +
  721. theme(axis.title = element_text(size=24), axis.ticks.x=element_blank(), text = element_text(size = 18), axis.text.x = element_text(size=20), axis.text.y = element_text(size=22), plot.title = element_text(face="bold", hjust=0.5, size=22), legend.position="none")+
  722. scale_shape_manual(values=c(20))+
  723. guides(shape = FALSE, size = FALSE)+
  724. scale_y_continuous(expand = c(0, 0), limits = c(0,0.3), breaks=seq(0,0.3,.05))+
  725. scale_x_continuous(expand = c(0, 0), limits = c(0,26), breaks=seq(0,26,5))+
  726. labs(y = "connectivity (Fisher z)",
  727. x = "age (months)",
  728. title = "")
  729. dev.off()
  730. ```

R_superclusters_stats.Rmd at commit 21f7dac, under MIT · at the source

Overview

Authors: Sam Audrain1, Shawn C Milleville1, Jenna M Wilson1, Jude Baffoe‐Bonnie1, Stephen J Gotts1, Alex Martin1
ORCID iDs: Sam Audrain
  1. Section on Cognitive Neuropsychology, Laboratory of Brain and Cognition, National Institute of Mental Health, NIH, Bethesda, Maryland, USA
Institutions: National Institutes of Health (United States); National Institute of Mental Health (United States)
Journal: Human brain mapping, volume 47, issue 4, article e70475
Dates: received 5 September 2025; accepted 5 February 2026; published online 8 March 2026; in print March 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1002/hbm.70475 · PMID 41795623 · PMCID PMC12967640 · OpenAlex W7134184073
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism), developmental (subfield)
Methods: Preprocessing, Statistics, Smoothing, state filtering, decompositions, Machine learning, Connectivity, fMRI & imaging
Keywords: functional connectivity, hippocampus, infant, long‐axis
MeSH: Child Development*, Connectome*, Hippocampus*, Neocortex*, Nerve Net*, Child, Preschool, Female, Humans, Infant, Magnetic Resonance Imaging, Male, Neurodevelopment (* major topic)
Topic: Memory and Neural Mechanisms (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: NIH HHS (ZIA MH-002930); Intramural Research Program; National Institutes of Health (ZIA MH‐002930); National Institute of Mental Health; NIMH NIH HHS
Citations: cited by 2 papers (Europe PMC); 64 references in the paper
Research resources: RRID:SCR_001847, AFNI RRID:SCR_005927

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

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

saudrain/paper_BabyHippos

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 21f7dacbba58c0ad291fefbb39fc1221360c1c69, 8 August 2025
Languages: R (11), MATLAB (1)
Size: 26 files, 12 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README, license file, 11 notebooks
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: ggplot2 (9 files), nlme (7 files), emmeans (6 files), tidyverse (5 files), car (1 file), cowplot (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
14 files

The paper's code and data availability statement is in the Data section.

Tracing map

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

What the map holds:

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

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

Data

Datasets cited

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1002/hbm.70475.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 4 keywords, 12 MeSH terms, 5 funders, 59 references, 2 RRIDs.

Cite

This paper

Audrain, S., Milleville, S. C., Wilson, J. M., Baffoe‐Bonnie, J., Gotts, S. J., & Martin, A. (2026). The Development of Hippocampal-Cortical Functional Connectivity in Infants and Toddlers. Human brain mapping, 47(4), e70475. https://doi.org/10.1002/hbm.70475

BibTeX

@article{audrain2026development,
author = {Audrain, Sam and Milleville, Shawn C and Wilson, Jenna M and Baffoe‐Bonnie, Jude and Gotts, Stephen J and Martin, Alex},
title = {{The Development of Hippocampal-Cortical Functional Connectivity in Infants and Toddlers}},
journal = {Human brain mapping},
year = {2026},
month = mar,
volume = {47},
number = {4},
pages = {e70475},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/hbm.70475},
url = {https://doi.org/10.1002/hbm.70475},
pmid = {41795623},
pmcid = {PMC12967640}
}

RIS

TY - JOUR
AU - Audrain, Sam
AU - Milleville, Shawn C
AU - Wilson, Jenna M
AU - Baffoe‐Bonnie, Jude
AU - Gotts, Stephen J
AU - Martin, Alex
TI - The Development of Hippocampal-Cortical Functional Connectivity in Infants and Toddlers
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/03/01
VL - 47
IS - 4
SP - e70475
SN - 1065-9471
PB - Wiley
DO - 10.1002/hbm.70475
UR - https://doi.org/10.1002/hbm.70475
LA - en
ER -

CSL-JSON

{
"id": "10.1002/hbm.70475",
"type": "article-journal",
"title": "The Development of Hippocampal-Cortical Functional Connectivity in Infants and Toddlers",
"container-title": "Human brain mapping",
"author": [
{
"family": "Audrain",
"given": "Sam"
},
{
"family": "Milleville",
"given": "Shawn C"
},
{
"family": "Wilson",
"given": "Jenna M"
},
{
"family": "Baffoe‐Bonnie",
"given": "Jude"
},
{
"family": "Gotts",
"given": "Stephen J"
},
{
"family": "Martin",
"given": "Alex"
}
],
"container-title-short": "Hum Brain Mapp",
"volume": "47",
"issue": "4",
"page": "e70475",
"DOI": "10.1002/hbm.70475",
"PMID": "41795623",
"PMCID": "PMC12967640",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/hbm.70475",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
1
]
]
}
}

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.3389/fcogn.2026.1767179 [code]
Adult lifespan effects on functional specialization along the hippocampal long axis.
Journal: Frontiers in cognition
In common: fMRI, 8 references
[2] doi:10.1016/j.isci.2026.116747 [code]
Age and loneliness relate to reduced trust learning and alterations in amygdala function.
Journal: iScience
In common: nlme, car, emmeans, 3 other tools, fMRI
[3] doi:10.1073/pnas.2606871123 [code]
Oxytocin modulates the neurocomputational mechanisms engaged in learning rank relationships in social networks.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: nlme, car, emmeans, 3 other tools
[4] doi:10.1111/psyp.70265 [code]
Neurocognitive Dynamics of Translating Information From a Spatial Map Into Action.
Journal: Psychophysiology
In common: nlme, car, emmeans, 3 other tools
[5] doi:10.1002/hbm.70526 [code]
Resting-State and Task Functional Magnetic Resonance Imaging Network Topology Metrics With no Threshold Selection to Predict Cognition.
Journal: Human brain mapping
In common: nlme, car, emmeans, 2 other tools, fMRI, 1 reference
[6] doi:10.1162/imag.a.1204
Sex-specific associations of gestational age at birth and birth size with early life within-network brain connectivity: An exploratory study.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: developmental, fMRI, 5 references
[7] doi:10.1038/s41467-026-69950-8 [code]
Dopaminergic processes predict temporal distortions in event memory.
Journal: Nature communications
In common: car, emmeans, cowplot, 2 other tools, 1 reference
[8] doi:10.1002/hbm.70605 [code]
BrainEnrich: Revealing Biological Insights for Imaging-Derived Phenotypes Through Transcriptomic Enrichment.
Journal: Human brain mapping
In common: nlme, emmeans, cowplot, 2 other tools, 1 reference
[9] doi:10.1162/imag.a.1313 [code]
Functional specialization of angular gyrus and precuneus subregions for perspective-guided autobiographical memory retrieval.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: emmeans, ggplot2, tidyverse, 3 references
[10] doi:10.1093/braincomms/fcag318 [code]
Antenatal maternal anaemia and infant brain structure: high-field (3 T) and ultra-low-field (64 mT) MRI findings from South Africa.
Journal: Brain communications
In common: car, emmeans, ggplot2, 1 other tool, developmental, 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.