Neuroimaging and behavioural biomarkers of post-stroke cognitive recovery outcomes
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 212 lines · 9.2 KB · no license
- #OCSPred Project Data Cleaning/Finding -------------------------
- #load relevant packages
- library(tidyverse)
- library(readxl)
- #possible method notes ---
- # -SCCAN/LDA
- #- build model best predicting change over time?
- # - or build models separating recovered/persistent?
- #load in raw data
- volumes <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/LSMMulti_Volumes.xlsx')
- volumes<- subset(volumes, !grepl('SP', ScanFile))
- acute_raw <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/OCSPred_OxCont_Acute.xlsx')
- chronic_raw <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/OCSPred_OxCont_Chronic.xlsx')
- extras_raw <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/OCSPred_Data_extras.xlsx')
- load('/Users/uqmmoo13/Desktop/OCSPred/Data/LSMMulti_Cleaned_SampleData.R')
- dems <- subset(Data, !grepl('S', ID))
- #create variables for matching
- volumes <- mutate(volumes, IDshort = substr(ScanFile, 6, 9))
- extras_raw <- mutate(extras_raw, IDshort = substr(ID, nchar(ID)-3, nchar(ID)))
- extras_raw <- subset(extras_raw, !is.na(IDshort))
- chronic_raw <- mutate(chronic_raw, IDshort = substr(StudyID, nchar(StudyID)-3, nchar(StudyID)))
- chronic_raw <- subset(chronic_raw, !is.na(IDshort))
- acute_raw <- mutate(acute_raw, IDshort = substr(ID, nchar(ID)-3, nchar(ID)))
- acute_raw <- subset(acute_raw, !is.na(IDshort))
- dems <- mutate(dems, IDshort = substr(ID, nchar(ID)-3, nchar(ID)))
- #join all data
- data <- left_join(acute_raw, chronic_raw, by = 'IDshort')
- data <- left_join(data, dems, by = 'IDshort')
- data <- left_join(data, volumes, by = 'IDshort')
- data <- left_join(data, extras_raw, by = 'IDshort')
- #removes any NA or Impute
- data[data == "Impute"] <- NA
- data[data == "NA"] <- NA
- #cleans up duplicate variables
- data$ScanType.x[is.na(data$ScanType.x)] <- data$ScanType.y[is.na(data$ScanType.x)]
- data$StrokeScan[is.na(data$StrokeScan)] <- data$Intv[is.na(data$StrokeScan)]
- data$Multiple.x[is.na(data$Multiple.x)] <- data$Multiple.y[is.na(data$Multiple.x)]
- data$Sex[is.na(data$Sex)] <- data$Gender[is.na(data$Sex)]
- data$YearsEdu[is.na(data$YearsEdu)] <- data$Education[is.na(data$YearsEdu)]
- data$StrokeAge[is.na(data$StrokeAge)] <- data$Age[is.na(data$StrokeAge)]
- data$Handedness.x[is.na(data$Handedness.x)] <- data$Handedness.y[is.na(data$Handedness.x)]
- data$StrokeType.x[is.na(data$StrokeType.x)] <- data$StrokeType.y[is.na(data$StrokeType.x)]
- data$LesionHem[is.na(data$LesionHem)] <- data$StrokeSide[is.na(data$LesionHem)]
- data$Volume.x[is.na(data$Volume.x)] <- data$Volume.y[is.na(data$Volume.x)]
- #remove uneccesary columns
- data <- dplyr::select(data, !(ID.y) &!(Intv) & !(ScanTest) & !(Multiple.y)
- & !(Gender) & !(Education) & !(Age) & !(StrokeType.y) & !(Handedness.y)
- & !(StrokeSide) &!(ScanFile.y) &!(IntvCat) & !(age) & !(sex) & !(hand)
- & !(years_education) & !(nihss) &!(Version) & !(hadsa_total) & !(hadsd_total)
- & !(barthel_lf_total) &(!ID) & !(Volume.y) & !(moca_total) & !(StrokeTest))
- #renames remaining columns
- name_list <- names(data)
- name_list[name_list == "ID.x"] <- "ID"
- name_list[name_list == "ScanType.x"] <- "ScanType"
- name_list[name_list == "Multiple.x"] <- "Multiple"
- name_list[name_list == "Handedness.x"] <- "Hand"
- name_list[name_list == "StrokeType.x"] <- "StrokeType"
- names(data) <- name_list
- #creates group indexes
- test_list <- c("PIC", "SEM", "SNT", "BHT",
- "EGO", "ALLO", "EXC",
- "ORT","RCL", "RCG", "PRX", "CAL", "NUM")
- #creates standard scores for each subtest -----------------------------------
- for (i in 1:length(test_list)){
- test <- test_list[i]
- acute_total <- paste("A_", test, "_T", sep ="")
- chronic_total <- paste("C_", test, "_T", sep ="")
- acute_max <- paste("A_", test, "_M", sep ="")
- chronic_max <- paste("C_", test, "_M", sep ="")
- a_norm <- paste("A_", test, "_N", sep ="")
- c_norm <- paste("C_", test, "_N", sep ="")
- if (test == "ALLO" | test == "EGO"){
- acute_bin <- paste("A_", test, "_L_B", sep ="")
- chron_bin <- paste("C_", test, "_L_B", sep ="")
- test_temp = paste(test, "_L", sep ="")
- change_score <- paste(test, "_change", sep ="")
- data[test_temp] <- "NA"
- data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 1] <- "Persistent"
- data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 0] <- "Recovered"
- data[[test_temp]][as.numeric(data[[acute_bin]]) == 0] <- "Control"
- acute_bin <- paste("A_", test, "_R_B", sep ="")
- chron_bin <- paste("C_", test, "_R_B", sep ="")
- test_temp <- paste(test, "_R", sep ="")
- data[test_temp] <- "NA"
- data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 1] <- "Persistent"
- data[[test_temp]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 0] <- "Recovered"
- data[[test_temp]][as.numeric(data[[acute_bin]]) == 0] <- "Control"
- data <- mutate(data, placeholder = as.numeric(data[[acute_total]])/as.numeric(data[[acute_max]]))
- names(data)[names(data)== "placeholder"] <- a_norm
- data <- mutate(data, placeholder = as.numeric(data[[chronic_total]])/as.numeric(data[[chronic_max]]))
- names(data)[names(data)== "placeholder"] <- c_norm
- data <- mutate(data, placeholder = as.numeric(data[[c_norm]]) - as.numeric(data[[a_norm]]))
- names(data)[names(data)== "placeholder"] <- change_score
- }else{
- acute_bin <- paste("A_", test, "_B", sep ="")
- chron_bin <- paste("C_", test, "_B", sep ="")
- change_score <- paste(test, "_change", sep ="")
- data[test] <- "NA"
- data[[test]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 1] <- "Persistent"
- data[[test]][as.numeric(data[[acute_bin]]) == 1 & as.numeric(data[[chron_bin]]) == 0] <- "Recovered"
- data[[test]][as.numeric(data[[acute_bin]]) == 0] <- "Control"
- data <- mutate(data, placeholder = as.numeric(data[[acute_total]])/as.numeric(data[[acute_max]]))
- names(data)[names(data)== "placeholder"] <- a_norm
- data <- mutate(data, placeholder = as.numeric(data[[chronic_total]])/as.numeric(data[[chronic_max]]))
- names(data)[names(data)== "placeholder"] <- c_norm
- data <- mutate(data, placeholder = as.numeric(data[[c_norm]]) - as.numeric(data[[a_norm]]))
- names(data)[names(data)== "placeholder"] <- change_score
- }
- }
- #make egocentric and allocentric variables -
- data$C_EGO_L_N <- data$C_EGO_N
- data$C_EGO_L_N[data$C_EGO_N < 0] <- 0
- data$C_EGO_R_N <- data$C_EGO_N
- data$C_EGO_R_N[data$C_EGO_N > 0] <- 0
- data$C_ALLO_R_N <- data$C_ALLO_N
- data$C_ALLO_R_N[data$C_ALLO_N > 0] <- 0
- data$C_ALLO_L_N <- data$C_ALLO_N
- data$C_ALLO_L_N[data$C_ALLO_N < 0] <- 0
- data$A_EGO_L_N <- data$A_EGO_N
- data$A_EGO_L_N[data$A_EGO_N < 0] <- 0
- data$A_EGO_R_N <- data$A_EGO_N
- data$A_EGO_R_N[data$A_EGO_N > 0] <- 0
- data$A_ALLO_R_N <- data$A_ALLO_N
- data$A_ALLO_R_N[data$A_ALLO_N > 0] <- 0
- data$A_ALLO_L_N <- data$A_ALLO_N
- data$A_ALLO_L_N[data$A_ALLO_N < 0] <- 0
- data$A_ALLO_L_N <- 1 - abs(data$A_ALLO_L_N )
- data$A_ALLO_R_N <- 1 - abs(data$A_ALLO_R_N )
- data$A_EGO_L_N <- 1 - abs(data$A_EGO_L_N )
- data$A_EGO_R_N <- 1 - abs(data$A_EGO_R_N )
- data$C_ALLO_L_N <- 1 - abs(data$C_ALLO_L_N )
- data$C_ALLO_R_N <- 1 - abs(data$C_ALLO_R_N )
- data$C_EGO_L_N <- 1 - abs(data$C_EGO_L_N )
- data$C_EGO_R_N <- 1 - abs(data$C_EGO_R_N )
- #invert BHT scores too
- data$A_BHT_N <- 1 - abs(data$A_BHT_N )
- data$C_BHT_N <- 1 - abs(data$C_BHT_N )
- #removes excluded patients
- grouped_data <- subset(data, !is.na(LesionFile))
- test_list <- c("PIC", "SEM", "SNT", "BHT",
- "EGO_L", "ALLO_L", "EGO_R", "ALLO_R", "EXC",
- "ORT","RCL", "RCG", "PRX", "CAL", "NUM")
- #summarise numbers in each gorup
- temp_dat <- pivot_longer(grouped_data, cols = test_list, names_to = "Test", values_to = "Cat")
- temp_dat <- summarise(group_by(temp_dat, Test,Cat), n = n())
- #for each test - plot proportions spared/impaired
- #plot_data <- pivot_longer(grouped_data, cols = test_list, names_to = "Test", values_to = "Cat")
- #plot_data <- subset(plot_data, !is.na(Cat) & Cat != "NA")
- #ggplot(plot_data, aes(x=Cat)) +
- #geom_bar()+
- #geom_hline(yintercept = 10, colour = 'red') +
- #facet_wrap(facets = vars(Test)) +
- #theme_classic()
- #load in lesion data!
- harox <- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/summary_fraction_HarOx.xlsx')
- harox<- mutate(harox, IDshort = substr(LesionFile, 6, 9))
- harox <- dplyr::select(harox, !('LesionFile'))
- grouped_data <- left_join(grouped_data, harox, by = "IDshort")
- jhu<- read_xlsx('/Users/uqmmoo13/Desktop/OCSPred/Data/summary_fraction_JHU.xlsx')
- jhu<- mutate(jhu, IDshort = substr(LesionFile, 6, 9))
- jhu <- dplyr::select(jhu, !('LesionFile'))
- grouped_data <- left_join(grouped_data, jhu, by = "IDshort")
- #remove duplicate IDs
- grouped_data <- distinct(grouped_data)
- grouped_data <- mutate(grouped_data, dupcheck = duplicated(grouped_data$ID))
- grouped_data <- subset(grouped_data, dupcheck == FALSE)
- #inverts BHT and EXC
- grouped_data$A_BHT_N <- 1 - grouped_data$A_BHT_N
- grouped_data$C_BHT_N <- 1 - grouped_data$C_BHT_N
- grouped_data$A_EXC_N[grouped_data$A_EXC_N < 0] <- 0
- grouped_data$C_EXC_N[grouped_data$C_EXC_N < 0] <- 0
- grouped_data$A_EXC_N <- 1 - grouped_data$A_EXC_N
- grouped_data$C_EXC_N <- 1 - grouped_data$C_EXC_N
- #save data for later use
- clean_data <- grouped_data
- save('clean_data', file = '/Users/uqmmoo13/Desktop/OCSPred/Data/LSMMulti_CleanData_V1.RData')
OCSPred_DataCleaning_V2.R, no license · at the source
Overview
- Queensland Brain Institute, University of Queensland, Brisbane, Australia
- Donders Research Institute for Brain, Cognition, and Behaviour, Radbound University, Nijmegen, Netherlands
- Nuffield Department of Clinical Neurosciences, University of Oxford, Oxford, UK
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/
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
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
7 files
- Analysis/
OCSPred_DataCleaning_V2. , R, 212 linesR - Analysis/
OCSPred_Dems.R , R, 52 lines - Analysis/
OCSPred_DisconnectionMap , R, 147 linesper.R - Analysis/
OCSPred_LSM_Analysis.R , R, 308 lines - Analysis/
OCSPred_NetworkVis.R , R, 242 lines - Analysis/
OCSPred_SVR_V4.R , R, 502 lines - Analysis/
OCSPred_SecondaryAnalysi , R, 471 liness_V5.R
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://
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://
BibTeX
@article{janemoore2026ne
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/
url = {https://
}
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/
PB - medRxiv
DO - 10.64898/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.64898/
"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":
"DOI": "10.64898/
"publisher": "medRxiv",
"URL": "https://
"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.1162/imag.a.1050 [code]
- Post-stroke cognitive impairment: More than a lesion-symptom model.Journal: Imaging neuroscience (Cambridge, Mass.)In common: BayesFactor, cowplot, ggpubr, 1 other tool, stroke, clinical / translational, 13 references
- [2] doi:10.1007/s00429-023-02702-2 [code]
- Comprehensive voxel-wise, tract-based, and network lesion mapping reveals unique architectures of right and left visuospatial neglect.Journal: Brain structure & functionIn common: ggpubr, tidyverse, behavior only, stroke, 11 references
- [3] doi:10.1093/braincomms/fcaf477 [code]
- From acute neglect to chronic constructional deficits: parietotemporal contributions to long-term post-stroke impairments.Journal: Brain communicationsIn common: behavior only, stroke, clinical / translational, 10 references
- [4] doi:10.1007/s00429-024-02767-7 [code]
- Hayling and stroop tests tap dissociable deficits and network-level neural correlates.Journal: Brain structure & functionIn common: cowplot, ggpubr, tidyverse, behavior only, stroke, 8 references
- [5] doi:10.1002/hbm.70115 [code]
- Iowa Brain-Behavior Modeling Toolkit: An Open-Source MATLAB Tool for Inferential and Predictive Modeling of Imaging-Behavior and Lesion-Deficit Relationships.Journal: Human brain mappingIn common: 10 references
- [6] doi:10.1093/braincomms/fcaf176
- Post-stroke sensory hypersensitivity: insights from lesion-symptom and disconnection mapping.Journal: Brain communicationsIn common: stroke, clinical / translational, 8 references
- [7] doi:10.1002/hbm.70078
- Structural Disconnections Caused by White Matter Hyperintensities in Post-Stroke Spatial Neglect.Journal: Human brain mappingIn common: stroke, 8 references
- [8] doi:10.1016/j.nicl.2022.103305
- The impact of etiology in lesion-symptom mapping - A direct comparison between tumor and stroke.Journal: NeuroImage. ClinicalIn common: stroke, clinical / translational, 8 references
- [9] doi:10.1093/braincomms/fcae379 [code]
- Mapping sentence comprehension and syntactic complexity: evidence from 131 stroke survivors.Journal: Brain communicationsIn common: ggpubr, tidyverse, stroke, 6 references
- [10] doi:10.1093/brain/awad013 [code]
- Latent disconnectome prediction of long-term cognitive-behavioural symptoms in stroke.Journal: Brain : a journal of neurologyIn common: behavior only, stroke, clinical / translational, 3 references, author Stephanie J. Forkel
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 7 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:5433d78a64b330b1…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.64898/2026.05.12.26353056)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.64898/2026.05.12.26353056.svg
:target: https://openscicode.org/badge/doi/10.64898/2026.05.12.26353056
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.64898/2026.05.12.26353056"><img src="https://openscicode.org/badge/doi/10.64898/2026.05.12.26353056.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
