Test-retest reliability and symptom association of personalized depression TMS targets: A comparative study of refined seed-based (RSA) and hierarchical clustering (HCA) approaches.
The 3 matches
- [1] § Materials and methods › The implementation of RSA ↔ Cash_Targeting.m, lines 107–151 · score 0.66 · functional connectivity map, AFNI, sgACC, command, brain, weighting
- [2] § Materials and methods › The implementation of HCA ↔ Cole_Targeting.m, lines 93–144 · score 0.66 · Spearman correlations, distance matrix, hierarchical, subunits, median, voxel
- [3] § Materials and methods › The implementation of RSA ↔ Cole_Targeting.m, lines 1–15 · score 0.60 · voxels outside, DLPFC mask, sgACC, map, weighting, preprocessed
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
MATLAB · 198 lines · 9.8 KB · no license · 2 matches
- clc;
- clear;
- % Folder organization:
- % Data_folder: (1) preprocessed_data [preprocessed nifti files for each subject]
- % (2) censor_file [files containing 0 and 1 values]
- % Mask: SGC_mask; DLPFC mask
- % Interm_folder (output folder):
- % Sub_sgcFCmap [sgACC FC maps for each subject; mean sgACC FC map; weights]
- % sub_timeseries [timeseries of each voxel outside the DLPFC]
- % WeightedTimeseries [weighted timeseries representing SGC]
- % Mask_timeseries [extracted timeseries for each voxel within the ROI]
- % Mask_clusterres [clustering information, representative timeseries and coordinates]
- wkdir = 'TargetCalc';
- %%% Define mask
- Mask46_name = 'DLPFC';
- Mask25_name = 'BA25';
- Mask_BA46 = fullfile(wkdir, 'Mask', [Mask46_name, '_mask_GMres.nii']);
- Mask_BA25 = fullfile(wkdir, 'Mask', [Mask25_name, '_resp.nii']);
- %%% Define folders
- Data_folder = fullfile(wkdir, 'Data_folder', 'preprocessed_data'); %% preprocessed fMRI data
- censor_folder = fullfile(wkdir, 'Data_folder', 'censor_file'); %% censor txt file
- out_folder = fullfile(wkdir, 'Interm_folder'); %% output folder
- %%% Whether to censor timeseries, 1 = censor, 0 = no censor
- censor = 1;
- %%% Create output directories
- output_dirs = {fullfile(out_folder, [Mask46_name, '_timeseries']), ...
- fullfile(out_folder, [Mask25_name, '_timeseries']), ...
- fullfile(out_folder, [Mask46_name, '_clusterres']), ...
- fullfile(out_folder, [Mask25_name, '_clusterres']), ...
- fullfile(out_folder, 'Parameters'), ...
- fullfile(out_folder, 'Decision')};
- for dir = output_dirs
- if exist(dir{1}, 'dir')
- rmdir(dir{1},'s');
- end
- mkdir(dir{1});
- end
- %%% Load sublist
- sublist = importdata(fullfile(wkdir, 'sublist_depression.txt'));
- for i = 1:numel(sublist)
- %%%%% Get timeseries from masks %%%%%
- sub = sublist{i};
- preprocessed_data = fullfile(Data_folder, [sub, '_rbs5nwra_rest.nii']);
- ExtractTimeSeries(preprocessed_data, sub, Mask_BA46, Mask46_name, fullfile(out_folder, [Mask46_name, '_timeseries']));
- ExtractTimeSeries(preprocessed_data, sub, Mask_BA25, Mask25_name, fullfile(out_folder, [Mask25_name, '_timeseries']));
- %%%%% Clustering %%%%%
- BA46_timeseries = load(fullfile(out_folder, [Mask46_name, '_timeseries'], [sub, '_', Mask46_name, '_timeseries.txt']));
- BA25_timeseries = load(fullfile(out_folder, [Mask25_name, '_timeseries'], [sub, '_', Mask25_name, '_timeseries.txt']));
- censor_file = load(fullfile(censor_folder, [sub, '_bs5wra_censor0.5.txt']));
- calc_medialseries(BA46_timeseries, Mask46_name, sub, censor_file, censor, fullfile(out_folder, [Mask46_name, '_clusterres']));
- calc_medialseries(BA25_timeseries, Mask25_name, sub, censor_file, censor, fullfile(out_folder, [Mask25_name, '_clusterres']));
- %%%%% Calculate three parameters %%%%%
- BA46_sbunittime = load(fullfile(out_folder, [Mask46_name, '_clusterres'], [sub, '_', Mask46_name, '_cluster_representts.mat']));
- BA25_sbunittime = load(fullfile(out_folder, [Mask25_name, '_clusterres'], [sub, '_', Mask25_name, '_cluster_representts.mat']));
- BA46_sbunitinfo = load(fullfile(out_folder, [Mask46_name, '_clusterres'], [sub, '_', Mask46_name, '_subunit_inform.mat']));
- BA25_sbunitinfo = load(fullfile(out_folder, [Mask25_name, '_clusterres'], [sub, '_', Mask25_name, '_subunit_inform.mat']));
- para_cal(BA25_sbunittime.cor_medial_series, BA46_sbunittime.cor_medial_series, BA25_sbunitinfo.subunit_inform, BA46_sbunitinfo.subunit_inform, sub, fullfile(out_folder, 'Parameters'));
- %%%%% Decision Making %%%%%
- BA46_sbmedialtime = load(fullfile(out_folder, [Mask46_name, '_clusterres'], [sub, '_', Mask46_name, '_cluster_medialts.mat']));
- BA46_sbunittime = load(fullfile(out_folder, [Mask46_name, '_clusterres'], [sub, '_', Mask46_name, '_cluster_representts.mat']));
- BA46_sbunitcoor = load(fullfile(out_folder, [Mask46_name, '_clusterres'], [sub, '_', Mask46_name, '_cluster_coor.mat']));
- BA46_sbunitinfo = load(fullfile(out_folder, [Mask46_name, '_clusterres'], [sub, '_', Mask46_name, '_subunit_inform.mat']));
- p1 = load(fullfile(out_folder, 'Parameters', [sub, '_subunitcorsize.mat']));
- p2 = load(fullfile(out_folder, 'Parameters', [sub, '_subunitsize.mat']));
- p3 = load(fullfile(out_folder, 'Parameters', [sub, '_subunitconcentraion.mat']));
- decisionMaking(BA46_sbunitcoor.cor_medial_coord, BA46_sbunittime.cor_medial_series, BA46_sbmedialtime.medial_series, BA46_sbunitinfo.subunit_inform, p1.parameter1_cor_size, p2.parameter2_dlPFCsize, p3.parameter3_concentration, sub, fullfile(out_folder, 'Decision'));
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%%% Extract timeseries from BA46 and BA25 %%%%%%%
- function ExtractTimeSeries(data, sub, mask, mask_name, outfolder)
- outfilename = fullfile(outfolder, [sub, '_', mask_name, '_timeseries.txt']);
- unix(['3dmaskdump -mask ', mask, ' -noijk -xyz ', data, ' > ', outfilename]);
- end
- %%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%%%% Calculate Medial Series %%%%%%%%
- function calc_medialseries(data, mask_name, sub, rm_tmfile, cens, outfolder)
- % Delete rows (voxels) with all zero values in timeseries
- rowsToDelete = all(data(:, 4:end) == 0, 2);
- nozeros_rawdata = data;
- nozeros_rawdata(rowsToDelete, :) = [];
- % Remove censored time points
- if cens == 1
- rm_tmpoint = find(rm_tmfile == 0);
- nozeros_rawdata(:, rm_tmpoint + 3) = [];
- end
- % Compute Spearman correlation matrix
- n_voxels = size(nozeros_rawdata, 1);
- colmatrix = corr(nozeros_rawdata(:, 4:end)', 'Type', 'Spearman');
- % Hierarchical clustering
- X = 1 - colmatrix; % change correlation matrix to distance matrix
- X(eye(size(X)) == 1) = 0; % Set diagonal to 0
- Y_square = squareform(X);
- Z = linkage(Y_square, 'complete');
- clusters = cluster(Z, 'cutoff', 0.5, 'criterion', 'distance');
- subunit_inform = [nozeros_rawdata(:, 1:3), clusters];
- % Calculate representative time series
- clustersize = max(clusters);
- medial_series = zeros(clustersize, size(nozeros_rawdata, 2) - 3);
- cor_medial_series = zeros(clustersize, size(nozeros_rawdata, 2) - 3);
- cor_medial_coord = zeros(clustersize, 3);
- for i = 1:clustersize
- current_series = nozeros_rawdata(clusters == i, 4:end);
- current_coord = nozeros_rawdata(clusters == i, 1:3);
- % Find median series
- medial_series(i, :) = median(current_series, 1);
- % Find most correlated series
- cor_medial_value = corr(current_series', medial_series(i, :)');
- [~, max_index] = max(cor_medial_value);
- cor_medial_series(i, :) = current_series(max_index, :);
- cor_medial_coord(i, :) = current_coord(max_index, :);
- end
- % Save results
- save(fullfile(outfolder, [sub, '_', mask_name, '_cluster_coor']), 'cor_medial_coord');
- save(fullfile(outfolder, [sub, '_', mask_name, '_cluster_representts']), 'cor_medial_series');
- save(fullfile(outfolder, [sub, '_', mask_name, '_subunit_inform']), 'subunit_inform');
- save(fullfile(outfolder, [sub, '_', mask_name, '_cluster_medialts']), 'medial_series');
- end
- %%%%% calculate three parameters for decision making%%%%%
- function para_cal(sgACC_subunittime, dlpfc_subunittime, sgACC_subunitinfo, dlpfc_subunitinfo, sub, outfolder)
- sgACC_cormedial_tmseries = sgACC_subunittime;
- dlpfc_cormedial_tmseries = dlpfc_subunittime;
- % Calculate functional connectivity matrix
- subunitFC = corr(sgACC_cormedial_tmseries', dlpfc_cormedial_tmseries');
- % parameter1: correlation * size of sgACC
- subunit_sgACC_tb = tabulate(sgACC_subunitinfo(:, 4));
- subunit_sgACC_size = subunit_sgACC_tb(:, 2);
- parameter1_cor_size = -subunitFC' * subunit_sgACC_size;
- % parameter2: size of dlPFC
- subunit_dlPFC_tb = tabulate(dlpfc_subunitinfo(:, 4));
- parameter2_dlPFCsize = subunit_dlPFC_tb(:, 2);
- % parameter3: spatial concentration
- parameter3_concentration = zeros(max(dlpfc_subunitinfo(:, 4)), 1);
- for i = 1:max(dlpfc_subunitinfo(:, 4))
- clustermatrix = dlpfc_subunitinfo(dlpfc_subunitinfo(:, 4) == i, :);
- cluster_coord_matrix = clustermatrix(:, 1:3);
- if size(cluster_coord_matrix, 1) == 1
- parameter3_concentration(i) = 0;
- else
- distancematrix = pdist2(cluster_coord_matrix, cluster_coord_matrix);
- upper_triangle_values = nonzeros(triu(distancematrix, 1));
- mean_distance = mean(upper_triangle_values);
- parameter3_concentration(i) = parameter2_dlPFCsize(i) / mean_distance;
- end
- end
- % Save parameters
- save(fullfile(outfolder, [sub, '_subunitcorsize']), 'parameter1_cor_size');
- save(fullfile(outfolder, [sub, '_subunitsize']), 'parameter2_dlPFCsize');
- save(fullfile(outfolder, [sub, '_subunitconcentraion']), 'parameter3_concentration');
- end
- function decisionMaking(dlpfc_cormedial_coord, dlpfc_cormedial_tmseries, dlpfc_medial_series, dlpfc_subunit, parameter1_cor_size, parameter2_dlPFCsize, parameter3_concentration, sub, outfolder)
- parameters = [parameter1_cor_size, parameter2_dlPFCsize, parameter3_concentration];
- z_parameters = zscore(parameters);
- z_final = sum(z_parameters, 2);
- [~, max_target] = max(z_final);
- % Optimal target
- target_coord = dlpfc_cormedial_coord(max_target, :);
- target_timeseries = dlpfc_cormedial_tmseries(max_target, :);
- target_median_timeseries = dlpfc_medial_series(max_target, :);
- corr_with_median = corr(target_median_timeseries', target_timeseries');
- target_info = parameters(max_target, :);
- target_subunit = dlpfc_subunit(dlpfc_subunit(:, 4) == max_target, 1:3);
- % Save target information
- save(fullfile(outfolder, [sub, '_OptimalTarget']), 'target_coord', 'target_timeseries', 'target_median_timeseries', 'corr_with_median', 'target_info', 'target_subunit');
- end
Cole_Targeting.m at commit f96b673, no license · at the source
Overview
- The State Key Lab of Brain-Machine Intelligence, Zhejiang University, Hangzhou 310058, China
- Department of Psychology and Behavioral Sciences, Zhejiang University, Hangzhou 310058, China
- Department of Endocrinology, Children's Hospital of Zhejiang University, School of Medicine, National Clinical Research Center for Child Health, Hangzhou 310058, China
- Department of Curriculum and Learning Sciences, College of Education, Zhejiang University, Hangzhou 310007, China
- Affiliated Mental Health Center & Hangzhou Seventh People's Hospital, School of Brain Science and Brain Medicine, Zhejiang University School of Medicine, Hangzhou 310058, China
- MOE Frontiers Science Center for Brain Science & Brain-Machine Integration, Zhejiang University, Hangzhou 310058, China
- Nanhu Brain-Computer Interface Institute, Hangzhou 311121, China
Abstract
Personalized transcranial magnetic stimulation (TMS) targeting holds promise for improving depression treatment, but its clinical translation is hindered by limited open-source implementation and systematic comparisons of target reproducibility and clinical relevance. We implemented two leading personalized TMS-target generating approaches, namely refined seed-based (RSA) and hierarchical clustering (HCA) algorithms, and compared them on (1) test-retest reliability of derived targets, and (2) association of target-sgACC connectivity with depressive symptoms. Using resting-state fMRI data from healthy and depressed individuals, spatial reliability was quantified via inter-run Euclidean distances, and clinical relevance was assessed through correlations between depression severity and functional connectivity of targets with sgACC. Effects of global signal regression (GSR) were also evaluated. The results showed that RSA produced targets in more superior and postrior part of DLPFC and demonstrated significantly higher test-retest reliability than HCA (smaller inter-run Euclidean distances). Further, RSA-derived target-sgACC connectivity correlated positively with depression severity, which was absent in HCA-derived targets. In addition, GSR improved spatial reliability for RSA but not HCA. Our results indicate that RSA exhibits superior test-retest reliability and symptom association compared to HCA, yet large-scale clinical trials are warranted to determine which approach yields superior therapeutic efficacy, and open-sourced implementation may accelerate clinical adoption.
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 3 matches between paragraphs and lines of code.
HuiiiZ/PersonalizedTargeting_NI
f96b673bb904e5d8d40fe496c4712a82c384cd7f, 17 October 2025Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
3 files
- Cash_Targeting.m, MATLAB, 256 lines, 1 match
- Cole_Targeting.m, MATLAB, 198 lines, 2 matches
- README.md, Text, 3 lines
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;
- 2 scripts, each with its path and the digest of its content;
- 3 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.
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, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 3 keywords, 14 MeSH terms, 1 funder, 31 references.
Cite
This paper
Zhou, H., Bao, Y., Xu, J., Wang, D., Geng, F., Guo, W., & Hu, Y. (2026). Test-retest reliability and symptom association of personalized depression TMS targets: A comparative study of refined seed-based (RSA) and hierarchical clustering (HCA) approaches. Neurotherapeutics : the journal of the American Society for Experimental NeuroTherapeutics, 23(2), e00884. https://
BibTeX
@article{zhou2026test,
author = {Zhou, Hui and Bao, Yanmeng and Xu, Jiasheng and Wang, Dan and Geng, Fengji and Guo, Wanjun and Hu, Yuzheng},
title = {{Test-retest reliability and symptom association of personalized depression TMS targets: A comparative study of refined seed-based (RSA) and hierarchical clustering (HCA) approaches}},
journal = {Neurotherapeutics : the journal of the American Society for Experimental NeuroTherapeutics},
year = {2026},
month = mar,
volume = {23},
number = {2},
pages = {e00884},
publisher = {Elsevier},
issn = {1933-7213},
doi = {10.1016/
url = {https://
pmid = {41825227},
pmcid = {PMC12996647}
}
RIS
TY - JOUR
AU - Zhou, Hui
AU - Bao, Yanmeng
AU - Xu, Jiasheng
AU - Wang, Dan
AU - Geng, Fengji
AU - Guo, Wanjun
AU - Hu, Yuzheng
TI - Test-retest reliability and symptom association of personalized depression TMS targets: A comparative study of refined seed-based (RSA) and hierarchical clustering (HCA) approaches
T2 - Neurotherapeutics : the journal of the American Society for Experimental NeuroTherapeutics
J2 - Neurotherapeutics
PY - 2026
DA - 2026/
VL - 23
IS - 2
SP - e00884
SN - 1933-7213
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Test-retest reliability and symptom association of personalized depression TMS targets: A comparative study of refined seed-based (RSA) and hierarchical clustering (HCA) approaches",
"container-title": "Neurotherapeutics : the journal of the American Society for Experimental NeuroTherapeutics",
"author": [
{
"family": "Zhou",
"given": "Hui"
},
{
"family": "Bao",
"given": "Yanmeng"
},
{
"family": "Xu",
"given": "Jiasheng"
},
{
"family": "Wang",
"given": "Dan"
},
{
"family": "Geng",
"given": "Fengji"
},
{
"family": "Guo",
"given": "Wanjun"
},
{
"family": "Hu",
"given": "Yuzheng"
}
],
"container-title-short":
"volume": "23",
"issue": "2",
"page": "e00884",
"DOI": "10.1016/
"PMID": "41825227",
"PMCID": "PMC12996647",
"ISSN": "1933-7213",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
12
]
]
}
}
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.1222 [code]
- Network-based near-scalp personalized brain stimulation targets.Journal: Imaging neuroscience (Cambridge, Mass.)In common: AFNI, Statistics and Machine Learning Toolbox, other, 8 references
- [2] doi:10.1016/j.brs.2026.103172 [code]
- Effects of personalized transcranial magnetic stimulation on social cognitive network functional connectivity in schizophrenia spectrum disorders: A double-blind, randomized, sham-controlled target engagement trial.Journal: Brain stimulationIn common: AFNI, other, 6 references
- [3] doi:10.1016/j.isci.2026.116903 [code]
- Neurobiological and behavioral relevance of intrinsic functional connectome constraints on task-evoked neural activation.Journal: iScienceIn common: AFNI, Statistics and Machine Learning Toolbox, 3 references
- [4] 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. ClinicalIn common: Statistics and Machine Learning Toolbox, other, 3 references
- [5] doi:10.1093/psyrad/kkag013 [code]
- Convergent and divergent spatial topographies of individualized brain functional networks and their developmental origins.Journal: PsychoradiologyIn common: Statistics and Machine Learning Toolbox, 4 references
- [6] doi:10.1038/s41467-026-70346-x [code]
- Multimodal evidence for hippocampal engagement and modulation by functional connectivity-guided parietal TMS.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, other, 3 references
- [7] doi:10.1038/s41467-026-73787-6 [code]
- Skin-attached bioadhesive patch enabling ultrasound deep brain stimulation and real-time electrophysiological monitoring for REM sleep enhancement.Journal: Nature communicationsIn common: AFNI, Statistics and Machine Learning Toolbox, other, clinical / translational, 1 reference
- [8] doi:10.1002/advs.202523009 [code]
- Personalized Network-Guided Neuromodulation Enhances Human Working Memory.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: Statistics and Machine Learning Toolbox, other, 2 references
- [9] doi:10.1038/s41380-026-03560-0
- Optimized multichannel 4 mA vs conventional transcranial direct current stimulation for major depressive disorder: A randomized sham-controlled trial.Journal: Molecular psychiatryIn common: depression, other, clinical / translational, 2 references
- [10] doi:10.1159/000552942 [code]
- How Standardized Is Transcranial Magnetic Stimulation Treatment for Depression? Large-Cohort Modeling Reveals Systematic Dosimetric Variability.Journal: Psychotherapy and psychosomaticsIn common: depression, other, clinical / translational, 2 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.
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, 2 scripts, and 3 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:2cf60f6303c51be3…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
