OSCR

Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 212 lines · 9.2 KB · no license

  1. #OCSPred Project Data Cleaning/Finding -------------------------
  2. #load relevant packages
  3. library(tidyverse)
  4. library(readxl)
  5. #possible method notes ---
  6. # -SCCAN/LDA
  7. #- build model best predicting change over time?
  8. # - or build models separating recovered/persistent?
  9. #load in raw data
  10. volumes <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/LSMMulti_Volumes.xlsx')
  11. volumes<- subset(volumes, !grepl('SP', ScanFile))
  12. acute_raw <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/OCSPred_OxCont_Acute.xlsx')
  13. chronic_raw <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/OCSPred_OxCont_Chronic.xlsx')
  14. extras_raw <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/OCSPred_Data_extras.xlsx')
  15. load('/Users/uqmmoo13/Desktop/OCSPred/Data/LSMMulti_Cleaned_SampleData.R')
  16. dems <- subset(Data, !grepl('S', ID))
  17. #create variables for matching
  18. volumes <- mutate(volumes, IDshort = substr(ScanFile, 6, 9))
  19. extras_raw <- mutate(extras_raw, IDshort = substr(ID, nchar(ID)-3, nchar(ID)))
  20. extras_raw <- subset(extras_raw, !is.na(IDshort))
  21. chronic_raw <- mutate(chronic_raw, IDshort = substr(StudyID, nchar(StudyID)-3, nchar(StudyID)))
  22. chronic_raw <- subset(chronic_raw, !is.na(IDshort))
  23. acute_raw <- mutate(acute_raw, IDshort = substr(ID, nchar(ID)-3, nchar(ID)))
  24. acute_raw <- subset(acute_raw, !is.na(IDshort))
  25. dems <- mutate(dems, IDshort = substr(ID, nchar(ID)-3, nchar(ID)))
  26. #join all data
  27. data <- left_join(acute_raw, chronic_raw, by = 'IDshort')
  28. data <- left_join(data, dems, by = 'IDshort')
  29. data <- left_join(data, volumes, by = 'IDshort')
  30. data <- left_join(data, extras_raw, by = 'IDshort')
  31. #removes any NA or Impute
  32. data[data == "Impute"] <- NA
  33. data[data == "NA"] <- NA
  34. #cleans up duplicate variables
  35. data$ScanType.x[is.na(data$ScanType.x)] <- data$ScanType.y[is.na(data$ScanType.x)]
  36. data$StrokeScan[is.na(data$StrokeScan)] <- data$Intv[is.na(data$StrokeScan)]
  37. data$Multiple.x[is.na(data$Multiple.x)] <- data$Multiple.y[is.na(data$Multiple.x)]
  38. data$Sex[is.na(data$Sex)] <- data$Gender[is.na(data$Sex)]
  39. data$YearsEdu[is.na(data$YearsEdu)] <- data$Education[is.na(data$YearsEdu)]
  40. data$StrokeAge[is.na(data$StrokeAge)] <- data$Age[is.na(data$StrokeAge)]
  41. data$Handedness.x[is.na(data$Handedness.x)] <- data$Handedness.y[is.na(data$Handedness.x)]
  42. data$StrokeType.x[is.na(data$StrokeType.x)] <- data$StrokeType.y[is.na(data$StrokeType.x)]
  43. data$LesionHem[is.na(data$LesionHem)] <- data$StrokeSide[is.na(data$LesionHem)]
  44. data$Volume.x[is.na(data$Volume.x)] <- data$Volume.y[is.na(data$Volume.x)]
  45. #remove uneccesary columns
  46. data <- dplyr::select(data, !(ID.y) &!(Intv) & !(ScanTest) & !(Multiple.y)
  47. & !(Gender) & !(Education) & !(Age) & !(StrokeType.y) & !(Handedness.y)
  48. & !(StrokeSide) &!(ScanFile.y) &!(IntvCat) & !(age) & !(sex) & !(hand)
  49. & !(years_education) & !(nihss) &!(Version) & !(hadsa_total) & !(hadsd_total)
  50. & !(barthel_lf_total) &(!ID) & !(Volume.y) & !(moca_total) & !(StrokeTest))
  51. #renames remaining columns
  52. name_list <- names(data)
  53. name_list[name_list == "ID.x"] <- "ID"
  54. name_list[name_list == "ScanType.x"] <- "ScanType"
  55. name_list[name_list == "Multiple.x"] <- "Multiple"
  56. name_list[name_list == "Handedness.x"] <- "Hand"
  57. name_list[name_list == "StrokeType.x"] <- "StrokeType"
  58. names(data) <- name_list
  59. #creates group indexes
  60. test_list <- c("PIC", "SEM", "SNT", "BHT",
  61. "EGO", "ALLO", "EXC",
  62. "ORT","RCL", "RCG", "PRX", "CAL", "NUM")
  63. #creates standard scores for each subtest -----------------------------------
  64. for (i in 1:length(test_list)){
  65. test <- test_list[i]
  66. acute_total <- paste("A_", test, "_T", sep ="")
  67. chronic_total <- paste("C_", test, "_T", sep ="")
  68. acute_max <- paste("A_", test, "_M", sep ="")
  69. chronic_max <- paste("C_", test, "_M", sep ="")
  70. a_norm <- paste("A_", test, "_N", sep ="")
  71. c_norm <- paste("C_", test, "_N", sep ="")
  72. if (test == "ALLO" | test == "EGO"){
  73. acute_bin <- paste("A_", test, "_L_B", sep ="")
  74. chron_bin <- paste("C_", test, "_L_B", sep ="")
  75. test_temp = paste(test, "_L", sep ="")
  76. change_score <- paste(test, "_change", sep ="")
  77. data[test_temp] <- "NA"
  78. data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 1] <- "Persistent"
  79. data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 0] <- "Recovered"
  80. data[[test_temp]][as.numeric(data[[acute_bin]]) == 0] <- "Control"
  81. acute_bin <- paste("A_", test, "_R_B", sep ="")
  82. chron_bin <- paste("C_", test, "_R_B", sep ="")
  83. test_temp <- paste(test, "_R", sep ="")
  84. data[test_temp] <- "NA"
  85. data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 1] <- "Persistent"
  86. data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 0] <- "Recovered"
  87. data[[test_temp]][as.numeric(data[[acute_bin]]) == 0] <- "Control"
  88. data <- mutate(data, placeholder = as.numeric(data[[acute_total]])/as.numeric(data[[acute_max]]))
  89. names(data)[names(data)== "placeholder"] <- a_norm
  90. data <- mutate(data, placeholder = as.numeric(data[[chronic_total]])/as.numeric(data[[chronic_max]]))
  91. names(data)[names(data)== "placeholder"] <- c_norm
  92. data <- mutate(data, placeholder = as.numeric(data[[c_norm]]) - as.numeric(data[[a_norm]]))
  93. names(data)[names(data)== "placeholder"] <- change_score
  94. }else{
  95. acute_bin <- paste("A_", test, "_B", sep ="")
  96. chron_bin <- paste("C_", test, "_B", sep ="")
  97. change_score <- paste(test, "_change", sep ="")
  98. data[test] <- "NA"
  99. data[[test]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 1] <- "Persistent"
  100. data[[test]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 0] <- "Recovered"
  101. data[[test]][as.numeric(data[[acute_bin]]) == 0] <- "Control"
  102. data <- mutate(data, placeholder = as.numeric(data[[acute_total]])/as.numeric(data[[acute_max]]))
  103. names(data)[names(data)== "placeholder"] <- a_norm
  104. data <- mutate(data, placeholder = as.numeric(data[[chronic_total]])/as.numeric(data[[chronic_max]]))
  105. names(data)[names(data)== "placeholder"] <- c_norm
  106. data <- mutate(data, placeholder = as.numeric(data[[c_norm]]) - as.numeric(data[[a_norm]]))
  107. names(data)[names(data)== "placeholder"] <- change_score
  108. }
  109. }
  110. #make egocentric and allocentric variables -
  111. data$C_EGO_L_N <- data$C_EGO_N
  112. data$C_EGO_L_N[data$C_EGO_N < 0] <- 0
  113. data$C_EGO_R_N <- data$C_EGO_N
  114. data$C_EGO_R_N[data$C_EGO_N > 0] <- 0
  115. data$C_ALLO_R_N <- data$C_ALLO_N
  116. data$C_ALLO_R_N[data$C_ALLO_N > 0] <- 0
  117. data$C_ALLO_L_N <- data$C_ALLO_N
  118. data$C_ALLO_L_N[data$C_ALLO_N < 0] <- 0
  119. data$A_EGO_L_N <- data$A_EGO_N
  120. data$A_EGO_L_N[data$A_EGO_N < 0] <- 0
  121. data$A_EGO_R_N <- data$A_EGO_N
  122. data$A_EGO_R_N[data$A_EGO_N > 0] <- 0
  123. data$A_ALLO_R_N <- data$A_ALLO_N
  124. data$A_ALLO_R_N[data$A_ALLO_N > 0] <- 0
  125. data$A_ALLO_L_N <- data$A_ALLO_N
  126. data$A_ALLO_L_N[data$A_ALLO_N < 0] <- 0
  127. data$A_ALLO_L_N <- 1 - abs(data$A_ALLO_L_N )
  128. data$A_ALLO_R_N <- 1 - abs(data$A_ALLO_R_N )
  129. data$A_EGO_L_N <- 1 - abs(data$A_EGO_L_N )
  130. data$A_EGO_R_N <- 1 - abs(data$A_EGO_R_N )
  131. data$C_ALLO_L_N <- 1 - abs(data$C_ALLO_L_N )
  132. data$C_ALLO_R_N <- 1 - abs(data$C_ALLO_R_N )
  133. data$C_EGO_L_N <- 1 - abs(data$C_EGO_L_N )
  134. data$C_EGO_R_N <- 1 - abs(data$C_EGO_R_N )
  135. #invert BHT scores too
  136. data$A_BHT_N <- 1 - abs(data$A_BHT_N )
  137. data$C_BHT_N <- 1 - abs(data$C_BHT_N )
  138. #removes excluded patients
  139. grouped_data <- subset(data, !is.na(LesionFile))
  140. test_list <- c("PIC", "SEM", "SNT", "BHT",
  141. "EGO_L", "ALLO_L", "EGO_R", "ALLO_R", "EXC",
  142. "ORT","RCL", "RCG", "PRX", "CAL", "NUM")
  143. #summarise numbers in each gorup
  144. temp_dat <- pivot_longer(grouped_data, cols = test_list, names_to = "Test", values_to = "Cat")
  145. temp_dat <- summarise(group_by(temp_dat, Test,Cat), n = n())
  146. #for each test - plot proportions spared/impaired
  147. #plot_data <- pivot_longer(grouped_data, cols = test_list, names_to = "Test", values_to = "Cat")
  148. #plot_data <- subset(plot_data, !is.na(Cat) & Cat != "NA")
  149. #ggplot(plot_data, aes(x=Cat)) +
  150. #geom_bar()+
  151. #geom_hline(yintercept = 10, colour = 'red') +
  152. #facet_wrap(facets = vars(Test)) +
  153. #theme_classic()
  154. #load in lesion data!
  155. harox <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/summary_fraction_HarOx.xlsx')
  156. harox<- mutate(harox, IDshort = substr(LesionFile, 6, 9))
  157. harox <- dplyr::select(harox, !('LesionFile'))
  158. grouped_data <- left_join(grouped_data, harox, by = "IDshort")
  159. jhu<- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/summary_fraction_JHU.xlsx')
  160. jhu<- mutate(jhu, IDshort = substr(LesionFile, 6, 9))
  161. jhu <- dplyr::select(jhu, !('LesionFile'))
  162. grouped_data <- left_join(grouped_data, jhu, by = "IDshort")
  163. #remove duplicate IDs
  164. grouped_data <- distinct(grouped_data)
  165. grouped_data <- mutate(grouped_data, dupcheck = duplicated(grouped_data$ID))
  166. grouped_data <- subset(grouped_data, dupcheck == FALSE)
  167. #inverts BHT and EXC
  168. grouped_data$A_BHT_N <- 1 - grouped_data$A_BHT_N
  169. grouped_data$C_BHT_N <- 1 - grouped_data$C_BHT_N
  170. grouped_data$A_EXC_N[grouped_data$A_EXC_N < 0] <- 0
  171. grouped_data$C_EXC_N[grouped_data$C_EXC_N < 0] <- 0
  172. grouped_data$A_EXC_N <- 1 - grouped_data$A_EXC_N
  173. grouped_data$C_EXC_N <- 1 - grouped_data$C_EXC_N
  174. #save data for later use
  175. clean_data <- grouped_data
  176. save('clean_data', file = '/Users/uqmmoo13/Desktop/OCSPred/Data/LSMMulti_CleanData_V1.RData')

OCSPred_DataCleaning_V2.R, no license · at the source

Overview

Authors: Margaret Jane Moore1, Stephanie J. Forkel2, Nele Demeyere3
  1. Queensland Brain Institute, University of Queensland, Brisbane, Australia
  2. Donders Research Institute for Brain, Cognition, and Behaviour, Radbound University, Nijmegen, Netherlands
  3. Nuffield Department of Clinical Neurosciences, University of Oxford, Oxford, UK
Institutions: The University of Queensland (Australia); Radboud University Nijmegen (Netherlands); University of Oxford (United Kingdom)
Dates: published online 15 May 2026
Type: Preprint · Language: English
License: CC BY
Identifiers: DOI 10.64898/2026.05.12.26353056 · OpenAlex W7161266650
Open access: green, a free copy (OpenAlex)
Preprint: osf.io/9zkyh
Status: code verified
Categories: behavior only (modality), stroke (population), clinical / translational (subfield)
Methods: Statistics, fMRI & imaging
Keywords: stroke, outcome prediction, lesion mapping, post-stroke cognitive impairment, cognitive recovery, disconnection
Topic: Acute Ischemic Stroke Management (Epidemiology, Medicine), according to OpenAlex
Citations: not cited yet (Europe PMC); 84 references in the paper

Abstract

Lesion anatomy has been widely used to study post stroke cognitive outcomes, but it is unclear whether lesion-based measures provide clinically meaningful prognostic information beyond established predictors. Stroke survivors (n = 408) completed the Oxford Cognitive Screen (OCS) during acute hospitalisation and at chronic (6-month) follow-up. Lesion characteristics and structural disconnection profiles associated with chronic OCS scores were identified using ROI-level, voxel-level and structural network disconnection lesion mapping approaches. The incremental predictive value of these measures, relative to acute behaviour and pre-morbid brain health, was evaluated using regression analyses, receiver operating curve (ROC) and support vector regression (SVR) models predicting continuous chronic scores.

Significant lesion and disconnection correlates of chronic cognitive impairment were identified for 9/10 OCS subtests. The extent of damage to these correlates was significantly associated with chronic cognitive scores, but their diagnostic utility for identifying persistent impairment was low under conventional thresholds (AUC mean = 0.59, range= 0.46–0.66). Acute cognitive task performance was the single best predictor of chronic cognition (AUC mean = 0.66, range = 0.41–0.95). In multivariate analyses, SVR models trained on acute cognitive performance and regional atrophy severity scores both outperformed models trained on lesion anatomy or structural disconnection across most cognitive domains. SVR models combining anatomical, disconnection and behavioural predictors did not improve predictions accuracy relative to behaviour- or atrophy-only models.

Together, these findings demonstrate that statistically significant lesion–outcome relationships do not necessarily translate into clinically useful prognostic indicators. In a large, clinically representative stroke cohort, detailed lesion-based measures provided limited incremental prognostic value beyond acute cognitive assessment and coarse brain health markers. These results highlight the importance of explicitly evaluating predictive utility when developing prognostic models for post-stroke cognitive outcomes.

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

Repository

Its files are read in the Code ↔ Paper reader above.

OSF 9zkyh

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Languages: R (7)
Size: 11 files, 7 scripts
Software Heritage: not checked
Found in: “Data Availability Statement”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (6 files), ggpubr (3 files), cowplot (2 files), pROC (2 files), BayesFactor (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
7 files
At the source: osf.io/9zkyh/

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;
  • 7 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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 Statement

All data and code associated with this project is openly available on the Open Science Framework (https://osf.io/9zkyh/).

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 2, 28 September 2026

  • Language: n/a → en
  • Funding: added National Institute for Health and Care Research: NIHR302224; Department of Health and Social Care

Version 1, 28 September 2026: the first record

Recorded: type, journal, dates, 3 authors, 6 keywords, 80 references.

Cite

This paper

Jane Moore, M., Forkel, S. J., & Demeyere, N. (2026). Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes. medRxiv (preprint). https://doi.org/10.64898/2026.05.12.26353056

BibTeX

@article{janemoore2026neuroimaging,
author = {Jane Moore, Margaret and Forkel, Stephanie J. and Demeyere, Nele},
title = {{Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes}},
journal = {medRxiv (preprint)},
year = {2026},
month = may,
publisher = {medRxiv},
doi = {10.64898/2026.05.12.26353056},
url = {https://doi.org/10.64898/2026.05.12.26353056}
}

RIS

TY - JOUR
AU - Jane Moore, Margaret
AU - Forkel, Stephanie J.
AU - Demeyere, Nele
TI - Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes
T2 - medRxiv (preprint)
J2 - medRxiv
PY - 2026
DA - 2026/05/15
PB - medRxiv
DO - 10.64898/2026.05.12.26353056
UR - https://doi.org/10.64898/2026.05.12.26353056
LA - en
ER -

CSL-JSON

{
"id": "10.64898/2026.05.12.26353056",
"type": "article",
"title": "Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes",
"container-title": "medRxiv (preprint)",
"author": [
{
"family": "Jane Moore",
"given": "Margaret"
},
{
"family": "Forkel",
"given": "Stephanie J."
},
{
"family": "Demeyere",
"given": "Nele"
}
],
"container-title-short": "medRxiv",
"DOI": "10.64898/2026.05.12.26353056",
"publisher": "medRxiv",
"URL": "https://doi.org/10.64898/2026.05.12.26353056",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
15
]
]
}
}

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/s41746-026-02803-2 [code]
A clinical neuroimaging platform for rapid, automated lesion detection and personalized post-stroke outcome prediction.
Journal: NPJ digital medicine
In common: stroke, clinical / translational, 6 references
[2] doi:10.1093/cercor/bhag120
Cognition disconnected: the influence of domain-general cognition (g) in lesion-deficit mapping.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: 6 references
[3] doi:10.1016/j.nicl.2026.104052 [code]
Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks.
Journal: NeuroImage. Clinical
In common: tidyverse, clinical / translational, 5 references
[4] doi:10.1038/s41586-026-10631-3 [code]
A prognostic human brain network for diffuse midline glioma.
Journal: Nature
In common: clinical / translational, 4 references
[5] doi:10.1016/j.isci.2026.115657 [code]
Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug.
Journal: iScience
In common: pROC, cowplot, ggpubr, 1 other tool, clinical / translational
[6] 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: BayesFactor, cowplot, ggpubr, 1 other tool
[7] doi:10.1038/s41467-026-73865-9 [code]
Histamine shapes the neurocomputational dynamics of human learning.
Journal: Nature communications
In common: BayesFactor, cowplot, ggpubr, 1 other tool
[8] doi:10.1162/imag.a.1258 [code]
Non-specific increase in alpha power during a neurofeedback session targeting its downregulation.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: BayesFactor, cowplot, ggpubr, 1 other tool
[9] doi:10.1523/eneuro.0076-26.2026 [code]
Exogenously Driven Neural Reactivation of Spatially Matching Visual Working-Memory Contents.
Journal: eNeuro
In common: BayesFactor, cowplot, ggpubr, 1 other tool
[10] doi:10.1038/s44271-026-00431-w [code]
Alpha power increases spontaneously during a neurofeedback session.
Journal: Communications psychology
In common: BayesFactor, cowplot, ggpubr, 1 other tool

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.