OSCR

Regional BOLD variability reflects microstructural maturation and neuronal ensheathment in the preterm infant cortex.

Code ↔ Paper

11 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 11 matches
  1. [1] § Results › Patient demographics ↔ BOLDDiff_clinicaldata.R, lines 1–60 · score 0.92 · neonatal asphyxia, birth weight, birth height, head circumference, dMRI, fMRI
  2. [2] § Methods › Neonatal and demographic data statistical analysis ↔ BOLDDiff_clinicaldata.R, lines 1–60 · score 0.89 · birth weight, birth height, categorical variables, continuous variables, head circumference, SES
  3. [3] § Methods › MRI data statistical analysis ↔ BOLDDiff_Lasso_analysis.R, lines 62–188 · score 0.86 · pure LASSO, zero coefficients, glmnet, RMSE, elastic, selection
  4. [4] § Methods › Gene expression analysis ↔ Genetic_analysisANDgraphs.R, lines 91–133 · score 0.85 · mid fetal, early fetal, 8–13, 16–22, 35–37, late fetal
  5. [5] § Results › Genetic expression patterns during early brain development ↔ Genetic_analysisANDgraphs.R, lines 91–133 · score 0.79 · mid fetal, early fetal, 8–13, 16–22, 35–37, late fetal
  6. [6] § Results › Relationship between longitudinal cortical microstructural changes and BOLD variability delta changes ↔ BOLDDiff_Lasso_analysis.R, lines 230–273 · score 0.69 · pure LASSO, extraMD, elastic, diff, predicted, se
  7. [7] § Methods › Gene expression analysis ↔ Genetic_analysisANDgraphs.R, lines 1–39 · score 0.62 · A1C, DLPFC, IPC, M1, MFC, VLPFC
  8. [8] § Methods › Gene expression data analysis ↔ Genetic_analysisANDgraphs.R, lines 403–443 · score 0.62 · post hoc, HSD, Tukey, ANOVA, pairwise, interaction
  9. [9] § Methods › MRI data statistical analysis ↔ BOLDDiff_clustering_analysis.R, lines 54–98 · score 0.60 · ConsensusClusterPlus, Euclidean, elbow, distance, clustered, optimal
  10. [10] § Results › Longitudinal cortical BOLD variability and diffusion microstructural changes during early preterm brain development ↔ BOLDDiff_Longitudinal_graphs.R, lines 261–320 · score 0.58 · delta changes, BOLD variability longitudinal, asterisks, AUD, THAL, VIS
  11. [11] § Results › Longitudinal cortical BOLD variability and diffusion microstructural changes during early preterm brain development ↔ BOLDDiff_Longitudinal_analysis.R, lines 741–811 · score 0.57 · extraTrans, extraMD, diff, DTI, DKI, MK

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 · 901 lines · 32 KB · CC-BY-4.0 · 4 matches

  1. library(dplyr)
  2. library(factoextra)
  3. library(tidyr)
  4. library(cluster)
  5. library(ggrepel)
  6. library(ggplot2)
  7. library(tidyverse)
  8. library(nlme)
  9. library(mgcv)
  10. require(lme4)
  11. library(purrr)
  12. require("emmeans")
  13. library(broom.mixed)
  14. library(lmerTest)
  15. library(easystats)
  16. setwd("")
  17. data <- read.csv("PsychENCODE-W5-bulk-RPKM-data-scRNA-filtered-log2_revised.csv", header = TRUE)
  18. # Remove ITC and add PC to data
  19. data <- data %>%
  20. filter(region != 'ITC') %>% # Correct filtering
  21. mutate(PC = case_when(
  22. region %in% c('DLPFC', 'VLPFC') ~ 'PC2', # PFC
  23. region == 'OFC' ~ 'PC2', # Paralimbic belt
  24. region == 'MFC' ~ 'PC2', # Limbic
  25. region %in% c('M1', 'S1') ~ 'PC1', # SSM
  26. region == 'V1' ~ 'PC1', # Visual
  27. region %in% c('A1C', 'STC') ~ 'PC1', # Auditory
  28. region == 'IPC' ~ 'PC1' # Precuneus
  29. ))
  30. # Add data in Gestational weeks
  31. data <- data %>%
  32. mutate(age_weeks = round(age/7, 0))
  33. # Create sample_counts
  34. sample_counts <- data %>%
  35. group_by(age_weeks) %>%
  36. dplyr::summarize(observations = n_distinct(sample), .groups = 'drop')
  37. ggplot(sample_counts, aes(x = age_weeks, y = observations)) +
  38. geom_bar(stat = "identity", fill = "skyblue") + # Bar plot for number of observations
  39. scale_x_continuous(breaks = sample_counts$age_weeks, labels = sample_counts$age_weeks) + # Set x-axis breaks and labels
  40. theme_minimal() +
  41. labs(title = "Number of Observations per Age",
  42. x = "Age (weeks)",
  43. y = "Number of Observations") +
  44. theme(legend.position = "none") # No legend needed
  45. data <- data %>%
  46. filter(!age_weeks %in% 55)
  47. mean_age_weeks <- mean(data$age_weeks)
  48. sd_age_weeks <- sd(data$age_weeks)
  49. num_males <- nrow(data[data$sex == "M", ])
  50. total_subjects <- nrow(data)
  51. percentage_males <- (num_males / total_subjects) * 100
  52. mean_RIN <- mean(data$RIN)
  53. sd_RIN <- sd(data$RIN)
  54. mean_PMI <- mean(data$PMI)
  55. sd_PMI <- sd(data$PMI)
  56. region_count <- data %>%
  57. filter(symbol == "A2M") %>%
  58. group_by(sample) %>%
  59. summarise(region_count = n_distinct(region))
  60. all_region_count <- region_count %>%
  61. summarise(total = sum(region_count))
  62. write.csv(region_count, "region_count_per_sample.csv", row.names = FALSE)
  63. # Normality tests
  64. normality_results <- data %>%
  65. group_by(symbol, PC, Time) %>%
  66. summarise(p_value = map_dbl(list(log2_rpkm), ~ shapiro.test(.)$p.value), .groups = 'drop')
  67. non_normal_regions <- normality_results %>%
  68. filter(p_value < 0.05)
  69. write.csv(non_normal_regions, "non_normal_regions.csv",row.names = FALSE)
  70. ############### Fit model per gene ####################
  71. # OPTION 1 (T0 = mid fetal: 16-22; T1 = late fetal = 35-37 )
  72. data <- data %>%
  73. filter(!age_weeks %in% c(8, 9, 12, 13, 55)) %>% # Correct filtering
  74. mutate(Time = case_when(
  75. age_weeks %in% c('16', '17', '19', '21', '22') ~ 'T0',
  76. age_weeks %in% c('35', '37') ~ 'T1',
  77. ))
  78. # OPTION 2 (T0 = early fetal: 8-13; T1 = mid fetal = 16-22 )
  79. data <- data %>%
  80. filter(!age_weeks %in% c(35, 37, 55)) %>% # Correct filtering
  81. mutate(Time = case_when(
  82. age_weeks %in% c('8', '9', '12', '13') ~ 'T0',
  83. age_weeks %in% c('16', '17', '19', '21', '22' ) ~ 'T1',
  84. ))
  85. # OPTION 4 (T0 = early fetal: 8-13; T1 = mid fetal: 16-22; T2 = late fetal = 35-37 )
  86. data <- data %>%
  87. filter(!age_weeks %in% 55) %>% # Correct filtering
  88. mutate(Time = case_when(
  89. age_weeks %in% c('8', '9', '12', '13') ~ 'T0',
  90. age_weeks %in% c('16', '17', '19', '21', '22') ~ 'T1',
  91. age_weeks %in% c('35', '37') ~ 'T2',
  92. ))
  93. # Make data factorial
  94. data <- within(data, {
  95. PC <- factor(PC)
  96. Time <- factor(Time)
  97. sample <- factor(sample)
  98. symbol <- factor(symbol)
  99. region <- factor(region)
  100. age <- as.numeric(age)
  101. sex <- factor(sex)
  102. })
  103. genes <- unique(data$symbol)
  104. genes_df <- data.frame(gene = genes)
  105. #write.csv(genes_df, "genes.csv", row.names = FALSE)
  106. ######## MODEL LMER - Loop through each gene
  107. model_results <- list()
  108. for (gene in genes) {
  109. # Filter data for the current gene
  110. gene_data <- filter(data, symbol == gene)
  111. # Fit the model
  112. model <- tryCatch({
  113. lmer(log2_rpkm ~ Time * PC + RIN + sex + (1 | sample) + (1 | region),
  114. data = gene_data)
  115. }, error = function(e) {
  116. message("Error fitting model for gene: ", gene)
  117. return(NA)
  118. })
  119. # Store the results
  120. model_results[[gene]] <- model
  121. }
  122. #### Initialize a list to store all p-values
  123. all_pvalues_TimeT1 <- list()
  124. all_pvalues_PCPC2 <- list()
  125. all_pvalues_TimeT1PCPC2 <- list()
  126. for (gene in names(model_results)) {
  127. model <- model_results[[gene]]
  128. if (!is.na(model)) {
  129. # Check if the model is fitted
  130. model_summary <- summary(model)
  131. coefficients <- model_summary$coefficients
  132. # Extract p-values and estimates for TimeT1, PCPC2, and their interaction
  133. if ("TimeT1" %in% rownames(coefficients)) {
  134. estimate <- coefficients["TimeT1", "Estimate"]
  135. p_value <- coefficients["TimeT1", "Pr(>|t|)"]
  136. all_pvalues_TimeT1[[gene]] <- list(estimate = estimate, p_value = p_value)
  137. }
  138. if ("PCPC2" %in% rownames(coefficients)) {
  139. estimate <- coefficients["PCPC2", "Estimate"]
  140. p_value <- coefficients["PCPC2", "Pr(>|t|)"]
  141. all_pvalues_PCPC2[[gene]] <- list(estimate = estimate, p_value = p_value)
  142. }
  143. if ("TimeT1:PCPC2" %in% rownames(coefficients)) {
  144. estimate <- coefficients["TimeT1:PCPC2", "Estimate"]
  145. p_value <- coefficients["TimeT1:PCPC2", "Pr(>|t|)"]
  146. all_pvalues_TimeT1PCPC2[[gene]] <- list(estimate = estimate, p_value = p_value)
  147. }
  148. }
  149. }
  150. ###### Convert lists to data frames
  151. create_df <- function(pvalue_list, effect_name) {
  152. df <- tibble(
  153. gene = names(pvalue_list),
  154. estimate = sapply(pvalue_list, function(x) x$estimate),
  155. p_value = sapply(pvalue_list, function(x) x$p_value)
  156. ) %>%
  157. mutate(
  158. adjusted_p_value_fdr = p.adjust(p_value, method = "fdr"),
  159. effect = effect_name
  160. )
  161. return(df)
  162. }
  163. TimeT1_df <- create_df(all_pvalues_TimeT1, "TimeT1")
  164. PCPC2_df <- create_df(all_pvalues_PCPC2, "PCPC2")
  165. TimeT1PCPC2_df <- create_df(all_pvalues_TimeT1PCPC2, "TimeT1PCPC2")
  166. # Function to rename columns
  167. rename_columns <- function(df, prefix) {
  168. df %>%
  169. rename_with(~paste0(prefix, "_", .), -gene)
  170. }
  171. # Rename columns in each dataframe
  172. TimeT1_df <- rename_columns(TimeT1_df, "TimeT1")
  173. TimeT1_df <- TimeT1_df %>%
  174. select(-TimeT1_effect)
  175. PCPC2_df <- rename_columns(PCPC2_df, "PCPC2")
  176. PCPC2_df <- PCPC2_df %>%
  177. select(-PCPC2_effect)
  178. TimeT1PCPC2_df <- rename_columns(TimeT1PCPC2_df, "TimeT1_PCPC2")
  179. TimeT1PCPC2_df <- TimeT1PCPC2_df %>%
  180. select(-TimeT1_PCPC2_effect)
  181. # Join the dataframes
  182. all_effects_wide_df <- TimeT1_df %>%
  183. full_join(PCPC2_df, by = "gene") %>%
  184. full_join(TimeT1PCPC2_df, by = "gene")
  185. # Create separate dataframes for significant genes for each effect
  186. significant_TimeT1 <- TimeT1_df %>%
  187. filter(TimeT1_adjusted_p_value_fdr < 0.05)
  188. significant_PCPC2 <- PCPC2_df %>%
  189. filter(PCPC2_adjusted_p_value_fdr < 0.05)
  190. significant_TimeT1PCPC2 <- TimeT1PCPC2_df %>%
  191. filter(TimeT1_PCPC2_adjusted_p_value_fdr < 0.05)
  192. # Write results to CSV files
  193. write.csv(all_effects_wide_df, "all_effects_df.csv", row.names = FALSE)
  194. write.csv(significant_TimeT1, "Sign_TimeT1_df.csv", row.names = FALSE)
  195. write.csv(significant_PCPC2, "Sign_PCPC2_df.csv", row.names = FALSE)
  196. write.csv(significant_TimeT1PCPC2, "Sign_TimeT1PCPC2.csv", row.names = FALSE)
  197. ######## Initialize a list to store emmeans results for significant genes
  198. emmeans_results <- list()
  199. pairwise_Time <- list()
  200. pairwise_Cluster <- list()
  201. p_value_threshold <- 0.05
  202. all_significant_interaction_genes <- unique(significant_TimeT1PCPC2$gene)
  203. significant_interaction_genes_df <- data.frame(gene = all_significant_interaction_genes)
  204. write.csv(significant_interaction_genes_df, "significant_interaction_genes.csv", row.names = FALSE)
  205. # Perform emmeans analysis for significant genes in the interaction only
  206. for (gene in all_significant_interaction_genes) {
  207. model <- model_results[[gene]]
  208. if (!is.na(model)) {
  209. # Compute estimated marginal means
  210. emmCluster <- emmeans(model, ~ Time * PC)
  211. emmTime <- emmeans(model, ~ PC * Time)
  212. # Perform pairwise comparisons between T0 and T1 within each PC
  213. pairwise_comparisonsCluster <- contrast(emmCluster, "pairwise", by = "PC")
  214. # Perform pairwise comparisons between PC1 and PC2 within each Time point
  215. pairwise_comparisonsTime <- contrast(emmTime, "pairwise", by = "Time")
  216. # Store summary of significant differences, not adjusted for multiple comparisons
  217. pairwise_summaryCluster <- summary(pairwise_comparisonsCluster) %>%
  218. as.data.frame() %>%
  219. mutate(comparison_type = "Cluster"
  220. )
  221. pairwise_summaryTime <- summary(pairwise_comparisonsTime) %>%
  222. as.data.frame() %>%
  223. mutate(comparison_type = "Time"
  224. )
  225. #Apply FDR correction separately for Cluster and Time comparisons
  226. pairwise_summaryCluster <- pairwise_summaryCluster %>%
  227. mutate(p.adj = p.adjust(p.value, method = "fdr"),
  228. is_significant = ifelse(p.adj < p_value_threshold, TRUE, FALSE)) # Add significance based on FDR-adjusted p-value
  229. pairwise_summaryTime <- pairwise_summaryTime %>%
  230. mutate(p.adj = p.adjust(p.value, method = "fdr"),
  231. is_significant = ifelse(p.adj < p_value_threshold, TRUE, FALSE)) # Add significance based on FDR-adjusted p-value
  232. # Combine the results
  233. combined_summary <- bind_rows(pairwise_summaryCluster, pairwise_summaryTime) %>%
  234. mutate(gene = gene)
  235. # Store the combined results in the list
  236. emmeans_results[[gene]] <- combined_summary
  237. pairwise_Time[[gene]] <- pairwise_summaryTime
  238. pairwise_Cluster[[gene]] <- pairwise_summaryCluster
  239. }
  240. }
  241. # Convert the list of emmeans results to a data frame
  242. emmeans_results_df <- bind_rows(emmeans_results, .id = "gene") %>%
  243. select(gene, comparison_type, contrast, PC, Time, estimate, SE, df, t.ratio, p.value, p.adj, is_significant) # Reorder columns
  244. significant_emmeans_results_df <- emmeans_results_df %>%
  245. filter(is_significant == TRUE)
  246. pairwise_Time_df <- bind_rows(pairwise_Time, .id = "gene") %>%
  247. select(gene, contrast, Time, estimate, SE, df, t.ratio, p.value, p.adj, is_significant) # Reorder columns
  248. significant_pairwise_Time_df <- pairwise_Time_df %>%
  249. filter(is_significant == TRUE)
  250. pairwise_Cluster_df <- bind_rows(pairwise_Cluster, .id = "gene") %>%
  251. select(gene, contrast, PC, estimate, SE, df, t.ratio, p.value, p.adj, is_significant) # Reorder columns
  252. significant_pairwise_Cluster_df <- pairwise_Cluster_df %>%
  253. filter(is_significant == TRUE)
  254. write.csv(emmeans_results_df, "combined_pairwise_comparisons.csv", row.names = FALSE)
  255. write.csv(pairwise_Time_df, "Time_pairwise_comparisons.csv", row.names = FALSE)
  256. write.csv(pairwise_Cluster_df, "Cluster_pairwise_comparisons.csv", row.names = FALSE)
  257. write.csv(significant_emmeans_results_df, "significant_combined_pairwise_comparisons.csv", row.names = FALSE)
  258. write.csv(significant_pairwise_Time_df, "significant_Time_pairwise_comparisons.csv", row.names = FALSE)
  259. write.csv(significant_pairwise_Cluster_df, "significant_Cluster_pairwise_comparisons.csv", row.names = FALSE)
  260. ### Find Gene expression differences bewteen cluster between T0 and T1
  261. library(tidyr)
  262. pivot_Cluster <- pivot_wider(
  263. pairwise_Cluster_df,
  264. id_cols = gene,
  265. names_from = PC,
  266. values_from = c(estimate, is_significant),
  267. values_fill = NA
  268. )
  269. # Filter for genes that significantly increase/decrease in Cluster 1 (PC1) compared to PC2
  270. sig_differential_increase_morePC1 <- pivot_Cluster %>%
  271. filter(
  272. estimate_PC1 < 0 & # PC1 shows a negative estimate (indicating increase)
  273. is_significant_PC1 == TRUE & # PC1 change is significant
  274. estimate_PC1 < estimate_PC2 # PC1 increase is greater than PC2
  275. )
  276. sig_differential_decrease_morePC1 <- pivot_Cluster %>%
  277. filter(
  278. estimate_PC1 > 0 & # PC1 shows a positive estimate (indicating decrease)
  279. is_significant_PC1 == TRUE & # PC1 change is significant
  280. estimate_PC1 > estimate_PC2 # PC1 decrease is greater than PC2
  281. )
  282. # Filter for genes that significantly increase in Cluster 2 (PC1) compared to PC1
  283. sig_differential_increase_morePC2 <- pivot_Cluster %>%
  284. filter(
  285. estimate_PC2 < 0 & # PC1 shows a negative estimate (indicating increase)
  286. is_significant_PC2 == TRUE & # PC1 change is significant
  287. estimate_PC2 < estimate_PC1 # PC1 increase is greater than PC2
  288. )
  289. sig_differential_decrease_morePC2 <- pivot_Cluster %>%
  290. filter(
  291. estimate_PC2 > 0 & # PC1 shows a positive estimate (indicating decrease)
  292. is_significant_PC2 == TRUE & # PC1 change is significant
  293. estimate_PC2 > estimate_PC1 # PC1 decrease is greater than PC2
  294. )
  295. write.csv(sig_differential_increase_morePC1, "sig_differential_increase_morePC1.csv", row.names = FALSE)
  296. write.csv(sig_differential_increase_morePC2, "sig_differential_increase_morePC2.csv", row.names = FALSE)
  297. write.csv(sig_differential_decrease_morePC1, "sig_differential_decrease_morePC1.csv", row.names = FALSE)
  298. write.csv(sig_differential_decrease_morePC2, "sig_differential_decrease_morePC2.csv", row.names = FALSE)
  299. ###### Pairwise Time : evaluate changes between Clusters in each time point
  300. pairwise_Time_df <- read.csv("Time_pairwise_comparisons.csv", header = TRUE)
  301. library(tidyr)
  302. pivot_Time <- pivot_wider(
  303. pairwise_Time_df,
  304. id_cols = c(gene, contrast),
  305. names_from = Time,
  306. values_from = c(estimate, is_significant),
  307. values_fill = NA
  308. )
  309. # Classify genes based on the direction of their estimates
  310. # For T0
  311. T0_PC1supPC2 <- subset(pivot_Time, estimate_T0 > 0 & is_significant_T0 == TRUE)
  312. T0_PC2supPC1 <- subset(pivot_Time, estimate_T0 < 0 & is_significant_T0 == TRUE)
  313. # For T1
  314. T1_PC1supPC2 <- subset(pivot_Time, estimate_T1 > 0 & is_significant_T1 == TRUE)
  315. T1_PC2supPC1 <- subset(pivot_Time, estimate_T1 < 0 & is_significant_T1 == TRUE)
  316. write.csv(T0_PC1supPC2, "T0_PC1_sup_PC2_sig.csv", row.names = FALSE)
  317. write.csv(T0_PC2supPC1, "T0_PC2_sup_PC1_sig.csv", row.names = FALSE)
  318. write.csv(T1_PC1supPC2, "T1_PC1_sup_PC2_sig.csv", row.names = FALSE)
  319. write.csv(T1_PC2supPC1, "T1_PC2_sup_PC1_sig.csv", row.names = FALSE)
  320. ####### Perform t-test for each gene on emmeans
  321. wide_Cluster_df <- pairwise_Cluster_df %>%
  322. select(gene, PC, estimate) %>%
  323. pivot_wider(names_from = PC, values_from = estimate)
  324. Ttest_results <- wide_Cluster_df %>%
  325. rowwise() %>%
  326. mutate(
  327. p.value = t.test(c(PC1, PC2), alternative = "two.sided", na.rm = TRUE)$p.value,
  328. is_significant = p.value < p_value_threshold # Add significance column
  329. ) %>%
  330. select(gene, p.value, is_significant) # Keep desired columns
  331. sign_Ttest_results <- Ttest_results %>%
  332. filter(is_significant)
  333. write.csv(sign_Ttest_results, "significant_Ttest_Cluster.csv", row.names = FALSE)
  334. ####### Initialize a list to store ANOVA results
  335. anova_results_list <- list()
  336. # Loop through each significant gene
  337. # Loop through each significant gene
  338. for (gene in all_significant_interaction_genes) {
  339. # Subset the data for the current gene
  340. gene_data <- subset(pairwise_Cluster_df, gene == pairwise_Cluster_df$gene) # Ensure you're checking the correct column
  341. # Conduct ANOVA for the current gene
  342. anova_model <- aov(estimate ~ PC, data = gene_data)
  343. # Store the summary of ANOVA
  344. anova_results <- summary(anova_model)
  345. # Check if ANOVA is significant
  346. if (anova_results[[1]][["Pr(>F)"]][1] < 0.05) {
  347. # Perform post-hoc test
  348. post_hoc <- TukeyHSD(anova_model)
  349. # Extract contrasts from post-hoc results
  350. post_hoc_df <- as.data.frame(post_hoc$PC)
  351. # Add the gene name to the post-hoc results
  352. post_hoc_df$Gene <- gene
  353. post_hoc_df$Post_Hoc_Comparison <- rownames(post_hoc_df)
  354. # Add a significance column based on adjusted p-values
  355. post_hoc_df$Significant <- ifelse(post_hoc_df$`p adj` < 0.05, "Yes", "No")
  356. # Store significant results in the list
  357. anova_results_list[[gene]] <- post_hoc_df
  358. }
  359. }
  360. significant_anova_results_df <- do.call(rbind, anova_results_list)
  361. significant_anova_results_df <- significant_anova_results_df[, c("Gene", "Post_Hoc_Comparison", "diff", "lwr", "upr", "p adj", "Significant")]
  362. write.csv(significant_anova_results_df, "significant_anova_results.csv", row.names = FALSE)
  363. # First, let's verify that we have the same genes in both dataframes
  364. genes1 <- unique(significant_anova_results_df$Gene)
  365. genes2 <- unique(pairwise_Cluster_df$gene)
  366. # Merging the data frames
  367. combined_results <- cbind( pairwise_Cluster_df, significant_anova_results_df)
  368. write.csv(combined_results, "combined_results_pairwise_anova_results.csv", row.names = FALSE)
  369. ############### PLOTS
  370. ############### Genes increasing from T0 to T1 - PC1
  371. setwd("")
  372. ensheathment_genes <- read.csv("ensheathmentneurons.csv", header = TRUE) # Use header = TRUE if the first row contains column names
  373. gliogenesis_genes <- read.csv("gliogenesis.csv", header = TRUE) # Use header = TRUE if the first row contains column names
  374. oligo_genes <- read.csv("oligodendrocyte.csv", header = TRUE)
  375. all_genes <- Reduce(union, list(ensheathment_genes$gene, gliogenesis_genes$gene, oligo_genes$gene))
  376. all_genes_df <- as.data.frame(all_genes)
  377. common_genes <- Reduce(intersect, list(ensheathment_genes$gene, gliogenesis_genes$gene, oligo_genes$gene))
  378. common_genes_df <- as.data.frame(common_genes)
  379. oligo_ensheat_genes <- Reduce(union, list(ensheathment_genes$gene, oligo_genes$gene))
  380. oligo_ensheat_genes_df <- as.data.frame(oligo_ensheat_genes)
  381. gliogenesis_genes <- gliogenesis_genes$gene
  382. gliogenesis_genes_df <- as.data.frame(gliogenesis_genes)
  383. write.csv(all_genes_df, "combined_oligo_ensheatement_gliogenesis_genes.csv", row.names = FALSE)
  384. write.csv(common_genes_df, "common_oligo_ensheatement_gliogenesis_genes.csv", row.names = FALSE)
  385. write.csv(oligo_ensheat_genes_df, "oligo_ensheatement_genes.csv", row.names = FALSE)
  386. write.csv(gliogenesis_genes_df, "gliogenesis_genes.csv", row.names = FALSE)
  387. ############### Genes increased at T1 - PC1 vs PC2
  388. setwd("")
  389. ensheathment_genes_T1 <- read.csv("ensheathment_neurons_T1.csv", header = TRUE) # Use header = TRUE if the first row contains column names
  390. gliogenesis_genes_T1 <- read.csv("gliogenesis_T1.csv", header = TRUE) # Use header = TRUE if the first row contains column names
  391. T1_PC1supPC2_genes <- read.csv("T1_PC1_sup_PC2_sig.csv", header = TRUE) # Use header = TRUE if the first row contains column names
  392. allT1C1_genes <- Reduce(union, list(ensheathment_genes_T1$gene, gliogenesis_genes_T1$gene))
  393. allT1C1_genes_df <- as.data.frame(allT1C1_genes)
  394. allT1C1common_genes <- Reduce(intersect, list(ensheathment_genes_T1$gene, gliogenesis_genes_T1$gene))
  395. allT1C1common_genes_df <- as.data.frame(allT1C1common_genes)
  396. ## Genes that are increasing significantly from T0 to T1 more in PC1 vs PC2 and that are increased signficiantly at T1 in PC1 vs PC2
  397. long_allgenes_atT1 <- Reduce(intersect, list(all_genes_df$all_genes, T1_PC1supPC2_genes$gene))
  398. long_allgenes_atT1_df <- as.data.frame(long_allgenes_atT1)
  399. ## From the ones in the the neuro ensheatment, oligo and gliogenesis, increasing longitudinally more in PC1vsPC2
  400. common_long_T1_C1genes <- Reduce(intersect, list(allT1C1_genes_df$allT1C1_genes, all_genes_df$all_genes))
  401. common_long_T1_C1genes_df <- as.data.frame(common_long_T1_C1genes)
  402. write.csv(allT1C1_genes_df, "combinedT1C1_ensheatement_gliogenesis_genes.csv", row.names = FALSE)
  403. write.csv(allT1C1common_genes_df, "commonT1C1_ensheatement_gliogenesis_genes.csv", row.names = FALSE)
  404. write.csv(common_long_T1_C1genes_df, "common_LongT1_C1_genes.csv", row.names = FALSE)
  405. write.csv(long_allgenes_atT1_df, "common_LongT1_atC1_genes.csv", row.names = FALSE)
  406. #oligo <- oligo$Gene
  407. # Filter the dataset for genes of interest
  408. merged_data <- data %>%
  409. filter(symbol %in% all_genes)
  410. common_data <- data %>%
  411. filter(symbol %in% common_genes)
  412. oligo_ensheat_data <- data %>%
  413. filter(symbol %in% oligo_ensheat_genes)
  414. gliogenesis_data <- data %>%
  415. filter(symbol %in% gliogenesis_genes)
  416. write.csv(merged_data, "sigGenes_violinplots.csv", row.names = FALSE)
  417. custom_colors <- c("PC1" = "#A50000", # Example for PC1 (red)
  418. "PC2" = "#275D90") # Example for PC2 (blue)
  419. # Violin PLOT
  420. violin_plot <- ggplot(common_data, aes(x = Time, y = log2_rpkm, fill = PC)) +
  421. geom_violin(alpha = 0.7) +
  422. facet_wrap(~symbol, scales = "free_y", ncol = 4) +
  423. theme_bw() +
  424. labs(
  425. title = "Ensheathment, Gliogenesis and Oligodendrocyte Gene Expression Changes Over Time by Cluster",
  426. x = "Time Point",
  427. y = "Log2 RPKM",
  428. fill = "Cluster"
  429. ) +
  430. scale_fill_manual(values = custom_colors) +
  431. theme(
  432. axis.text.x = element_text(angle = 45, hjust = 1),
  433. strip.background = element_rect(fill = "white"),
  434. strip.text = element_text(face = "bold")
  435. )
  436. ggplot(merged_data, aes(x = Time, y = log2_rpkm, fill = PC, color = PC)) +
  437. geom_violin(alpha = 0.6) +
  438. # Remove width parameter and adjust position_dodge
  439. geom_jitter(position = position_jitterdodge(dodge.width = 0.8, jitter.width = 0.2),
  440. size = 1, alpha = 0.6) +
  441. facet_wrap(~symbol, scales = "free_y", ncol = 7) +
  442. scale_fill_manual(values = custom_colors) +
  443. scale_color_manual(values = custom_colors) +
  444. theme_minimal() +
  445. labs(
  446. title = "Ensheathment, Gliogenesis and Oligodendrocyte Gene Expression Changes Over Time by Cluster",
  447. x = "Time Point",
  448. y = "Log2 RPKM",
  449. fill = "Cluster"
  450. ) +
  451. theme(legend.position = "none",
  452. strip.text = element_text(face = "bold", size = 14),
  453. plot.title = element_text(face = "bold", size = 18, hjust = 0.5)
  454. ) + # Adjust main title size
  455. labs(x = "Time Point", y = "Log2 RPKM")
  456. # BOXPLOTs
  457. box_plot <- ggplot(gliogenesis_data, aes(x = Time, y = log2_rpkm, fill = region)) +
  458. geom_boxplot(outlier.shape = NA) + # Removing outliers for cleaner visualization
  459. facet_wrap(~symbol, scales = "free_y", ncol = 7) +
  460. theme_bw() +
  461. labs(
  462. title = "Gliogenesis Gene Expression Changes Over Time by Cluster",
  463. x = "Time Point",
  464. y = "Log2 RPKM",
  465. fill = "Cluster"
  466. ) +
  467. theme(
  468. axis.text.x = element_text(angle = 45, hjust = 1),
  469. strip.background = element_rect(fill = "white"),
  470. strip.text = element_text(face = "bold")
  471. )
  472. # Summaries - mean and std dev
  473. # MERGED DATA
  474. gene_merged_data <- merged_data %>%
  475. group_by(symbol, Time, PC) %>%
  476. summarise(
  477. gene_mean_expression = mean(log2_rpkm),
  478. gene_se_expression = sd(log2_rpkm) / sqrt(n()),
  479. .groups = 'drop'
  480. )
  481. cluster_merged_data <- merged_data %>%
  482. group_by(Time, PC) %>%
  483. summarise(
  484. cluster_mean_expression = mean(log2_rpkm),
  485. cluster_se_expression = sd(log2_rpkm) / sqrt(n()),
  486. .groups = 'drop'
  487. )
  488. write.csv(cluster_merged_data, "sigGenes_lineGraphs.csv", row.names = FALSE)
  489. # COMMON DATA
  490. gene_common_data <- PC1_common_data %>%
  491. group_by(symbol, Time, PC) %>%
  492. summarise(
  493. gene_mean_expression = mean(log2_rpkm),
  494. gene_se_expression = sd(log2_rpkm) / sqrt(n()),
  495. .groups = 'drop'
  496. )
  497. cluster_common_data <- PC1_common_data %>%
  498. group_by(Time, PC) %>%
  499. summarise(
  500. cluster_mean_expression = mean(log2_rpkm),
  501. cluster_se_expression = sd(log2_rpkm) / sqrt(n()),
  502. .groups = 'drop'
  503. )
  504. common_distinct_shapes <- c(16, 17, 15, 18, 8, 23, 25, 0)
  505. distinct_shapes <- common_distinct_shapes[1:8] # Use only the first 8 shapes for 8 ge
  506. merged_distinct_shapes <- c(16, 17, 15, 18, 8, 23, 25, 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 19, 20, 21, 22, 24, 26)
  507. distinct_shapes <- merged_distinct_shapes[1:27]
  508. # Sample data for plotting
  509. shapes <- data.frame(
  510. x_var = rnorm(100),
  511. y_var = rnorm(100),
  512. shape_var = sample(c(0:24, 21, 22, "★", "▲"), 100, replace = TRUE) # Numeric and character shapes
  513. )
  514. # Ensure shapes are either all numeric or all characters
  515. # Convert numeric shapes to factor
  516. shapes$shape_var <- as.factor(shapes$shape_var)
  517. # Create the plot with average values
  518. avg_dot_line_plot <- ggplot(gene_merged_data,
  519. aes(x = Time, y = gene_mean_expression,
  520. color = PC, shape = symbol,
  521. group = interaction(symbol, PC))) +
  522. geom_point(size = 4) +
  523. geom_line(linewidth = 1, alpha = 0.7) +
  524. geom_errorbar(aes(ymin = gene_mean_expression - gene_se_expression,
  525. ymax = gene_mean_expression + gene_se_expression),
  526. width = 0.2) +
  527. scale_shape_manual(values = c(0:24, 21, 22)) + # Using only numeric shapes
  528. scale_color_brewer(palette = "Set1") +
  529. theme_bw() +
  530. labs(
  531. title = "Average Gene Expression Changes Over Time by Cluster",
  532. x = "Time Point",
  533. y = "Average Log2 RPKM",
  534. color = "Cluster",
  535. shape = "Gene"
  536. ) +
  537. theme(
  538. axis.text.x = element_text(angle = 45, hjust = 1),
  539. legend.position = "right",
  540. panel.grid.minor = element_blank(),
  541. legend.key.size = unit(1.2, "cm"),
  542. plot.title = element_text(size = 14, face = "bold"),
  543. axis.title = element_text(size = 12),
  544. legend.title = element_text(size = 11),
  545. legend.text = element_text(size = 10)
  546. )
  547. # Plot 1: Line plot of cluster averages
  548. cluster_line_plot <- ggplot(cluster_merged_data,
  549. aes(x = Time, y = cluster_mean_expression, color = PC, group = PC)) +
  550. geom_line(linewidth = 1) +
  551. geom_point(size = 4) +
  552. geom_errorbar(aes(ymin = cluster_mean_expression - cluster_se_expression,
  553. ymax = cluster_mean_expression + cluster_se_expression),
  554. width = 0.2) +
  555. scale_color_brewer(palette = "Set1") +
  556. theme_bw() +
  557. labs(
  558. title = "Average Neuronal Ensheathment, Gliogenesis, Oligdendrocyte \nGene Expression Changes Over Time by Cluster",
  559. x = "Time Point",
  560. y = "Average Log2 RPKM",
  561. color = "Cluster"
  562. ) +
  563. theme(
  564. axis.text.x = element_text(angle = 45, hjust = 1),
  565. panel.grid.minor = element_blank(),
  566. plot.title = element_text(size = 14, face = "bold"),
  567. axis.title = element_text(size = 12)
  568. )
  569. gene_merged_data <- gene_merged_data %>%
  570. mutate(x_position = case_when(
  571. Time == "T0" & PC == "PC1" ~ 0.95,
  572. Time == "T0" & PC == "PC2" ~ 1.05,
  573. Time == "T1" & PC == "PC1" ~ 1.95,
  574. Time == "T1" & PC == "PC2" ~ 2.05
  575. ))
  576. gene_common_data <- gene_common_data %>%
  577. mutate(x_position = case_when(
  578. Time == "T0" & PC == "PC1" ~ 0.95,
  579. Time == "T0" & PC == "PC3" ~ 1.05,
  580. Time == "T1" & PC == "PC1" ~ 1.95,
  581. Time == "T1" & PC == "PC3" ~ 2.05
  582. ))
  583. # Scatter plot per gene in COMMON GENES
  584. refined_scatter_plot <- ggplot() +
  585. # Add individual gene points with different symbols
  586. geom_point(data = gene_merged_data,
  587. aes(x = x_position, y = gene_mean_expression,
  588. color = PC, shape = symbol),
  589. size = 3, alpha = 0.7) +
  590. # Add average lines
  591. geom_line(data = cluster_merged_data,
  592. aes(x = case_when(
  593. Time == "T0" ~ 1.025,
  594. Time == "T1" ~ 2.025
  595. ),
  596. y = cluster_mean_expression,
  597. color = PC,
  598. group = PC),
  599. linewidth = 1) +
  600. # Add error bars for cluster averages
  601. geom_errorbar(data = cluster_merged_data,
  602. aes(x = case_when(
  603. Time == "T0" ~ 1.025,
  604. Time == "T1" ~ 2.025
  605. ),
  606. ymin = cluster_mean_expression - cluster_se_expression,
  607. ymax = cluster_mean_expression + cluster_se_expression,
  608. color = PC),
  609. width = 0.05) +
  610. # Use custom colors
  611. scale_color_manual(values = custom_colors) +
  612. scale_shape_manual(values = c(0:24, 21, 22)) + # Using only numeric shapes +
  613. scale_x_continuous(breaks = c(1, 2), labels = c("T0", "T1")) +
  614. theme_bw() +
  615. labs(
  616. title = "Average Neuronal Ensheathment, Gliogenesis, Oligodendrocyte \nGene Expression Changes Over Time by Cluster",
  617. x = "Time Point",
  618. y = "Average Log2 RPKM",
  619. color = "Cluster",
  620. shape = "Gene"
  621. ) +
  622. theme(
  623. panel.grid.minor = element_blank(),
  624. plot.title = element_text(size = 14, face = "bold"),
  625. axis.title = element_text(size = 12),
  626. legend.position = "right"
  627. )
  628. # Scatter plot per gene in MERGED GENES
  629. library(ggplot2)
  630. library(dplyr)
  631. library(ggrepel)
  632. unique_genes <- gene_merged_data %>%
  633. filter(Time == "T1") %>%
  634. distinct(symbol, PC, .keep_all = TRUE) # Keep unique combinations of gene names and clusters
  635. unique_genes <- gene_common_data %>%
  636. filter(Time == "T1") %>%
  637. distinct(symbol, PC, .keep_all = TRUE) # Keep unique combinations of gene names and clusters
  638. ggplot() +
  639. # Add individual gene points without shape, just use color
  640. geom_point(data = gene_merged_data,
  641. aes(x = x_position, y = gene_mean_expression, color = PC),
  642. size = 3, alpha = 0.7) +
  643. # Add lighter lines for each gene within the same cluster
  644. geom_line(data = gene_merged_data,
  645. aes(x = x_position, y = gene_mean_expression, group = interaction(symbol, PC), color = PC),
  646. linewidth = 0.5, alpha = 0.3) +
  647. # Label unique genes for each cluster at Time Point 1
  648. geom_text_repel(data = unique_genes,
  649. aes(x = x_position, # Use the original x_position for labeling
  650. y = gene_mean_expression + 0.1,
  651. label = symbol,
  652. color = PC),
  653. size = 3,
  654. box.padding = 0.1, # Reduced padding around labels
  655. point.padding = 0.1, # Reduced padding around points
  656. segment.color = 'grey50') + # Color for connecting lines
  657. # Add average lines for each cluster
  658. geom_line(data = cluster_merged_data,
  659. aes(x = case_when(
  660. Time == "T0" ~ 1.025,
  661. Time == "T1" ~ 2.025
  662. ),
  663. y = cluster_mean_expression,
  664. color = PC,
  665. group = PC),
  666. linewidth = 1) +
  667. # Add error bars for cluster averages
  668. geom_errorbar(data = cluster_merged_data,
  669. aes(x = case_when(
  670. Time == "T0" ~ 1.025,
  671. Time == "T1" ~ 2.025
  672. ),
  673. ymin = cluster_mean_expression - cluster_se_expression,
  674. ymax = cluster_mean_expression + cluster_se_expression,
  675. color = PC),
  676. width = 0.05) +
  677. scale_color_brewer(palette = "Set1") +
  678. # Add extra space on both sides for the gene labels
  679. scale_x_continuous(breaks = c(1, 2), labels = c("T0", "T1"), expand = expansion(mult = c(0.1, 0.1))) +
  680. theme_bw() +
  681. labs(
  682. title = "Average Neuronal Ensheathment, Gliogenesis, Oligodendrocyte \nGene Expression Changes Over Time by Cluster",
  683. x = "Time Point",
  684. y = "Average Log2 RPKM",
  685. color = "Cluster"
  686. ) +
  687. theme(
  688. panel.grid.minor = element_blank(),
  689. plot.title = element_text(size = 14, face = "bold"),
  690. axis.title = element_text(size = 12),
  691. legend.position = "right"
  692. )
  693. cluster_common_data <- cluster_common_data %>%
  694. mutate(ymin = cluster_mean_expression - cluster_se_expression,
  695. ymax = cluster_mean_expression + cluster_se_expression)
  696. gene_scatter_plot <- ggplot(gene_common_data,
  697. aes(x = Time, y = gene_mean_expression, color = PC)) +
  698. # Jittered points for individual observations
  699. geom_jitter(width = 0.2, size = 3, alpha = 0.7) +
  700. # Use a color palette for clusters
  701. scale_color_brewer(palette = "Set1") +
  702. theme_bw() +
  703. # Add lines for cluster averages
  704. geom_line(data = cluster_common_data,
  705. aes(x = Time,
  706. y = cluster_mean_expression,
  707. color = PC,
  708. group = PC),
  709. linewidth = 1) +
  710. # Labels and theme adjustments
  711. labs(
  712. title = "Gene Expression Distribution by Time and Cluster",
  713. x = "Time Point",
  714. y = "Average Log2 RPKM",
  715. color = "Cluster"
  716. ) +
  717. # Formatting for plot appearance
  718. theme(
  719. axis.text.x = element_text(angle = 45, hjust = 1),
  720. panel.grid.minor = element_blank(),
  721. plot.title = element_text(size = 14, face = "bold"),
  722. axis.title = element_text(size = 12)
  723. )

Genetic_analysisANDgraphs.R, under CC-BY-4.0 · at the source

Overview

Authors: Joana Sa de Almeida1,2,3, Andrew Boehringer2, Serafeim Loukas2, Elda Fischi-Gomez4,5,6, Annemijn Van Der Veek2, Lara Lordier1, Sebastien Courvoisier7,8, François Lazeyras7,8, Dimitri Van De Ville7,8,9, Gareth Ball3,10, Petra S Hüppi1,2
  1. Division of Development and Growth, Department of Women’s, Children’s, and Adolescent Health, University Hospitals of Geneva, Geneva, Switzerland
  2. Department of Pediatrics, Gynecology and Obstetrics, University of Geneva, Geneva, Switzerland
  3. Developmental Imaging, Murdoch Children’s Research Institute, Melbourne, VIC Australia
  4. CIBM Center for Biomedical Imaging, University of Lausanne, Lausanne, Switzerland
  5. Department of Radiology, University Hospital and University of Lausanne, Lausanne, Switzerland
  6. Signal Processing Laboratory, Ecole Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland
  7. CIBM Center for Biomedical Imaging, University of Geneva, Geneva, Switzerland
  8. Department of Radiology and Medical Informatics, University of Geneva, Geneva, Switzerland
  9. Neuro-X Institute, Ecole Polytechnique Fédérale de Lausanne (EPFL), Geneva, Switzerland
  10. Department of Paediatrics, University of Melbourne, Melbourne, VIC Australia
Journal: Nature communications, volume 17, issue 1, article 4849
Dates: received 2 August 2025; accepted 20 March 2026; published online 9 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-71415-x · PMID 41957008 · PMCID PMC13222875 · OpenAlex W4412840896
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism), other condition (population), developmental (subfield)
Methods: Spectral & time-frequency, Statistics, Machine learning, Smoothing, state filtering, decompositions, Preprocessing, fMRI & imaging, Physiology & signal measures
Keywords: Glial development, Neuro-vascular interactions, Gene expression
MeSH: Cerebral Cortex*, Infant, Premature*, Neurons*, Oxygen*, Female, Gestational Age, Humans, Infant, Newborn, Magnetic Resonance Imaging, Male, Neurodevelopment (* major topic)
Topic: Advanced Neuroimaging Techniques and Applications (Radiology, Nuclear Medicine and Imaging, Medicine), according to OpenAlex
Funding: Swiss National Science Foundation (135817, 324730-163084); Schweizerische Akademie der Medizinischen Wissenschaften (Swiss Academy of Medical Sciences) (YTCR 49/19)
Citations: not cited yet (Europe PMC); 123 references in the paper

Abstract

Blood Oxygen Level Dependent (BOLD) variability reflects meaningful brain activity, yet its structural and biological correlates during early development remain unknown. Using longitudinal resting-state fMRI and multi-shell diffusion imaging acquired longitudinally in 54 very preterm infants (at 33-weeks’ gestational age and term-equivalent-age) and 24 full-term newborns, we investigated how BOLD variability evolves in very preterm infants, its relationship with cortical microstructure and gene expression, using the BrainSpan dataset, and how it differs from full-term newborns at term-equivalent age. During preterm development, BOLD variability increased in primary sensory-sensorimotor and proto-Default-Mode-Network regions, accompanied by decreases in cortical diffusivity. Gene expression analysis revealed concurrent upregulation of genes mediating gliogenesis and neuronal ensheathment. At term-equivalent age, very preterm infants showed decreased BOLD variability and increased cortical diffusivity, compared to full-term newborns. In this work, we show that BOLD variability reflects cortical microstructural maturation, mediated by upregulation of gliogenesis and neuronal ensheathment. Interruption of these processes by preterm birth identifies putative mechanisms of preterm brain injury.

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 11 matches between paragraphs and lines of code.

ekaden/smt

License: BSD-2-Clause
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: b4dfca6779de411ea93e41de470fe3667ae60dc7, 14 January 2019
Languages: C/C++ (34), C++ (6)
Size: 54 files, 40 scripts
Software Heritage: archived
Found in: “Code availability”
Holds: README, license file, documentation
Not found: CITATION.cff, environment file, tests, continuous integration
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
41 files
At the source: github.com/ekaden/smt

fsl.fmrib.ox.ac.uk/fsl/fslwiki

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)

developingconnectome.org

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)

git.fmrib.ox.ac.uk/matteob/dhcp_neo_dmri_pipeline_release

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)

Zenodo 18875986

License: CC-BY-4.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Languages: R (10)
Size: 10 files, 10 scripts
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (10 files), ggplot2 (9 files), reshape2 (5 files), glmnet (3 files), lmerTest (3 files), Plotly (2 files), psych (2 files), broom (1 file), easystats (1 file), emmeans (1 file), lme4 (1 file), mgcv (1 file), nlme (1 file), rstatix (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
10 files
At the source:

Code availability

Software and code used in this study for MRI analysis are publicly available as part of FSL v5.0.10 (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/), MRtrix3 (Tournier et al.110), SMT (https://github.com/ekaden/smt) and DIPY (https://docs.dipy.org/stable/interfaces/reconstruction_flow.html?utm_source=chatgpt.com) software packages. dMRI data were pre-processed using the EDDY command adapted for neonatal motion, from the neonatal dMRI automated pipeline from the developing Human Connectome Project (dHCP, http://www.developingconnectome.org), and can be found at: https://git.fmrib.ox.ac.uk/matteob/dHCP_neo_dMRI_pipeline_release (Bastiani et al.116). Supporting code for this manuscript, used to generate the results and figures is available on Zenodo (10.5281/zenodo.18875986).

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

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:

  • 5 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 49 scripts, each with its path and the digest of its content;
  • 11 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.

Data availability

All neuroimaging data were acquired in the context of a research project approved by the ethical committee in 2016. The raw data are protected and are not available due to data privacy laws. Developmental RNA-seq data used in this study were downloaded from: http://development.psychencode.org/. Source data are provided with this paper.

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

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

Recorded: type, language, journal, volume, issue, pages, dates, 11 authors, 3 keywords, 11 MeSH terms, 2 funders, 121 references.

Cite

This paper

Sa de Almeida, J., Boehringer, A., Loukas, S., Fischi-Gomez, E., Van Der Veek, A., Lordier, L., Courvoisier, S., Lazeyras, F., Van De Ville, D., Ball, G., & Hüppi, P. S. (2026). Regional BOLD variability reflects microstructural maturation and neuronal ensheathment in the preterm infant cortex. Nature communications, 17(1), 4849. https://doi.org/10.1038/s41467-026-71415-x

BibTeX

@article{sadealmeida2026regional,
author = {Sa de Almeida, Joana and Boehringer, Andrew and Loukas, Serafeim and Fischi-Gomez, Elda and Van Der Veek, Annemijn and Lordier, Lara and Courvoisier, Sebastien and Lazeyras, François and Van De Ville, Dimitri and Ball, Gareth and Hüppi, Petra S},
title = {{Regional BOLD variability reflects microstructural maturation and neuronal ensheathment in the preterm infant cortex}},
journal = {Nature communications},
year = {2026},
month = apr,
volume = {17},
number = {1},
pages = {4849},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-71415-x},
url = {https://doi.org/10.1038/s41467-026-71415-x},
pmid = {41957008},
pmcid = {PMC13222875}
}

RIS

TY - JOUR
AU - Sa de Almeida, Joana
AU - Boehringer, Andrew
AU - Loukas, Serafeim
AU - Fischi-Gomez, Elda
AU - Van Der Veek, Annemijn
AU - Lordier, Lara
AU - Courvoisier, Sebastien
AU - Lazeyras, François
AU - Van De Ville, Dimitri
AU - Ball, Gareth
AU - Hüppi, Petra S
TI - Regional BOLD variability reflects microstructural maturation and neuronal ensheathment in the preterm infant cortex
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/04/09
VL - 17
IS - 1
SP - 4849
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-71415-x
UR - https://doi.org/10.1038/s41467-026-71415-x
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-71415-x",
"type": "article-journal",
"title": "Regional BOLD variability reflects microstructural maturation and neuronal ensheathment in the preterm infant cortex",
"container-title": "Nature communications",
"author": [
{
"family": "Sa de Almeida",
"given": "Joana"
},
{
"family": "Boehringer",
"given": "Andrew"
},
{
"family": "Loukas",
"given": "Serafeim"
},
{
"family": "Fischi-Gomez",
"given": "Elda"
},
{
"family": "Van Der Veek",
"given": "Annemijn"
},
{
"family": "Lordier",
"given": "Lara"
},
{
"family": "Courvoisier",
"given": "Sebastien"
},
{
"family": "Lazeyras",
"given": "François"
},
{
"family": "Van De Ville",
"given": "Dimitri"
},
{
"family": "Ball",
"given": "Gareth"
},
{
"family": "Hüppi",
"given": "Petra S"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "4849",
"DOI": "10.1038/s41467-026-71415-x",
"PMID": "41957008",
"PMCID": "PMC13222875",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-71415-x",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
9
]
]
}
}

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.1126/sciadv.aec9291 [code]
Computational mechanisms of perception in autism revealed using games inspired by rodent operant tasks.
Journal: Science advances
In common: glmnet, nlme, psych, 8 other tools
[2] doi:10.1002/hbm.70496 [code]
Transdiagnostic Profiles of BOLD Signal Variability in Autism and Schizophrenia Spectrum Disorders: Associations With Cognition and Functioning.
Journal: Human brain mapping
In common: broom, tidyverse, fMRI, 9 references
[3] doi:10.1038/s41398-026-04010-9 [code]
Bullying victimization and brain development: a longitudinal structural magnetic resonance imaging study from adolescence to early adulthood.
Journal: Translational psychiatry
In common: nlme, psych, rstatix, 7 other tools, developmental
[4] doi:10.1038/s41467-026-73072-6 [code]
Mapping the spatiotemporal continuum of structural connectivity development across the human connectome in youth.
Journal: Nature communications
In common: mgcv, psych, easystats, 5 other tools, developmental, 3 references
[5] doi:10.1073/pnas.2603114123 [code]
The human hippocampus can pattern separate memories by meaning.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: psych, rstatix, easystats, 6 other tools, 2 references
[6] doi:10.1016/j.celrep.2026.117505 [code]
Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.
Journal: Cell reports
In common: mgcv, nlme, easystats, 7 other tools
[7] 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, psych, easystats, 7 other tools
[8] doi:10.1016/j.nicl.2026.104053 [code]
Childhood white matter organization predicts adolescent internalizing problems among youth with and without ADHD.
Journal: NeuroImage. Clinical
In common: psych, broom, emmeans, 4 other tools, developmental, 4 references
[9] doi:10.1038/s41586-026-10699-x [code]
Competing programs shape cortical sensorimotor-association axis development.
Journal: Nature
In common: ggplot2, tidyverse, 8 references
[10] doi:10.1093/bioinformatics/btag592 [code]
Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.
Journal: Bioinformatics (Oxford, England)
In common: mgcv, rstatix, broom, 6 other tools, other condition

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.