OSCR

Resting-State and Task Functional Magnetic Resonance Imaging Network Topology Metrics With no Threshold Selection to Predict Cognition.

Code ↔ Paper

13 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 13 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Results › Relative Performance of Topological Networks Across Models ↔ jobs/s9.overall_gls_model.r, lines 247–287 · score 0.91 · GLOB_EFF, Cycle Strength, Backbone Dispersion, Backbone Strength, Minimum Spanning Tree, Persistent Homology
  2. [2] § Results › Relative Performance of Topological Networks Across Models ↔ jobs/s6_all_cog_analysis.r, lines 305–349 · score 0.91 · Cycle Strength, Backbone Dispersion, Backbone Strength, Minimum Spanning Tree, Persistent Homology, Leaf fraction
  3. [3] § Results › Task‐Specific Effect of Network Topology on Cognitive Performance ↔ jobs/s7a_FDRplot.r, lines 1–65 · score 0.87 · cognition crystallised composite, cognition fluid composite, survived FDR correction, vocabulary comprehension, episodic memory, fluid intelligence
  4. [4] § Results › Relative Performance of Topological Networks Across Models ↔ jobs/s5.model_data_prep.r, the whole file · a weak match · score 0.80 · Cognition Crystallised Composite, Vocabulary Comprehension, Fluid intelligence, Penn Progressive Matrices, Sustained Attention, Cognitive Flexibility
  5. [5] § Results › Task‐Specific Effect of Network Topology on Cognitive Performance ↔ jobs/s5.model_data_prep.r, the whole file · a weak match · score 0.79 · cognition crystallised composite, cognition fluid composite, vocabulary comprehension, fluid intelligence, spatial orientation, working memory
  6. [6] § Results › Relative Performance of Topological Networks Across Models ↔ jobs/s7a_FDRplot.r, lines 1–65 · score 0.71 · Cognition Crystallised Composite, Penn Progressive Matrices, Vocabulary Comprehension, Fluid intelligence, regulation, FDR
  7. [7] § Materials and Methods › Topological Measures ↔ jobs/s4_network_measures.r, lines 46–108 · score 0.68 · single linkage, FC matrices, distance, density, sum, nodes
  8. [8] § Materials and Methods › Statistics ↔ jobs/s9.overall_gls_model.r, lines 103–143 · score 0.66 · log transforming, nlme, heteroscedasticity, GLS, variance, pR
  9. [9] § Materials and Methods › Functional Connectome Building ↔ jobs/s4_network_measures.r, lines 1–44 · score 0.64 · negative edges, FC matrix, fisher, concatenated, transformed, correlations
  10. [10] § Materials and Methods › Statistics ↔ jobs/s8.overall_chisq.r, lines 1–42 · score 0.64 · post hoc, Chi square, cells, residuals, predictive, network
  11. [11] § Materials and Methods › Statistics ↔ jobs/s6_all_cog_analysis.r, lines 160–248 · score 0.60 · participant_id, nlme, formula, variance, errors, multicollinearity
  12. [12] § Materials and Methods › Statistics ↔ jobs/s9.overall_gls_model.r, lines 1–56 · score 0.56 · Durbin Watson, VIF, tolerance, multicollinearity, residual, squared
  13. [13] § Materials and Methods › Statistics ↔ jobs/DevContrStats_gls.r, lines 97–179 · score 0.55 · contr.sum, categorical variable, intercepts, grand

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 · 406 lines · 18 KB · no license · 3 matches

  1. #This script tests the effect of network measures on their respective partil R-squared values obtained across all models of the study (following s7).
  2. #Tested separately for 3T and 7T scanners' models
  3. library(nlme)
  4. library(emmeans)
  5. ####################################################################
  6. #######################dataset preparation##########################
  7. ####################################################################
  8. for (scan in c("3T", "7T"))
  9. {
  10. dataset_stat=readRDS('datasets_stat/stat_output_HCP_alltasks.rds')
  11. if(scan=="3T")
  12. {
  13. dataset_stat=dataset_stat[which(dataset_stat$taskFC != 'REST (7T)' & dataset_stat$taskFC != 'MOVIE'),]
  14. } else if (scan=="7T")
  15. {
  16. dataset_stat=dataset_stat[which(dataset_stat$taskFC == 'REST (7T)' | dataset_stat$taskFC == 'MOVIE'),]
  17. }
  18. #rename fMRI tasks for clarity for later plot
  19. levels(dataset_stat$taskFC)[levels(dataset_stat$taskFC) == "LANGUAGE"] <- "LG"
  20. levels(dataset_stat$taskFC)[levels(dataset_stat$taskFC) == "WORKING\nMEMORY"] <- "WM"
  21. levels(dataset_stat$taskFC)[levels(dataset_stat$taskFC) == "SOCIAL\n COGNITION"] <- "SOCIAL"
  22. levels(dataset_stat$taskFC)[levels(dataset_stat$taskFC) == "RELATIONAL\nPROCESSING"] <- "RELATIONAL"
  23. #factorise
  24. dataset_stat$cog_name=as.factor(dataset_stat$cog_name)
  25. dataset_stat$taskFC=as.factor(dataset_stat$taskFC)
  26. dataset_stat$taskFC <- droplevels(dataset_stat$taskFC) #drop as 3T/7T mismamtch
  27. dataset_stat$category=as.factor(dataset_stat$category_abbr)
  28. #assumption check function
  29. library(car)
  30. as_check=function(model){
  31. flags=c()
  32. #"type" argument added because of the interaction term
  33. #using adjusted gvif as more reliable when many dummy variables (categorical levels), and square root of the criterion
  34. #https://www.bookdown.org/rwnahhas/RMPH/mlr-collinearity.html
  35. if(!all(vif(model, type='predictor')[,3] <= sqrt(10))) {
  36. cat('Multicollinearity detected\n VIF - ')
  37. cat(vif(model)[,1])
  38. cat(';\n Tolerance - ')
  39. cat(1/vif(model)[,1])
  40. cat(';\n')
  41. flags=c(flags,'multicollinearity')
  42. }
  43. #check independence of errors (Durbin-Watson statistics between 1 and 3 is good according to Mayers, A. (2013))
  44. DWstat=durbinWatsonTest(as.numeric(residuals(model)))
  45. if (DWstat < 1 | DWstat > 3) {flags=c(flags,'autocorrelated residuals')}
  46. return(flags)
  47. }
  48. ###############################################################
  49. #####################OPTIONAL GROUPING#########################
  50. #needs underscore to help later name parsing
  51. dataset_stat$ntw_type <- gsub(" ", "_", dataset_stat$ntw_type)
  52. #Want to group topology measures?
  53. #wide, threshold, or none
  54. grouping=''
  55. if (grouping=='wide')
  56. {
  57. #wide clustering
  58. dataset_stat$category=as.factor(dataset_stat$ntw_type)
  59. levels(dataset_stat$category) <- levels(factor(dataset_stat$ntw_type))
  60. }
  61. if (grouping=='threshold')
  62. {
  63. #limited clustering
  64. levels(dataset_stat$category) <- c(levels(dataset_stat$category), "Global_efficiency","Clustering_coefficient")
  65. dataset_stat$category[grep('GLOB',dataset_stat$category)]="Global_efficiency"
  66. dataset_stat$category[grep('CLUST',dataset_stat$category)]="Clustering_coefficient"
  67. dataset_stat$category <- droplevels(dataset_stat$category) #drops now-empty lvl
  68. }
  69. ###############################################################
  70. #############################MODEL#############################
  71. #The baseline is defined as the grand mean as choosing a level as baseline is arbitrary for types of cognitive tests and of topology measures
  72. #This sets global defaults for how R encodes factor variables when fitting models. Specifically: contr.sum" applies sum (effect) coding to unordered factors
  73. contrasts(dataset_stat$cog_name) <- contr.sum
  74. contrasts(dataset_stat$category) <- contr.sum
  75. #for taskFC, REST is defined as the baseline for the fMRI taks category
  76. if (scan=="7T")
  77. {
  78. dataset_stat$taskFC <- relevel(factor(dataset_stat$taskFC), ref = "REST (7T)")
  79. contrasts(dataset_stat$taskFC) <- contr.treatment(levels(dataset_stat$taskFC),
  80. base = which(levels(dataset_stat$taskFC) == "REST (7T)"))
  81. } else
  82. {
  83. dataset_stat$taskFC <- relevel(factor(dataset_stat$taskFC), ref = "REST (3T)")
  84. contrasts(dataset_stat$taskFC) <- contr.treatment(levels(dataset_stat$taskFC),
  85. base = which(levels(dataset_stat$taskFC) == "REST (3T)"))
  86. }
  87. #log transformation fixes most heteroskedasticity
  88. leveneTest(log(rsq_vals) ~ category, data = dataset_stat)$`Pr(>F)`[1] < .05
  89. leveneTest(log(rsq_vals) ~ cog_name, data = dataset_stat)$`Pr(>F)`[1] < .05
  90. leveneTest(log(rsq_vals) ~ taskFC, data = dataset_stat)$`Pr(>F)`[1] < .05
  91. leveneTest(log(rsq_vals) ~ category * taskFC, data = dataset_stat)$`Pr(>F)`[1] < .05
  92. #Generalized Least Squares (GLS)
  93. #Because gls() refers to the source dataset_stat variable even if we assign() it to a new variable name, meta_model_3T since will refer to the replaced dataset_stat from the last loop instead of the initial object. To avoid this, we create explicitly a variable instead of assigning:
  94. if(scan=="3T")
  95. {
  96. dataset_stat_3T <- dataset_stat
  97. #weights controls for variance of taskFC (as it still creates heteroscedasticity after log transform)
  98. meta_model <- nlme::gls(
  99. log(rsq_vals) ~ cog_name + category * taskFC,
  100. data = dataset_stat_3T,
  101. weights = varIdent(form = ~1 | taskFC) # Allows different variance per group
  102. )
  103. as_check(meta_model)
  104. } else if (scan=="7T")
  105. {
  106. dataset_stat_7T <- dataset_stat
  107. meta_model <- nlme::gls(
  108. log(rsq_vals) ~ cog_name + category * taskFC,
  109. data = dataset_stat_7T,
  110. weights = varIdent(form = ~1 | taskFC) # Allows different variance per group
  111. )
  112. as_check(meta_model)
  113. }
  114. #get summary of model contrasts (estimates, p values)
  115. #DevContrStats script extracts the categorical levels omitted from the default summary and returns more readable results (the last last levels are hidden in R due to contr.sum and simply implied to build a contrast matrix summing to 0, see for more context:
  116. #https://stackoverflow.com/questions/72820236/comparing-all-factor-levels-to-the-grand-mean-can-i-tweak-contrasts-in-linear-m)
  117. source("#jobs/DevContrStats_gls.r")
  118. #cog task and network measure main effects
  119. coefficients=DevContrStats_gls(dataset_stat, meta_model, 'cog_name')
  120. coefficients=rbind(coefficients,
  121. DevContrStats_gls(dataset_stat, meta_model, 'category'))
  122. #script not needed for taskFC variable as there are only 2 levels (contr.treatment)
  123. #taskFC levels first
  124. summod=as.data.frame(summary(meta_model)$tTable)
  125. coefficients=rbind(coefficients,
  126. summod[grep('^taskFC',row.names(summod)),])
  127. #interactions terms
  128. coefficients=rbind(coefficients,
  129. DevContrStats_gls(dataset_stat, meta_model, 'category','taskFC'))
  130. #taskFC REST is dropped
  131. coefficients=coefficients[!grepl(':REST',row.names(coefficients)),]
  132. #record which scan each contrast is based on
  133. coefficients$scan=scan
  134. #save summaries separately per scanners
  135. assign(paste0('coefficients_',scan), coefficients)
  136. assign(paste0('meta_model_',scan), meta_model)
  137. }
  138. #merged again for the sake of FDR correction
  139. coefficients_all=rbind(coefficients_3T, coefficients_7T)
  140. #no need to correct across intercepts so ignore their coefficient
  141. coefficients_all=coefficients_all[-grep('Intercept',row.names(coefficients_all)),]
  142. #FDR correction
  143. coefficients_all$`p-value_fdr`=p.adjust(coefficients_all[,"p-value"], method='fdr')
  144. #filter out insignificant contrasts
  145. sig_coefficients=coefficients_all[which(coefficients_all$`p-value_fdr`<.05),]
  146. print(sig_coefficients)
  147. ###############################################################
  148. #####################posthoc contrast##########################
  149. ###############################################################
  150. for (scan in c("3T", "7T"))
  151. {
  152. if (scan=='3T'){dataset=dataset_stat_3T; model=meta_model_3T}
  153. if (scan=='7T'){dataset=dataset_stat_7T; model=meta_model_7T}
  154. #test pairwise contrasts with emmeans
  155. #warning about contrast levels dropped is normal, due to the contr.sum parameter
  156. dataset <- droplevels(dataset)
  157. #mode = df.error to keep same df throughout instead of computing a new one per contrast (leads to near 0 dfs which results in absurd SEs in this data), more stable for gls()
  158. EMM <- emmeans::emmeans(model, ~ category * taskFC, data = dataset,
  159. mode='df.error')
  160. pairwise_comp <- pairs(EMM, infer = TRUE, adjust = "none")
  161. #don't count pairwise comparisons within own topology measure category:
  162. library(stringr)
  163. contrasts=as.data.frame(pairwise_comp)
  164. duplicates=which(str_count(contrasts$contrast,
  165. 'Minimum|Leaf|Diameter|LEAF|DIAM')==2 |
  166. str_count(contrasts$contrast,
  167. 'Persistent|Backbone|Cycle|BS|BD|CS')==2 |
  168. str_count(contrasts$contrast,
  169. 'Clustering|Global|GLOB|CLUST')==2 |
  170. str_count(contrasts$contrast,
  171. 'RAW_FC')==2 |
  172. str_count(contrasts$contrast,
  173. 'REST')==0
  174. )
  175. if (length(duplicates)!=0){contrasts=contrasts[-duplicates,]}
  176. #specify scanner it came from
  177. contrasts$scan=scan
  178. assign(paste0('contrasts_',scan),contrasts)
  179. }
  180. #merge for FDR correction
  181. contrasts=rbind(contrasts_3T, contrasts_7T)
  182. #significant pre and post fdr correction:
  183. contrasts$p.value_fdr=p.adjust(contrasts$p.value, method='fdr')
  184. contrasts_uncor=contrasts
  185. #apply correction
  186. contrasts=contrasts[which(contrasts$p.value_fdr<.05),]
  187. #then assign fdr corrected p back to each respective set of contrasts
  188. contrasts_3T=contrasts[which(contrasts$scan=='3T'),]
  189. contrasts_7T=contrasts[which(contrasts$scan=='7T'),]
  190. ###############################################################
  191. ###############################################################
  192. #############################Plots#############################
  193. library(ggplot2)
  194. library(dplyr)
  195. library(forcats)
  196. library(stringr)
  197. for (scan in c("3T", "7T"))
  198. {
  199. if (scan=='7T' & NROW(contrasts_7T)==0){plot_7T=NULL; break}
  200. contrasts=get(paste0("contrasts_", scan))
  201. #identify first and second variable in each contrast
  202. df_contrasts <- as.data.frame(contrasts) %>%
  203. mutate(original_var1 = str_trim(str_extract(contrast, "^[^-]+")),
  204. original_var2 = str_trim(str_extract(contrast, "(?<= - ).*")) ) %>%
  205. #order in terms of increases
  206. mutate( flip = estimate < 0,
  207. contrast = if_else(flip, paste(original_var2, "-", original_var1), contrast),
  208. estimate = if_else(flip, -estimate, estimate),
  209. t.ratio = if_else(flip, -t.ratio, t.ratio) )
  210. #add asterisks for significance
  211. df_contrasts <- df_contrasts %>%
  212. mutate(sig = case_when(
  213. p.value_fdr < 0.001 ~ "***",
  214. p.value_fdr < 0.01 ~ "**",
  215. p.value_fdr < 0.05 ~ "*",
  216. TRUE ~ "" #catch-all if nothing above is TRUE
  217. ))
  218. #clarify direction of difference (- replaced with <>)
  219. df_contrasts <- df_contrasts %>%
  220. mutate(
  221. contrast_label = str_replace(contrast, "(.*) - (.*)", "\\1 <> \\2"),
  222. contrast_label = if_else(estimate > 0, str_replace(contrast_label, "<>", " > "), str_replace(contrast_label, "<>", " < "))) %>%
  223. mutate(contrast_label = fct_inorder(contrast_label))
  224. df_contrasts <- df_contrasts %>% mutate(label_leader = str_trim(str_extract(contrast_label, "^[^>]+")) # gets left-hand side of label
  225. )
  226. df_contrasts <- df_contrasts %>% arrange(label_leader)
  227. #Colour contrast depending on strongest measure in each comparison contrast
  228. #Accounts for different possible labels
  229. color_map <- c(
  230. "Graph_measures" = "#3468A4",
  231. "Clustering coefficient" = "#4180C9", "CLUST" = "#4180C9",
  232. "Clustering coefficient (t.10%)"="#4180C9","CLUSTERING0.1"="#4180C9",
  233. "Clustering coefficient (t.20%)"="#4180C9","CLUSTERING0.2"="#4180C9",
  234. "Clustering coefficient (t.30%)"="#4180C9","CLUSTERING0.3"="#4180C9",
  235. "Global efficiency" = "#3468A4","GLOB_EFF" = "#3468A4",
  236. "Global efficiency (t.10%)" = "#3468A4", "GLOB_EFF0.1" = "#3468A4",
  237. "Global efficiency (t.20%)" = "#3468A4", "GLOB_EFF0.2" = "#3468A4",
  238. "Global efficiency (t.30%)" = "#3468A4","GLOB_EFF0.3" = "#3468A4",
  239. "Persistent_Homology" = "#95435C",
  240. "Backbone Strength" = "#95435C", "PH_BS" = "#95435C",
  241. "Backbone Dispersion" = "#733447","PH_BD" = "#733447",
  242. "Cycle Strength" = "#522633","PH_CS" = "#522633",
  243. "Minimum_Spanning_Tree" = "#C0915C",
  244. "Diameter" = "#DCA769","MST_DIAM" = "#DCA769",
  245. "Leaf fraction" = "#C0915C","MST_LEAF" = "#C0915C",
  246. "Raw_functional_connectivity" = "#9933FF",
  247. "Mean connectivity" = "#9933FF","RAW_FC" = "#9933FF"
  248. )
  249. #adapt colours depending on number first label in the x label
  250. df_contrasts$prefix <- sapply(df_contrasts$contrast_label, function(label) {
  251. matched <- grep(paste0("^", names(color_map), collapse = "|"), label, value = TRUE)
  252. if (length(matched) == 0) return(NA)
  253. matched_prefix <- names(color_map)[sapply(names(color_map), function(p) grepl(paste0("^", p), label))]
  254. if (length(matched_prefix) > 0) matched_prefix[1] else NA
  255. })
  256. df_contrasts$color <- color_map[df_contrasts$prefix]
  257. #categorise contrasts broadly by fMRI task
  258. df_contrasts$taskFC_leader <- str_match(df_contrasts$contrast, "^[^ ]+ ([^ ]+(?: \\(\\dT\\))?)")[,2]
  259. df_contrasts <- df_contrasts %>%
  260. arrange(taskFC_leader, label_leader)
  261. df_contrasts$contrast_label <- factor(df_contrasts$contrast_label, levels = df_contrasts$contrast_label)
  262. #add dashed lines between fMRI tasks
  263. group_breaks <- df_contrasts %>%
  264. group_by(taskFC_leader) %>%
  265. summarise(last = last(contrast_label)) %>%
  266. mutate(y = match(last, df_contrasts$contrast_label) + 0.5) #offset to draw line after last contrast of that fMRI task
  267. #add the corresponding fMRI task label too
  268. taskFC_labels <- df_contrasts %>%
  269. mutate(row = row_number()) %>%
  270. group_by(taskFC_leader) %>%
  271. summarise(x_pos = mean(row))
  272. taskFC_labels$y_pos <- 0.8
  273. #rename fMRI task for clarity
  274. taskFC_truenames <- c( "WM" = "WORKING\nMEMORY", "LG" = "LANGUAGE", "SOCIAL" = "SOCIAL\nCOGNITION")
  275. taskFC_labels <- taskFC_labels %>%
  276. mutate(taskFC_leader = dplyr::recode(taskFC_leader, !!!taskFC_truenames))
  277. #rename legend for clarity
  278. category_names <- c( "GLOB_EFF" = "Global efficiency", "CLUST" = "Clustering coefficient", "PH_BS" = "Backbone Strength", "PH_CS" = "Cycle Strength", "PH_BD" = "Backbone Dispersion", "MST_LEAF" = "Leaf fraction", "MST_DIAM" = "Diameter", "RAW_FC" = "Mean connectivity")
  279. df_contrasts <- df_contrasts %>%
  280. mutate(prefix = dplyr::recode(prefix, !!!category_names))
  281. #only keep legend from 3T plot has it covers all metrics
  282. if (scan == "7T") {
  283. legend_theme <- theme(
  284. legend.position = "bottom",
  285. legend.justification = c(0, 0.5),
  286. legend.box = "horizontal"
  287. )
  288. legend_scale <- scale_color_manual(values = color_map)
  289. plot_title=NULL
  290. y_label="Estimate ± SE"
  291. } else {
  292. legend_theme <- theme(legend.position = "none")
  293. legend_scale <- scale_color_manual(values = color_map, name = "Stronger network measure:")
  294. #plot_title="Contrasts in estimated log(partial R-squared) between conditions"
  295. y_label=NULL
  296. }
  297. #plot
  298. meascontrast_plot=ggplot(df_contrasts, aes(x = fct_inorder(contrast_label), y = estimate)) +
  299. geom_point(aes(color = prefix), size = 3) +
  300. geom_errorbar(aes(ymin = estimate - SE, ymax = estimate + SE, color = prefix), width = 0.2, linewidth = 1.2) +
  301. geom_text(aes(label = sig, y = estimate + 1.1 * SE), #beyond SE bar
  302. vjust=0.8, hjust =0, size = 6, color = "black") +
  303. geom_hline(yintercept = 0, linetype = "dashed", color = "grey50", linewidth = 0.5) +
  304. coord_flip() +
  305. labs(y=y_label, x = "",
  306. #title=plot_title
  307. ) +
  308. theme_minimal() +
  309. #theme(plot.title.position = "plot",
  310. # plot.title = element_text(hjust = 0.5)) +
  311. legend_scale +
  312. legend_theme +
  313. geom_vline(data = group_breaks, aes(xintercept = y), linetype = "dashed", color = "grey70", linewidth = 0.6) +
  314. geom_text(data = taskFC_labels,
  315. aes(x = x_pos, y = y_pos, label = taskFC_leader),
  316. inherit.aes = FALSE,
  317. angle = 0,
  318. hjust = 0.5,
  319. color = "grey30", alpha = 0.15,
  320. size = 6,
  321. lineheight = 0.8,
  322. fontface = "bold",
  323. family = "Impact") +
  324. guides(color = guide_legend(nrow = 1))
  325. assign(x = paste0('plot_',scan), meascontrast_plot)
  326. if (scan=="7T") #remove legend from first plot
  327. { plot_7T <- plot_7T + guides(color = "none")}
  328. }
  329. library(patchwork)
  330. if (!is.null(plot_7T))
  331. {
  332. finalplot <- plot_3T / plot_7T +
  333. plot_layout(guides = "collect", heights = c(0.99, 0.01)) &
  334. theme( plot.margin = margin(0,0,5,0),
  335. legend.position = "bottom",
  336. legend.box = "horizontal",
  337. legend.box.just = "left",
  338. legend.key.height = unit(0.2, "cm"),
  339. legend.margin = margin(-10, 0, 0, -250),
  340. legend.text=element_text(size=11)
  341. )
  342. } else
  343. {
  344. finalplot <- plot_3T +
  345. plot_layout(guides = "collect") &
  346. theme( plot.margin = margin(0,0,5,0),
  347. legend.position = "bottom",
  348. legend.box = "horizontal",
  349. legend.box.just = "left",
  350. legend.key.height = unit(0.2, "cm"),
  351. legend.margin = margin(-10, 0, 0, -250),
  352. legend.text=element_text(size=11)
  353. )
  354. }
  355. plot(finalplot)
  356. ggsave(filename = 'figures/taskFC/pairwise_comparisons_restvstask.png', plot = finalplot, units = 'px', width = 3000, height = 1500, dpi = 300)
  357. #For all contrasts between tasks, not only task vs rest
  358. #ggsave(filename = 'figures/taskFC/pairwise_comparisons.png', plot = finalplot, units = 'px', width = 4200, height = 8000, dpi = 300)

s9.overall_gls_model.r at commit e11eef2, no license · at the source

Overview

  1. Psychology, School of Social Sciences Nanyang Technological University Singapore Singapore
Institutions: Nanyang Technological University (Singapore)
Journal: Human brain mapping, volume 47, issue 5, article e70526
Dates: received 28 October 2025; accepted 3 April 2026; published online 7 April 2026; in print April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1002/hbm.70526 · PMID 41947425 · PMCID PMC13057421 · OpenAlex W7152043807
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Statistics, Machine learning, Connectivity, Graphs, fMRI & imaging
Keywords: cognition, fMRI, graph theory, minimum spanning tree, network, persistent homology, threshold
MeSH: Brain*, Cognition*, Connectome*, Magnetic Resonance Imaging*, Adult, Female, Humans, Male, Memory, Short-Term, Neural Pathways, Rest, Young Adult (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Nanyang Assistant Professorship (021080‐00001)
Citations: not cited yet (Europe PMC); 52 references in the paper

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

chabld/Topology_study_2025

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: e11eef2cc71b405b90f74be6332a522287336d61, 6 February 2026
Languages: R (11)
Size: 43 files, 11 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: ggplot2 (7 files), tidyverse (7 files), car (3 files), easystats (2 files), nlme (2 files), patchwork (2 files), emmeans (1 file), igraph (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
12 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;
  • 11 scripts, each with its path and the digest of its content;
  • 13 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.70526.

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

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 7 keywords, 12 MeSH terms, 1 funder, 41 references.

Cite

This paper

Billaud, C. H. A., & Yu, J. (2026). Resting-State and Task Functional Magnetic Resonance Imaging Network Topology Metrics With no Threshold Selection to Predict Cognition. Human brain mapping, 47(5), e70526. https://doi.org/10.1002/hbm.70526

BibTeX

@article{billaud2026resting,
author = {Billaud, Charly Hugo Alexandre and Yu, Junhong},
title = {{Resting-State and Task Functional Magnetic Resonance Imaging Network Topology Metrics With no Threshold Selection to Predict Cognition}},
journal = {Human brain mapping},
year = {2026},
month = apr,
volume = {47},
number = {5},
pages = {e70526},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/hbm.70526},
url = {https://doi.org/10.1002/hbm.70526},
pmid = {41947425},
pmcid = {PMC13057421}
}

RIS

TY - JOUR
AU - Billaud, Charly Hugo Alexandre
AU - Yu, Junhong
TI - Resting-State and Task Functional Magnetic Resonance Imaging Network Topology Metrics With no Threshold Selection to Predict Cognition
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/04/01
VL - 47
IS - 5
SP - e70526
SN - 1065-9471
PB - Wiley
DO - 10.1002/hbm.70526
UR - https://doi.org/10.1002/hbm.70526
LA - en
ER -

CSL-JSON

{
"id": "10.1002/hbm.70526",
"type": "article-journal",
"title": "Resting-State and Task Functional Magnetic Resonance Imaging Network Topology Metrics With no Threshold Selection to Predict Cognition",
"container-title": "Human brain mapping",
"author": [
{
"family": "Billaud",
"given": "Charly Hugo Alexandre"
},
{
"family": "Yu",
"given": "Junhong"
}
],
"container-title-short": "Hum Brain Mapp",
"volume": "47",
"issue": "5",
"page": "e70526",
"DOI": "10.1002/hbm.70526",
"PMID": "41947425",
"PMCID": "PMC13057421",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/hbm.70526",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
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.1038/s41467-026-73262-2 [code]
Robust but independent sex differences in human brain function, structure, and behavior.
Journal: Nature communications
In common: easystats, car, patchwork, 2 other tools, 4 references
[2] doi:10.1002/hbm.70605 [code]
BrainEnrich: Revealing Biological Insights for Imaging-Derived Phenotypes Through Transcriptomic Enrichment.
Journal: Human brain mapping
In common: nlme, easystats, igraph, 4 other tools, 2 references
[3] 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, easystats, car, 4 other tools, fMRI, cognitive
[4] doi:10.1186/s40337-026-01671-1 [code]
Aberrant large- and mesoscale network segregation and integration in bulimia nervosa.
Journal: Journal of eating disorders
In common: easystats, car, emmeans, 3 other tools, fMRI, 2 references
[5] 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: nlme, easystats, car, 4 other tools, cognitive
[6] 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, easystats, car, 4 other tools
[7] 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: nlme, easystats, car, 4 other tools
[8] doi:10.1016/j.nicl.2026.104012 [code]
Structural-functional multilayer brain network properties and outcome of combined repetitive transcranial magnetic stimulation and psychotherapy for obsessive-compulsive disorder.
Journal: NeuroImage. Clinical
In common: nlme, car, ggplot2, 1 other tool, fMRI, 3 references
[9] doi:10.1093/nc/niag029 [code]
A data-driven approach to identifying and evaluating connectivity-based neural correlates of conscious visual perception.
Journal: Neuroscience of consciousness
In common: easystats, car, emmeans, 3 other tools, cognitive, 1 reference
[10] doi:10.1016/j.neuroimage.2026.122115 [code]
Midfrontal theta power relates to response speeding following frustrative nonreward.
Journal: NeuroImage
In common: easystats, car, emmeans, 3 other tools, cognitive

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.