OSCR

Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study

Code ↔ Paper

6 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 6 matches
  1. [1] § Methods › Preprocessing ↔ Scripts/longitudinal_model_jobsub_scripts/run_N4BandSS.py, lines 131–182 · score 0.75 · N4 bias field, skull stripping, SynthStrip, longitudinal model
  2. [2] § Methods › Models ↔ Scripts/longitudinal_model_jobsub_scripts/run_task182_inferences.py, lines 1–13 · score 0.67 · nnUNet, subtraction image, longitudinal model, tumor change, trained, pre
  3. [3] § Methods › Preprocessing ↔ Scripts/longitudinal_model_jobsub_scripts/run_longitudinal_preprep.py, lines 1–21 · score 0.67 · skull stripping, subtraction image, longitudinal model, intensity, preprocessing, FLAIR
  4. [4] § Methods › Models ↔ Scripts/independent_model_jobsub_scripts/run_indep_model.py, lines 96–159 · score 0.63 · BraTS Peds, nnUNet, MedNeXt, SwinUNETR, independent model, DMG
  5. [5] § Methods › Models ↔ Scripts/independent_model_jobsub_scripts/reregistration_time1.py, lines 1–16 · score 0.62 · BraTS, segmentation mask, independent model, transformed, space, subtracted
  6. [6] § Methods › Cohort Description › 2- Ground Truth/Label Establishment › B- Segmentation Task ↔ Scripts/independent_model_jobsub_scripts/reregistration_time1.py, lines 1–16 · score 0.60 · Segmentation masks, subtraction image, FLAIR images, native, space, models

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

Python · 144 lines · 6.7 KB · MIT · 2 matches

  1. """
  2. This script should be run after "reregistration_time2.py". This script will submit a job for each time1
  3. independent model segmentation output to an SGE cluster, registering inference masks to native time2
  4. FLAIR image space so session pair subtraction images can be generated (in time2 space). Outputs will be saved
  5. to a "postprocessed_time1" directory.
  6. Because BraTS transformation matrices don't exist to transform time1 into time2 image space, this script
  7. will use the time1 segmentation mask already transformed to native FLAIR image by reregistration_time2.py.
  8. It will then apply the time1-to-time2 transformation matrix generated by longitudinal model preprocessing
  9. script to get these time1 segmentation masks into time2 space for each session pair.
  10. """
  11. from pathlib import Path
  12. import subprocess
  13. import time
  14. import logging
  15. import pandas as pd
  16. # === CONFIGURATION ===
  17. TEST_MODE = False # Set to True to process only the first scsv file row for testing
  18. SUBMISSION_DELAY = 2 # Delay (in seconds) between job submissions
  19. # Configure logging to write to destination .log file
  20. log_dir = Path("/Path/to/personal/working/directory/DMG/logs/postprocessing")
  21. log_dir.mkdir(parents=True, exist_ok=True)
  22. log_file = log_dir / "reregistration_time1.log"
  23. logging.basicConfig(filename=log_file, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
  24. logging.info(f"Script started. Test mode: {TEST_MODE}")
  25. # Set directory paths
  26. PREPREP_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/preprocessed")
  27. MOVING_SEG_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/postprocessed_time2")
  28. OUTPUT_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/postprocessed_time1")
  29. JOB_DIR = Path("/Path/to/personal/working/directory/DMG/jobs/postprocessing_time1_jobs")
  30. TERM_LOG_DIR = Path("/Path/to/personal/working/directory/DMG/logs/postprocessing/postprocessing_time1_terminal_output")
  31. CSV_DIR = Path("/Path/to/personal/working/directory/DMG/data/tabulated/session_pairs_V2.csv")
  32. NNUNET_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/nnUNet_input")
  33. # Ensure the relevant directories exist
  34. JOB_DIR.mkdir(parents=True, exist_ok=True)
  35. TERM_LOG_DIR.mkdir(parents=True, exist_ok=True)
  36. NNUNET_DIR.mkdir(parents=True, exist_ok=True)
  37. OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
  38. # Read the CSV file to get valid session pairs
  39. df = pd.read_csv(CSV_DIR)
  40. # Loop over each row in the CSV file
  41. for index, row in df.iterrows():
  42. # Extract & zero pad the subject and session identifiers
  43. sub = str(row["SubjectID"]).zfill(3)
  44. time1 = str(row["Time1"]).zfill(3)
  45. time2 = str(row["Time2"]).zfill(3)
  46. # Construct the file paths for the Time1 and Time2 images and transormation matrix
  47. time1_seg = MOVING_SEG_DIR / f"sub-{sub}" / f"sub-{sub}_ses-{time1}_TumorMask_FLAIR.nii.gz"
  48. time2_ref = NNUNET_DIR / f"sub-{sub}" / f"sub-{sub}_ses-{time1}_ses-{time2}_0001.nii.gz"
  49. reg_mat = PREPREP_DIR / f"sub-{sub}" / f"ses-{time1}" / "anat" / "intermediates" / f"sub-{sub}_ses-{time1}.mat"
  50. missing_files = False
  51. # Check if the Time1 seg exists; log an error if not
  52. if not time1_seg.exists():
  53. logging.error(f"Missing Time1 segmentation file for subject {sub}, session {time1}: {time1_seg}")
  54. missing_files = True
  55. # Check if the Time2 reference image exists; log an error if not
  56. if not time2_ref.exists():
  57. logging.error(f"Missing Time2 reference image for subject {sub}, session {time2}: {time2_ref}")
  58. missing_files = True
  59. # Check if the registration matrix exists; log an error if not
  60. if not reg_mat.exists():
  61. logging.error(f"Missing registration matrix for subject {sub}, session {time1}: {reg_mat}")
  62. missing_files = True
  63. # Skip this job sub if any files are missing
  64. if missing_files:
  65. continue
  66. #Create job script content with preprocessing commands
  67. job_script_path = JOB_DIR / f"sub-{sub}_ses-{time1}_time1_postprocessing.qsh"
  68. job_script_content = f"""#!/bin/bash
  69. #$ -S /bin/bash # shell language for the job scheduler
  70. #$ -N sub-{sub}_ses-{time1}_time1_postproc # job name
  71. #$ -cwd # use current working directory
  72. #$ -j y # join STDERR and STDOUT
  73. #$ -o {TERM_LOG_DIR}/sub-{sub}_ses-{time1}_time1_reregistration.log # per-job terminal output log file
  74. #$ -l mem_free=16G # job requires up to 16 GB of RAM
  75. #$ -l h_rt=00:30:00 # maximum runtime of 30 minutes
  76. #$ -l scratch=10G # job requires up to 10 GB of local/scratch space
  77. #$ -r y # if job crashes, it should be restarted
  78. # Make reregistered output directory
  79. mkdir -p {OUTPUT_DIR}/sub-{sub}/
  80. # Run Time1 reregisration
  81. /Path/to/Wrappers/qsiprep_1.0.0rc1_wrapperTMP.sh \
  82. flirt \
  83. -in {time1_seg} \
  84. -ref {time2_ref} \
  85. -applyxfm \
  86. -init {reg_mat} \
  87. -out {OUTPUT_DIR}/sub-{sub}/sub-{sub}_ses-{time1}_TumorMask_FLAIR.nii.gz \
  88. -interp nearestneighbour \
  89. -v
  90. registered_path={OUTPUT_DIR}/sub-{sub}/sub-{sub}_ses-{time1}_TumorMask_FLAIR.nii.gz
  91. if [[ -f "$registered_path" ]]; then
  92. echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Time1 seg mask reregistered to Time2 FLAIR. Registered mask saved to: $registered_path" >> {log_file}
  93. else
  94. echo "$(date '+%Y-%m-%d %H:%M:%S') - ERROR - Reregistration output not found for: $registered_path" >> {log_file}
  95. fi
  96. [[ -n "$JOB_ID" ]] && qstat -j "$JOB_ID"
  97. echo "Job for sub-{sub}: Time1 ses-{time1} → Time2 ses-{time2} completed successfully."
  98. """
  99. # Write the job script to file
  100. try:
  101. job_script_path.write_text(job_script_content)
  102. except Exception as e:
  103. logging.exception(f"Failed to write job script for subject {sub}: {job_script_path}")
  104. continue # Skip job submission for this subject
  105. # Submit the job to SGE with error capture
  106. try:
  107. result = subprocess.run(["qsub", str(job_script_path)],
  108. capture_output=True, text=True)
  109. if result.returncode != 0:
  110. logging.error(f"Job submission failed for subject {sub}: {result.stderr}")
  111. else:
  112. print(f"Submitted job for sub-{sub}_ses-{time1}.")
  113. except Exception as e:
  114. logging.exception(f"Exception during job submission for subject {sub}")
  115. # Delay between job submissions
  116. time.sleep(SUBMISSION_DELAY)
  117. if TEST_MODE:
  118. print(f"Test mode enabled. Processed only sub-{sub}, time1(ses-{time1}). Exiting.")
  119. break
  120. print("All jobs submitted successfully!")

reregistration_time1.py at commit b852988, under MIT · at the source

Overview

Authors: Atlas Haddadi Avval1, Evan Bloch1, Brian Nguyen1, Pierre Nedelec1, John Zielke2, Benjamin H. Kann2, Marius Gorge Linguraru3, Jeffrey D. Rudie4, Leo P. Sugrue1, Sabine Mueller1, Andreas M. Rauschecker1
ORCID iDs: Evan Bloch
  1. University of California San Francisco
  2. Mass General Brigham, Dana-Farber Cancer Institute, Harvard Medical School
  3. Sheikh Zayed Institute for Pediatric Surgical Innovation, Children’s National Hospital
  4. Inselspital, University Hospital Bern and University of Bern
Institutions: University of California, San Francisco (United States); Dana-Farber Cancer Institute (United States); Children's National (United States); University Hospital of Bern (Switzerland); University of Bern (Switzerland)
Dates: published online 13 May 2026
Type: Preprint
License: CC BY
Identifiers: DOI 10.21203/rs.3.rs-9188548/v1 · OpenAlex W7161020243
Open access: green, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), other condition (population), methods / tools (subfield)
Methods: Statistics
Keywords: Diffuse Midline Glioma, Diffuse Intrinsic Pontine Glioma, artificial intelligence, segmentation, volumetric analysis
Topic: Glioma Diagnosis and Treatment (Genetics, Medicine), according to OpenAlex
Funding: Swiss National Science Foundation (225913)
Citations: not cited yet (Europe PMC); 30 references in the paper

Abstract

Background: Diffuse midline gliomas (DMGs) are highly aggressive pediatric and young adults brain tumors with poor prognosis and limited treatment options. Accurate imaging assessment of tumor progression is critical for evaluating therapeutic response and guiding clinical decisions, but it is subject to reader bias. This study aims to compare two automated deep learning (DL) based strategies for longitudinal segmentation and subsequent classification of tumor progression in DMG.

Methods: We retrospectively analyzed longitudinal imaging from 155 DMG patients of UCSF hospitals and an external cohort of 18 patients from the Pediatric Neuro-Oncology Consortium. Two publicly available DL models were evaluated: (1) a “longitudinal” model trained to directly segment areas of change from two consecutive time points, and (2) an “independent” state-of-the-art volumetric segmentation model that processes each time point individually and then computes the change mask between the independent segmentation of consecutive time points. Labels were derived from a manual review of radiology reports and categorized as “Increased,” “Decreased,” or “Stable” tumor size based on the interpreting neuroradiologist’s assessment. Reference standard segmentations of change volumes were manually created in a subset of patients. Model segmentation outputs were compared using Dice score, volumetric mean absolute error (MAE), and volume coefficient of determination (R2) in internal and external sets. For comparison to radiologist assessment, classification accuracy, sensitivity, specificity, and Area Under the ROC Curve (ROC AUC) were assessed.

Findings: The longitudinal model demonstrated superior classification performance with ROC AUCs of 0.93, 0.90, and 0.83 for the prediction of increased, decreased, and stable tumor change classes, respectively in the internal set. It achieved a mean absolute error (MAE) of 7.41 ± 23.04 cm3 and R2 of 0.25 internally, and 8.27 ± 16.63 cm3 and R2 of 0.53 externally. Median Dice scores were 0.76 (IQR: 0.50-0.88) and 0.68 (IQR: 0.41-0.92) in the internal and external datasets, respectively. In comparison, the independent model showed lower classification ROC AUCs (0.83, 0.89, and 0.80), higher MAEs (11.03 ± 21.24 cm3 internally; 10.86 ± 17.51 cm3 externally), and lower median Dice scores (0.40 [IQR: 0.25-0.59] internally; 0.62 [IQR: 0.33-0.83] externally).

Interpretation: For assessing changes in DMG tumor size, the longitudinal DL model generally outperforms the independent model in internal and external cohorts. These findings support integrating dedicated longitudinal-based AI tools for more objective and reproducible tumor assessments.

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

Repository

Its files are read in the Code ↔ Paper reader above, with 6 matches between paragraphs and lines of code.

rauschecker-sugrue-labs/DMG-Longitudinal

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: b852988580c608a06ae6b8a5a324e4166661f9db, 4 August 2025
Languages: Python (10), Shell (3)
Size: 15 files, 13 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: pandas (6 files), NiBabel (3 files), NumPy (1 file), QSIPrep (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
15 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;
  • 13 scripts, each with its path and the digest of its content;
  • 6 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 and Code Availability

De-identified participant data can be provided to qualified investigators upon reasonable request to the corresponding author and following institutional review and completion of a data use agreement. Access will be restricted to research objectives aligned with the original ethical approval and must comply with relevant national data governance requirements and registry data-use policies. To safeguard confidentiality and honor restrictions imposed by the data providers, individual-level data cannot be placed in a public repository. Interested researchers should email the corresponding author with a brief research proposal and will be required to sign a data access agreement. Data will be available upon publication for up to 5 years. The source code used to create the study results is made publicly available at https://github.com/rauschecker-sugrue-labs/DMG-Longitudinal/

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

Recorded: type, journal, dates, 11 authors, 5 keywords, 1 funder, 25 references.

Cite

This paper

Avval, A. H., Bloch, E., Nguyen, B., Nedelec, P., Zielke, J., Kann, B. H., Linguraru, M. G., Rudie, J. D., Sugrue, L. P., Mueller, S., & Rauschecker, A. M. (2026). Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study. Research Square (preprint). https://doi.org/10.21203/rs.3.rs-9188548/v1

BibTeX

@article{avval2026automated,
author = {Avval, Atlas Haddadi and Bloch, Evan and Nguyen, Brian and Nedelec, Pierre and Zielke, John and Kann, Benjamin H. and Linguraru, Marius Gorge and Rudie, Jeffrey D. and Sugrue, Leo P. and Mueller, Sabine and Rauschecker, Andreas M.},
title = {{Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study}},
journal = {Research Square (preprint)},
year = {2026},
month = may,
publisher = {Research Square},
issn = {2693-5015},
doi = {10.21203/rs.3.rs-9188548/v1},
url = {https://doi.org/10.21203/rs.3.rs-9188548/v1}
}

RIS

TY - JOUR
AU - Avval, Atlas Haddadi
AU - Bloch, Evan
AU - Nguyen, Brian
AU - Nedelec, Pierre
AU - Zielke, John
AU - Kann, Benjamin H.
AU - Linguraru, Marius Gorge
AU - Rudie, Jeffrey D.
AU - Sugrue, Leo P.
AU - Mueller, Sabine
AU - Rauschecker, Andreas M.
TI - Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study
T2 - Research Square (preprint)
J2 - Res Sq
PY - 2026
DA - 2026/05/13
SN - 2693-5015
PB - Research Square
DO - 10.21203/rs.3.rs-9188548/v1
UR - https://doi.org/10.21203/rs.3.rs-9188548/v1
ER -

CSL-JSON

{
"id": "10.21203/rs.3.rs-9188548/v1",
"type": "article",
"title": "Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study",
"container-title": "Research Square (preprint)",
"author": [
{
"family": "Avval",
"given": "Atlas Haddadi"
},
{
"family": "Bloch",
"given": "Evan"
},
{
"family": "Nguyen",
"given": "Brian"
},
{
"family": "Nedelec",
"given": "Pierre"
},
{
"family": "Zielke",
"given": "John"
},
{
"family": "Kann",
"given": "Benjamin H."
},
{
"family": "Linguraru",
"given": "Marius Gorge"
},
{
"family": "Rudie",
"given": "Jeffrey D."
},
{
"family": "Sugrue",
"given": "Leo P."
},
{
"family": "Mueller",
"given": "Sabine"
},
{
"family": "Rauschecker",
"given": "Andreas M."
}
],
"container-title-short": "Res Sq",
"DOI": "10.21203/rs.3.rs-9188548/v1",
"ISSN": "2693-5015",
"publisher": "Research Square",
"URL": "https://doi.org/10.21203/rs.3.rs-9188548/v1",
"issued": {
"date-parts": [
[
2026,
5,
13
]
]
}
}

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.1016/j.phro.2026.101056 [code]
Toward uncertainty-aware manual delineation of brain tumours using eye-tracking and image-derived features.
Journal: Physics and imaging in radiation oncology
In common: NiBabel, pandas, NumPy, other condition, 2 references
[2] 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: QSIPrep, NiBabel, pandas, 1 other tool, structural MRI / diffusion
[3] doi:10.1038/s41398-026-04081-8 [code]
Functional system-specific brain aging across the Alzheimer's disease continuum.
Journal: Translational psychiatry
In common: QSIPrep, NiBabel, pandas, 1 other tool, structural MRI / diffusion
[4] doi:10.1002/ana.78203 [code]
AI-Driven Mapping of Seizure Spread Patterns.
Journal: Annals of neurology
In common: QSIPrep, NiBabel, pandas, 1 other tool, structural MRI / diffusion
[5] doi:10.1158/2767-9764.crc-25-0710 [code]
MRI Deep Learning for Differentiating Glioblastoma, IDH Wild-type from Central Nervous System Diffuse Large B-cell Lymphoma.
Journal: Cancer research communications
In common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 2 references
[6] doi:10.1038/s41598-026-48496-1 [code]
A unified FLAIR hyperintensity segmentation model for various CNS tumor types and acquisition time points.
Journal: Scientific reports
In common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, other condition, 1 reference
[7] doi:10.3389/frai.2026.1771088 [code]
Few-shot deployment of pretrained MRI transformers in brain imaging tasks.
Journal: Frontiers in artificial intelligence
In common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, 1 reference
[8] doi:10.21037/qims-2026-0792 [code]
An nnU-Net-based framework with adaptive feature representation for 3D brain tumor segmentation.
Journal: Quantitative imaging in medicine and surgery
In common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, other condition, 1 reference
[9] doi:10.1016/j.dcn.2026.101775 [code]
Neonatal brain-age models in full- and preterm infants.
Journal: Developmental cognitive neuroscience
In common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 1 reference
[10] doi:10.64898/2026.03.10.26348006 [code]
AI-Based Pipeline for the Segmentation of White Matter Hypoattenuations in CT Scans: A Design-Choice Validation Study
Journal: medRxiv (preprint)
In common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, 1 reference

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.