OSCR

Accelerated brain aging in Veterans with posttraumatic stress symptoms and mild traumatic brain injury.

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; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 100 lines · 1.9 KB · no license

  1. import keras
  2. from keras.applications.resnet50 import ResNet50
  3. from keras.preprocessing import image
  4. from keras import models, optimizers
  5. from keras.preprocessing.image import ImageDataGenerator
  6. from keras import regularizers
  7. from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
  8. from keras import models
  9. from keras import layers
  10. from keras import optimizers
  11. import numpy as np
  12. import pandas as pd
  13. import math
  14. #import h5py
  15. from keras.models import load_model
  16. import sys
  17. import os
  18. from os import listdir
  19. model = load_model(sys.argv[3])
  20. print(model.summary())
  21. test_dir = sys.argv[1]
  22. batch_size = 80
  23. datagen_test=ImageDataGenerator(rescale=1./255, horizontal_flip= False, vertical_flip = False,
  24. featurewise_center = False, featurewise_std_normalization = False)
  25. print(test_dir)
  26. test_generator=datagen_test.flow_from_directory(
  27. directory=str(test_dir),
  28. batch_size=batch_size,
  29. seed=42,
  30. shuffle=False,
  31. class_mode=None)
  32. labels_test = []
  33. sitelist = []
  34. IDlist = []
  35. sex_test = []
  36. slice_test = []
  37. deplist = []
  38. test_generator.reset()
  39. i = 0
  40. for x in test_generator.filenames:
  41. i = i+1
  42. sl = x.split('-')[1].split('.')[0]
  43. x = x.split('_T1')[0]
  44. IDlist.append(x)
  45. test_generator.reset()
  46. predicty = model.predict_generator(test_generator,verbose=1, steps = test_generator.n/batch_size)
  47. prediction_data = pd.DataFrame()
  48. prediction_data['ID'] = IDlist
  49. prediction_data['Prediction'] = predicty
  50. IDset = set(prediction_data['ID'].values)
  51. IDset = list(IDset)
  52. final_prediction = []
  53. final_labels = []
  54. final_site = []
  55. for x in IDset:
  56. check_predictions = prediction_data[prediction_data['ID']==x]['Prediction']
  57. predicty = check_predictions.reset_index(drop = True)
  58. final_prediction.append(np.median(predicty))
  59. predicty1 = final_prediction
  60. out_data = pd.DataFrame()
  61. out_data['ID'] = IDset
  62. out_data['Pred_Age'] = predicty1
  63. out_data.to_csv(sys.argv[2], index=False)

Model_Test.py at commit 505f4e4, no license · at the source

Overview

Authors: Ruth Klaming1,2, Andrea D Spadoni1,2, Jessica Bomyea1,3,2, Wesley K Thompson4,5, Alan N Simmons1,3,2
  1. VA San Diego Healthcare System, 3350 La Jolla Village Dr, San Diego, CA, 92161, USA
  2. University of California, San Diego, Department of Psychiatry, 9500 Gilman Drive, La Jolla, CA, 92093, USA
  3. VA San Diego Healthcare System, Center of Excellence for Stress and Mental Health, 3350 La Jolla Village Dr, San Diego, CA, 92161, USA
  4. Center for Population Neuroscience and Genetics, Laureate Institute for Brain Research, 6655 S Yale Ave, Tulsa, OK, 74136, USA
  5. University of California, San Diego, Department of Radiology, 9500 Gilman Drive, La Jolla, CA, 92093, USA
Journal: Neuroimage. Reports, volume 6, issue 3, article 100377
Dates: received 10 October 2025; accepted 27 June 2026; published online 2 July 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1016/j.ynirp.2026.100377 · PMID 42434106 · PMCID PMC13352378 · OpenAlex W7167061845
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: structural MRI / diffusion (modality), human (organism), other condition (population), traumatic brain injury (population), clinical / translational (subfield)
Methods: Spectral & time-frequency, Statistics
Keywords: Brain aging, Deep learning method, Posttraumatic stress disorder, Mild traumatic brain injury, Magnetic resonance imaging
Topic: Traumatic Brain Injury Research (Clinical Neurology, Medicine), according to OpenAlex
Funding: RRD VA (IK2 RX004777)
Citations: not cited yet (Europe PMC); 84 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.

vishnubashyam/DeepBrainNet

License: none: the authors keep all their rights
State: the link answers, verified on 27 October 2026
Evidence: files inventoried
Commit: 505f4e4fdda6a2f5773bec0c98ef567a7a4ae36e, 4 September 2020
Languages: Python (2), Shell (1)
Size: 11 files, 3 scripts
Software Heritage: not archived
Found in: the text, “Neuroimaging and brain age computation”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (2 files), pandas (2 files), Keras (1 file), NiBabel (1 file), Pillow (1 file), scikit-learn (1 file)
Availability: 2 checks, the latest on 27 October 2026: the link answers
  • 27 October 2026: the link answers
  • 26 September 2026: the link answers
4 files

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;
  • 3 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

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

  • it says that the data are available on request

Read it in the paper: doi.org/10.1016/j.ynirp.2026.100377.

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

  • Authors: added Andrea D Spadoni (0000-0002-8367-6406); removed Andrea D Spadoni

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 5 keywords, 1 funder, 74 references.

Cite

This paper

Klaming, R., Spadoni, A. D., Bomyea, J., Thompson, W. K., & Simmons, A. N. (2026). Accelerated brain aging in Veterans with posttraumatic stress symptoms and mild traumatic brain injury. Neuroimage. Reports, 6(3), 100377. https://doi.org/10.1016/j.ynirp.2026.100377

BibTeX

@article{klaming2026accelerated,
author = {Klaming, Ruth and Spadoni, Andrea D and Bomyea, Jessica and Thompson, Wesley K and Simmons, Alan N},
title = {{Accelerated brain aging in Veterans with posttraumatic stress symptoms and mild traumatic brain injury}},
journal = {Neuroimage. Reports},
year = {2026},
month = jul,
volume = {6},
number = {3},
pages = {100377},
publisher = {Elsevier},
issn = {2666-9560},
doi = {10.1016/j.ynirp.2026.100377},
url = {https://doi.org/10.1016/j.ynirp.2026.100377},
pmid = {42434106},
pmcid = {PMC13352378}
}

RIS

TY - JOUR
AU - Klaming, Ruth
AU - Spadoni, Andrea D
AU - Bomyea, Jessica
AU - Thompson, Wesley K
AU - Simmons, Alan N
TI - Accelerated brain aging in Veterans with posttraumatic stress symptoms and mild traumatic brain injury
T2 - Neuroimage. Reports
J2 - Neuroimage Rep
PY - 2026
DA - 2026/07/02
VL - 6
IS - 3
SP - 100377
SN - 2666-9560
PB - Elsevier
DO - 10.1016/j.ynirp.2026.100377
UR - https://doi.org/10.1016/j.ynirp.2026.100377
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.ynirp.2026.100377",
"type": "article-journal",
"title": "Accelerated brain aging in Veterans with posttraumatic stress symptoms and mild traumatic brain injury",
"container-title": "Neuroimage. Reports",
"author": [
{
"family": "Klaming",
"given": "Ruth"
},
{
"family": "Spadoni",
"given": "Andrea D"
},
{
"family": "Bomyea",
"given": "Jessica"
},
{
"family": "Thompson",
"given": "Wesley K"
},
{
"family": "Simmons",
"given": "Alan N"
}
],
"container-title-short": "Neuroimage Rep",
"volume": "6",
"issue": "3",
"page": "100377",
"DOI": "10.1016/j.ynirp.2026.100377",
"PMID": "42434106",
"PMCID": "PMC13352378",
"ISSN": "2666-9560",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.ynirp.2026.100377",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
2
]
]
}
}

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.3390/jcm12052079 [code]
Sleep Quality Disturbances Are Associated with White Matter Alterations in Veterans with Post-Traumatic Stress Disorder and Mild Traumatic Brain Injury.
Journal: Journal of clinical medicine
In common: NiBabel, scikit-learn, pandas, 1 other tool, traumatic brain injury, clinical / translational, other condition, 6 references
[2] doi:10.1002/hbm.26144 [code]
Benchmarking the generalizability of brain age models: Challenges posed by scanner variance and prediction bias.
Journal: Human brain mapping
In common: Keras, Pillow, NiBabel, 3 other tools, structural MRI / diffusion, 3 references
[3] doi:10.1093/braincomms/fcaf344 [code]
More than chronic pain: behavioural and psychosocial protective factors predict lower brain age in adults with/at risk of knee osteoarthritis over two years.
Journal: Brain communications
In common: Keras, Pillow, NiBabel, 3 other tools, structural MRI / diffusion, 3 references
[4] doi:10.1162/imag.a.1164 [code]
Bias and generalizability of brain age prediction models: A multi-cohort evaluation with anatomical and interpretability insights.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Keras, Pillow, NiBabel, 3 other tools, structural MRI / diffusion, 3 references
[5] doi:10.1016/j.compbiomed.2025.110484 [code]
Does restrictive anorexia nervosa impact brain aging? A machine learning approach to estimate age based on brain structure.
Journal: Computers in biology and medicine
In common: scikit-learn, pandas, NumPy, structural MRI / diffusion, clinical / translational, other condition, 5 references
[6] doi:10.1002/brb3.2413 [code]
Assessment of brain age in posttraumatic stress disorder: Findings from the ENIGMA PTSD and brain age working groups.
Journal: Brain and behavior
In common: structural MRI / diffusion, other condition, 6 references
[7] doi:10.7554/elife.81067 [code]
Biological brain age prediction using machine learning on structural neuroimaging data: Multi-cohort validation against biomarkers of Alzheimer's disease and neurodegeneration stratified by sex.
Journal: eLife
In common: Keras, scikit-learn, pandas, 1 other tool, structural MRI / diffusion, clinical / translational, other condition, 4 references
[8] doi:10.1016/j.ynirp.2025.100252 [code]
Repeatability and reproducibility of brain age estimates in multiple sclerosis for three publicly available models.
Journal: Neuroimage. Reports
In common: Keras, Pillow, NiBabel, 3 other tools, structural MRI / diffusion, 2 references
[9] doi:10.1186/s40708-024-00223-0 [code]
Examining the reliability of brain age algorithms under varying degrees of participant motion.
Journal: Brain informatics
In common: Keras, NiBabel, scikit-learn, 2 other tools, structural MRI / diffusion, clinical / translational, 3 references
[10] doi:10.3389/fnagi.2026.1731909 [code]
Ultra-fast MRI for brain-age prediction in a real-world cognitive disorders clinic.
Journal: Frontiers in aging neuroscience
In common: scikit-learn, pandas, NumPy, structural MRI / diffusion, clinical / translational, 5 references

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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1016/j.ynirp.2026.100377.svg)](https://openscicode.org/badge/doi/10.1016/j.ynirp.2026.100377)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.ynirp.2026.100377.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.ynirp.2026.100377
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.ynirp.2026.100377"><img src="https://openscicode.org/badge/doi/10.1016/j.ynirp.2026.100377.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

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)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.