Multimodal imaging-based targeting approach for network-level brain stimulation.
The 4 matches
- [1] § Materials and methods › Statistical analysis › Confound time series removal ↔ scripts/denoising_pipeline.m, lines 1–62 · score 0.73 · denoising pipeline, fMRIPrep, preprocessing, confound
- [2] § Materials and methods › Statistical analysis › Preprocessing ↔ scripts/denoising_pipeline.m, lines 1–62 · score 0.72 · MNI152NLin6Asym, fMRIPrep, pipeline, preprocessing, spaces
- [3] § Materials and methods › Statistical analysis › Spatial overlap analysis ↔ scripts/spatial_overlap_analysis.py, lines 1–23 · score 0.57 · Pearson correlation, connectivity maps, coefficient, Dice, activation, overlap
- [4] § Materials and methods › Statistical analysis › Task-based fMRI analysis ↔ scripts/denoising_pipeline.m, lines 354–408 · score 0.56 · design matrix, GLMs, regressors, models, motion, error
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 · 574 lines · 21 KB · MIT · 3 matches
- % DENOISING_PIPELINE.M
- % Main script for resting-state fMRI denoising using CONN toolbox.
- % Input: Path to pre-processed data with fMRIPrep
- % Output: Denoised volumes in CONN's results folder.
- % Reference: Wang et al. (2024)
- % Author: Your Name
- %Author Alireza Shahbabaie and Filip Niemann
- % prepare data.
- % data must be in BIDS format
- % use unziped version of GM, WM and CSF masks conducted by fmriprep during
- % fresh start( no variables and values)in MATLAB
- clear
- clc
- %setpaths of CONN and SPM
- addpath /usr/local/MATLAB/MATLAB_TOOLBOX/conn_la
- addpath /usr/local/MATLAB/MATLAB_TOOLBOX/spm12
- % 1. Project name (fixed)
- Project = 'MeMoSLAP';
- % 2. Define root paths (user must customize these)
- % - Replace with relative paths or variables that auto-detect location
- repo_root = fileparts(mfilename('fullpath')); % Auto-detects script location
- % Default BIDS/derivatives structure (relative to repo root)
- root_fmriprep = fullfile(repo_root, 'derivatives', 'fMRIPrep');
- root_conn = fullfile(repo_root, 'derivatives', 'Conn_script_based');
- % 3. Mask paths (store masks in repo's /masks/ folder)
- mask_dir = fullfile(repo_root, 'masks');
- lvifg_mask_path = fullfile(mask_dir, 'resampled_res-2_lvIFG_seed_6mm.nii');
- rotc_mask_path = fullfile(mask_dir, 'resampled_rOTC_res-02.nii');
- hippo_mask_path = fullfile(mask_dir, 'resampled_hippocampus_4mm_mask_res-02.nii');
- % 4. Filename filters (shared across users)
- struct_filter_name = '_acq-mprage_space-MNI152NLin6Asym*_desc-preproc_T1w.nii.gz';
- func_filter_name = '_task-resting_dir-AP_space-MNI152NLin6Asym*_desc-preproc_bold.nii.gz';
- timeseries_filter_name = '_task-resting_dir-AP_merg_desc-confounds_timeseries.tsv';
- GM_filter_name = '_acq-mprage_space-MNI152NLin6Asym*_label-GM_probseg.nii';
- WM_filter_name = '_acq-mprage_space-MNI152NLin6Asym*_label-WM_probseg.nii';
- CSF_filter_name = '_acq-mprage_space-MNI152NLin6Asym*_label-CSF_probseg.nii';
- % 5. Session naming (user may need to modify)
- ses_1 = 'ses-1'; % Change to 'ses-01' if needed
- ses_2 ='ses-2'; % Change to 'ses-01' if needed
- ses_1_str ='ses_1'; % Change to 'ses_01' if needed
- ses_2_str ='ses_2';% Change too 'ses-02' if needed
- % ==============================================
- batch.Setup.RT = 1;
- % (Rest of your pipeline code here)
- % Verify paths exist before proceeding
- if ~exist(root_fmriprep, 'dir')
- error('fmriprep directory not found: %s', root_fmriprep);
- end
- if ~exist(root_conn, 'dir')
- mkdir(root_conn); % Create CONN directory if needed
- end
- batch.filename = fullfile(root_conn,'conn_rsfmri_denoising.mat');
- %% Get files
- % get all subjects in fmriprep folder, subjects are saved in list_sub.name
- list_sub = dir(fullfile(root_fmriprep,'sub-*'));
- list_sub = list_sub([list_sub.isdir]); % Only folders
- %for debugging use only one subject
- %list_sub=list_sub(1:2); %uncomment for debugging
- % get anatomical
- list_anat = dir(fullfile(root_fmriprep,'**',['sub*',struct_filter_name]));
- anat_path = fullfile({list_anat.folder},{list_anat.name});
- anat_path = sort(anat_path);
- %anat_path = anat_path(1:2); %uncomment for debugging
- % get gm mask
- gm_mask = dir(fullfile(root_fmriprep,'**',['sub*',GM_filter_name]));
- gm_path = fullfile({gm_mask.folder},{gm_mask.name});
- gm_path = sort(gm_path);
- %gm_path = gm_path(1:2); %uncomment for debugging
- % get gm mask
- wm_mask = dir(fullfile(root_fmriprep,'**',['sub*',WM_filter_name]));
- wm_path = fullfile({wm_mask.folder},{wm_mask.name});
- wm_path = sort(wm_path);
- %wm_path = wm_path(1:2); %uncomment for debugging
- % get csf mask
- csf_mask = dir(fullfile(root_fmriprep,'**',['sub*',CSF_filter_name]));
- csf_path = fullfile({csf_mask.folder},{csf_mask.name});
- csf_path = sort(csf_path);
- %csf_path = csf_path(1:2); %uncomment for debugging
- % get functional
- list_func_1 = dir(fullfile(root_fmriprep,'**',['sub*',ses_1,'*',func_filter_name]));
- list_func_2 = dir(fullfile(root_fmriprep,'**',['sub*',ses_2,'*',func_filter_name]));
- list_func = [list_func_1; list_func_2];
- func_path = fullfile({list_func.folder},{list_func.name});
- func_path = sort(func_path);
- %func_path = func_path(1:4); %uncomment for debugging
- % get timeseries
- list_timeseries = dir(fullfile(root_fmriprep,'**',['sub*',timeseries_filter_name]));
- cov_path = fullfile({list_timeseries.folder},{list_timeseries.name});
- cov_path = sort(cov_path);
- %cov_path = cov_path(1:4); %uncomment for debugging
- %% set basic parameters for batch and check if data are complete
- % Basic parameters
- batch.Setup.isnew = 1;
- batch.Setup.nsubjects = numel(list_sub);
- batch.Setup.nsessions = 2;
- batch.Setup.overwrite =1;
- batch.Setup.analysis =1;
- % number anatomical image verification
- if ~isequal(numel(list_sub),numel(anat_path))
- disp('anatomical images does not match subject count')
- end
- % number gm image verification
- if ~isequal(numel(list_sub),numel(gm_path))
- disp('grey matter images does not match subject count')
- end
- % number wm image verification
- if ~isequal(numel(list_sub),numel(wm_path))
- disp('white matter images does not match subject count')
- end
- % number csf image verification
- if ~isequal(numel(list_sub),numel(csf_path))
- disp('csf images does not match subject count')
- end
- % number functional image verification
- if ~isequal(numel(anat_path)*batch.Setup.nsessions,numel(func_path))
- disp('functional images does not match anatomical image count')
- end
- % number covariate file verification
- if ~isequal(numel(cov_path),numel(func_path))
- disp('timeseries images does not match functional image count')
- end
- % session verification
- for sub_idx = 1:numel(list_sub)
- subject_id = list_sub(sub_idx).name;
- ses_count = sum(contains(func_path, subject_id));
- if ses_count ~= 2
- warning('Subject %s has %d sessions (expected 2)', subject_id, ses_count);
- end
- end
- %% Initialize batch struct
- batch.Setup.structurals = cell(1, numel(list_sub));
- batch.Setup.functionals = cell(1, numel(list_sub));
- % Initialize covariates
- covariate_names = {'Global', 'csf', 'Motion','white_matter'};
- % Initialize covariates files structure properly
- batch.Setup.covariates.files = cell(1, numel(covariate_names));
- for c = 1:numel(covariate_names)
- batch.Setup.covariates.files{c} = cell(1, numel(list_sub));
- end
- % get timeseries and create temporary csv files
- % Create temporary directory for filtered CSV files
- temp_dir = fullfile(root_conn, 'temp_covariates');
- if ~exist(temp_dir, 'dir')
- mkdir(temp_dir);
- end
- %% set basic parameters for batch and check if data are complete
- % Basic parameters
- batch.Setup.isnew = 1;
- batch.Setup.nsubjects = numel(list_sub);
- batch.Setup.nsessions = 2;
- batch.Setup.overwrite =1;
- % number anatomical image verification
- if ~isequal(numel(list_sub),numel(anat_path))
- disp('anatomical images does not match subject count')
- end
- % number gm image verification
- if ~isequal(numel(list_sub),numel(gm_path))
- disp('grey matter images does not match subject count')
- end
- % number wm image verification
- if ~isequal(numel(list_sub),numel(wm_path))
- disp('white matter images does not match subject count')
- end
- % number csf image verification
- if ~isequal(numel(list_sub),numel(csf_path))
- disp('csf images does not match subject count')
- end
- % number functional image verification
- if ~isequal(numel(anat_path)*batch.Setup.nsessions,numel(func_path))
- disp('functional images does not match anatomical image count')
- end
- % number covariate file verification
- if ~isequal(numel(cov_path),numel(func_path))
- disp('timeseries images does not match functional image count')
- end
- % session verification
- for sub_idx = 1:numel(list_sub)
- subject_id = list_sub(sub_idx).name;
- ses_count = sum(contains(func_path, subject_id));
- if ses_count ~= 2
- warning('Subject %s has %d sessions (expected 2)', subject_id, ses_count);
- end
- end
- %% Process each subject
- for sub_idx = 1:numel(list_sub)
- subject_id = list_sub(sub_idx).name;
- % filter path that contain subject
- % Anatomical path
- idx_anat = contains(anat_path,subject_id);
- anat_path_subj = anat_path(idx_anat);
- % GM path
- idx_gm = contains(gm_path,subject_id);
- gm_path_subj = gm_path(idx_gm);
- % WM path
- idx_wm = contains(wm_path,subject_id);
- wm_path_subj = wm_path(idx_wm);
- % CSF path
- idx_csf = contains(csf_path,subject_id);
- csf_path_subj = csf_path(idx_csf);
- % functional path
- idx_func_ses1 = contains(func_path,subject_id) & contains(func_path,ses_1);
- func_path_subj_ses_1 = func_path(idx_func_ses1);
- idx_func_ses2 = contains(func_path,subject_id) & contains(func_path,ses_2);
- func_path_subj_ses_2 = func_path(idx_func_ses2);
- % covariate path
- idx_cov = contains(cov_path,subject_id);
- cov_path_subj = cov_path(idx_cov);
- % Get indices from timeseries.tsv file and create filtered CSV files
- [motion_indices, motion_csv_files] = get_indices_and_write_csv(Project, cov_path_subj, subject_id, "motion", temp_dir);
- [csf_indices, csf_csv_files] = get_indices_and_write_csv(Project, cov_path_subj, subject_id, "csf", temp_dir);
- [global_indices, global_csv_files] = get_indices_and_write_csv(Project, cov_path_subj, subject_id, "global", temp_dir);
- [wm_indices, wm_csv_files] = get_indices_and_write_csv(Project, cov_path_subj, subject_id,'white_matter', temp_dir);
- %% batch.Setup
- % Structural file
- batch.Setup.structurals{sub_idx} = {anat_path_subj};
- % Functional files
- batch.Setup.functionals{sub_idx} = { ...
- func_path_subj_ses_1, ...
- func_path_subj_ses_2 ...
- };
- % Covariates setup - now using the filtered CSV files
- batch.Setup.covariates.names = {'Global', 'csf', 'Motion','white_matter'};
- %% Process each subject - corrected covariates part
- % Corrected covariates files assignment
- for nses = 1:numel(global_csv_files)
- batch.Setup.covariates.files{1}{sub_idx}{nses} = global_csv_files{nses}; % Global
- batch.Setup.covariates.files{2}{sub_idx}{nses} = csf_csv_files{nses}; % CSF
- batch.Setup.covariates.files{3}{sub_idx}{nses} = motion_csv_files{nses}; % Motion
- batch.Setup.covariates.files{4}{sub_idx}{nses} = wm_csv_files{nses}; % WM
- end
- % Indices - now simple since we have 1 column per CSV
- batch.Setup.covariates.indices = { ...
- {1}, ... % Global (only 1 column in CSV)
- {1}, ... % CSF (only 1 column in CSV)
- {1:numel(motion_indices.ses_1.indices)}, ... % Motion (multiple columns)
- {1} ... % white matter (onley 1 column in csv
- };
- % Dimensions
- batch.Setup.covariates.dimensions = { ...
- 1, ... % Global
- 1, ... % CSF
- numel(motion_indices.ses_1.indices), ... % Motion
- 1, ... % WM
- };
- % ROIs setup
- %% ROIs setup (updated)
- batch.Setup.rois.names = {'Grey Matter', 'White Matter', 'CSF', 'IFG', 'OTC','Hippocampus'};
- batch.Setup.rois.files{1}{sub_idx} = gm_path_subj; % GM
- batch.Setup.rois.files{2}{sub_idx} = wm_path_subj; % WM
- batch.Setup.rois.files{3}{sub_idx} = csf_path_subj; % CSF
- batch.Setup.rois.files{4}{sub_idx} = lvifg_mask_path; % IFG (same file for all subjects)
- batch.Setup.rois.files{5}{sub_idx} = rotc_mask_path; % OTC (same file for all subjects)
- batch.Setup.rois.files{6}{sub_idx} = hippo_mask_path; % Hippocampus (same file for all subjects)
- batch.Setup.rois.multiplelabels = 0;
- batch.Setup.rois.dimensions = {1, 1, 1, 1, 1, 1};
- % Condition
- %% Condition setup - corrected version
- batch.Setup.conditions.names = {'rest'};
- for nsub = 1:numel(list_sub)
- for nses = 1:batch.Setup.nsessions
- % Get duration from this subject's data
- if nses == 1
- ses_field = 'ses_1';
- else
- ses_field = 'ses_02';
- end
- % Initialize onsets and durations for all subjects/sessions
- if nsub == 1 && nses == 1
- batch.Setup.conditions.onsets{1} = cell(1, numel(list_sub));
- batch.Setup.conditions.durations{1} = cell(1, numel(list_sub));
- end
- % Set onset to 0 and calculate duration based on RT and number of volumes
- batch.Setup.conditions.onsets{1}{nsub}{nses} = 0;
- % Use motion indices to get number of volumes (more reliable than CSF)
- if exist('motion_indices', 'var') && isfield(motion_indices, ses_field)
- batch.Setup.conditions.durations{1}{nsub}{nses} = batch.Setup.RT * motion_indices.(ses_field).table_length;
- else
- % Fallback to a default value if motion indices not available
- batch.Setup.conditions.durations{1}{nsub}{nses} = Inf; % or use a known value
- end
- end
- end
- end
- %% batch.Denoising
- % Debug: Verify denoising settings
- %Denoising steps for Debugging
- %Step 1/7: Expanding conditions - Sets up experimental conditions
- %Step 2/7: Importing conditions/covariates - Loads your regressors
- %Step 3/7: Updating Denoising variables (where you're stuck) - Prepares denoising parameters
- %Step 4/7: Creating Denoising design matrices - Builds the GLM model
- %Step 5/7: Estimating Denoising parameters (conn_process_5) - Computes the actual denoising
- %Step 6/7: Applying Denoising - Removes noise from data
- %Step 7/7: Saving results - Stores cleaned data
- % if you have problesm in Step 5/7 open conn_process for debugging (line
- % 1096)
- % this means ROIs where not created
- % line 657 Creates ROI_Subject###_Session###.mat files (activation timecourses for each roi)
- %this means DATA_Subject was not created
- % open conn_process
- % Denoising
- batch.Denoising.done = 1;
- batch.Denoising.overwrite = 1;
- batch.Denoising.filter = [0.01 Inf];
- batch.Denoising.detrending = 1;
- batch.Denoising.confounds.names = batch.Setup.covariates.names;
- %batch.Denoising.confounds.dimensions = batch.Setup.covariates.dimensions;
- batch.Denoising.confounds.dimensions = {1, 1, numel(motion_indices.ses_1.indices),1};
- % change derivative and power if needed
- batch.Denoising.confounds.deriv = {0, 0, 1, 0};
- batch.Denoising.confounds.power = {0, 0, 2, 0};
- %check if motion dimension match
- motion_dims_setup = batch.Setup.covariates.dimensions{3};
- motion_dims_denoise = batch.Denoising.confounds.dimensions{3};
- if ~isequal(motion_dims_setup, motion_dims_denoise)
- error('Motion dimensions mismatch! Setup: %d vs Denoising: %d',...
- motion_dims_setup, motion_dims_denoise);
- end
- disp('--- Denoising Configuration ---');
- disp(batch.Denoising)
- disp('Confounds:');
- disp(batch.Denoising.confounds)
- % Check if denoising is actually enabled
- if ~batch.Denoising.done
- warning('Denoising is set to done=0! Changing to done=1');
- batch.Denoising.done = 1;
- end
- %Verify filter settings
- if isempty(batch.Denoising.filter) || ~all(isfinite(batch.Denoising.filter))
- warning('Invalid filter settings! Using default [0.01 Inf]');
- batch.Denoising.filter = [0.01 Inf];
- end
- %% because incorrect covariate specification is the most common error for silent failure add verification code
- % Debug: Verify covariates
- disp('--- Covariates Implementation ---');
- for c = 1:numel(batch.Denoising.confounds.names)
- fprintf('Covariate %d (%s):\n', c, batch.Denoising.confounds.names{c});
- fprintf('Dimensions: %s\n', mat2str(batch.Denoising.confounds.dimensions{c}));
- fprintf('Derivatives: %d\n', batch.Denoising.confounds.deriv{c});
- fprintf('Powers: %d\n', batch.Denoising.confounds.power{c});
- % Verify files exist
- for s = 1:min(3,numel(list_sub)) % Check first 3 subjects
- if numel(batch.Setup.covariates.files) >= c && ...
- numel(batch.Setup.covariates.files{c}) >= s
- fprintf('Subject %d files exist: %d\n', s, ...
- exist(batch.Setup.covariates.files{c}{s}{1}, 'file'));
- end
- end
- end
- %% batch.Analysis
- %% Analysis
- % Analysis setup to run ALL steps
- batch.Analysis.done = 1;
- batch.Analysis.overwrite = 1;
- batch.Analysis.measure = 1; % Correlation
- batch.Analysis.type = 'all'; % Changed from 3 to 'ROI-to-ROI' for clarity
- batch.Analysis.sources = {'IFG', 'OTC','Hippocampus'}; % Seed ROI % Empty for ROI-to-ROI analysis
- batch.Analysis.ROI_files = {'GM', 'WM', 'CSF'}; % All ROIs for ROI-to-ROI
- % ADD THESE TWO LINES RIGHT HERE:
- batch.Analysis.save = 1; % Saves individual subject results
- batch.Analysis.keep = 1; % Keeps temporary analysis files
- % Set up the GUI interaction option for ROI-to-ROI analysis
- batch.Analysis.gui = 1; % Enable GUI interaction
- batch.Analysis.gui_prompt = 1; % Ask user on each step
- batch.Analysis.name = 'SBC_MeMoSLAP_rest'; % Name for this analysis
- % Additional analysis parameters
- batch.Analysis.weight = 2; % Fisher-transformed correlation coefficients
- batch.Analysis.modulation = 0; % No modulation
- batch.Analysis.symmetric = 1; % Symmetric matrices
- batch.Analysis.scale = 1; % Scale to correlation units
- %% Save and run
- batch_file = fullfile(root_conn,'conn_rsfmri_denoising.mat');
- save(batch_file, 'batch');
- % Display for debugging:
- disp('--- Analysis Configuration ---');
- disp(['Analysis type: ', batch.Analysis.type]);
- disp(['GUI enabled: ', num2str(batch.Analysis.gui)]);
- disp(['GUI prompts: ', num2str(batch.Analysis.gui_prompt)]);
- disp(['ROIs included: ', strjoin(batch.Analysis.ROI_files, ', ')]);
- % First run setup steps (0-5)
- setup_batch = batch;
- setup_batch.Analysis.done = 0; % Don't run analysis yet
- conn_batch(setup_batch);
- % Then run the ROI-to-ROI analysis with GUI interaction
- analysis_batch = batch;
- analysis_batch.Setup.done = 1; % Mark setup as already done
- analysis_batch.Denoising.done = 1; % Mark denoising as already done
- conn_batch(analysis_batch);
- %% Clean up temporary files
- % Move cleanup to the very end and add verification
- try
- conn_batch(batch,'setup');
- % Verify processing completed successfully before cleanup
- % csv file path is saved in batch so don't delete
- %if exist(fullfile(root_conn,'conn_rsfmri.mat'), 'file')
- % rmdir(temp_dir, 's');
- %end
- catch ME
- warning('Keeping temp files for debugging due to error');
- end
- %% define functions
- function [indices, csv_files] = get_indices_and_write_csv(Project, cov_path, subject_id, covariate_column, temp_dir)
- if strcmp(Project,'VerFlu')
- sessions = {'ses-01', 'ses-02'};
- elseif strcmp(Project,'MeMoSLAP')
- sessions = {'ses-1', 'ses-2'};
- end
- indices = struct();
- csv_files = cell(1, numel(sessions));
- for i = 1:numel(sessions)
- ses = sessions{i};
- ses_field = strrep(ses, '-', '_');
- idx = contains(cov_path,ses);
- confound_file = cov_path(idx);
- if exist(confound_file{1}, 'file')
- T = readtable(confound_file{1}, 'FileType', 'text', 'Delimiter', '\t');
- colnames = T.Properties.VariableNames;
- % Determine which columns to select
- if strcmp(covariate_column, 'motion')
- is_cov = startsWith(colnames, 'trans') | startsWith(colnames, 'rot');
- contains_deriv = contains(colnames, 'derivative') | contains(colnames, 'power') | contains(colnames, 'wm');
- select_cols = is_cov & ~contains_deriv;
- else
- is_cov = startsWith(colnames, covariate_column);
- contains_deriv = contains(colnames, 'derivative') | contains(colnames, 'power') | contains(colnames, 'wm');
- select_cols = is_cov & ~contains_deriv;
- end
- idx = find(select_cols);
- % Create filtered table with only selected columns
- filtered_table = T(:, idx);
- % Create CSV filename
- csv_filename = fullfile(temp_dir, sprintf('%s_%s_%s.csv', subject_id, ses, covariate_column));
- % Write to CSV
- writetable(filtered_table, csv_filename);
- fprintf('Created filtered CSV: %s\n', csv_filename);
- % Store CSV path for CONN
- csv_files{i} = csv_filename;
- % Check for NaN/Inf
- nan_or_inf = false(1, numel(idx));
- for j = 1:numel(idx)
- col_data = table2array(T(:, idx(j)));
- nan_or_inf(j) = any(isnan(col_data)) || any(isinf(col_data));
- end
- if any(nan_or_inf)
- fprintf('Session %s: WARNING: NaN or Inf detected in columns: %s\n', ...
- ses, strjoin(colnames(idx(nan_or_inf)), ', '));
- end
- % Get table length from CSF column if available
- if ismember('csf', colnames)
- table_length = height(T);
- else
- table_length = NaN;
- end
- % Store indices
- indices.(ses_field).indices = idx;
- indices.(ses_field).names = colnames(idx);
- indices.(ses_field).nan_or_inf = nan_or_inf;
- indices.(ses_field).table_length = table_length;
- else
- warning('File not found: %s', confound_file);
- indices.(ses_field).indices = [];
- indices.(ses_field).names = {};
- indices.(ses_field).nan_or_inf = [];
- indices.(ses_field).table_length = NaN;
- csv_files{i} = '';
- end
- end
- end
denoising_pipeline.m at commit 71fdc65, under MIT · at the source
Overview
- Department of Neurology, University Medicine Greifswald, Greifswald, Germany
- German Center for Neurodegenerative Diseases (DZNE Site Greifswald), Greifswald, Germany
Abstract
Introduction: Neural network effects of transcranial direct current stimulation (tDCS) are poorly understood. Here, we introduce a prospective, empirically informed, multimodal functional magnetic resonance imaging (fMRI) framework for guiding target selection and hypothesis-based analysis in future focal tDCS-fMRI studies.
Methods: We illustrate our approach by using data of 37 healthy individuals (19 females; mean age ± SD = 25.8 ± 5.9) recruited from two tDCS-fMRI studies that were acquired at the same scanner and with placebo-tDCS. Participants completed two resting-state (RS) sessions and two task-fMRI sessions (object-location memory, OLM, or associative picture-pseudoword learning, APPL, experiments). Seed-based RS analysis identified functional networks originating from target regions for focal tDCS (right occipito-temporal cortex, rOTC; left ventral IFG, lvIFG) and established their test-retest reliability (TRR), using intraclass correlation coefficients (ICC). Dice coefficients quantified overlap between seeded RS networks and task-evoked activity to identify task-active regions potentially affected by downstream network effects from the target regions.
Results: Seed-based analyses identified highly reliable ventral visual-limbic (rOTC) and language-related networks (lvIFG), with 72-77% of voxels showing good-to-excellent TRR (ICC ≥ 0.75). Only a subset of network voxels identified by the RS analyses overlapped with activity elicited by the experimental paradigms (ranging from 7.5-55%), with larger correspondence for the OLM (Dice: 0.249-0.349; APPL 0.065-0.106). Therefore, the degree of potential tDCS network effects varied substantially depending on the target region, the extent of its functional network and task-specific activity patterns. Degree of correspondence was further mediated by the selected contrasts-of-interest in the task-based analyses, with more conservative control conditions resulting in reduced overlap.
Conclusion: In sum, we established a principled multimodal fMRI framework bridging a critical gap in neuromodulation research. By integrating reliable intrinsic connectivity maps with task-evoked activity patterns, we provide a method to prospectively identify network-level targets for focal brain stimulation and generate hypotheses for tDCS-fMRI analyses. This approach shifts the rationale from stimulating isolated brain regions to strategically targeting key nodes within a predefined functional pathway.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.
ShahAliR/memoslap-denoising-pipeline
71fdc65075ca839a95213c109532702584b9b2ff, 8 August 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
3 files
- scripts/
denoising_pipeline.m , MATLAB, 574 lines, 3 matches - LICENSE, License, 21 lines
- README.md, Text, 26 lines
ShahAliR/NetworkOverlap-Task-RS-fMRI
842bca5478281657c8daad79bc9df09e492ff8bb, 23 January 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
3 files
- notebooks/
01_spatial_overlap_demo. , Jupyter, 236 linesipynb - scripts/
spatial_overlap_analysis , Python, 358 lines, 1 match.py - README.md, Text, 60 lines
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:
- 2 repositories 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;
- 4 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 availability statement
The study was pre-registered with the Open Science Framework (OSF), and the protocol can be accessed through OSF Registries (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 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 7 authors, 7 keywords, 75 references, 1 RRID.
Cite
This paper
Shahbabaie, A., Abdelmotaleb, M., Kocataş, H., Niemann, F., Antonenko, D., Flöel, A., & Meinzer, M. (2026). Multimodal imaging-based targeting approach for network-level brain stimulation. Frontiers in neuroscience, 20, 1803897. https://
BibTeX
@article{shahbabaie2026m
author = {Shahbabaie, Alireza and Abdelmotaleb, Mohamed and Kocataş, Harun and Niemann, Filip and Antonenko, Daria and Flöel, Agnes and Meinzer, Marcus},
title = {{Multimodal imaging-based targeting approach for network-level brain stimulation}},
journal = {Frontiers in neuroscience},
year = {2026},
month = may,
volume = {20},
pages = {1803897},
publisher = {Frontiers Media SA},
issn = {1662-4548},
doi = {10.3389/
url = {https://
pmid = {42292341},
pmcid = {PMC13260067}
}
RIS
TY - JOUR
AU - Shahbabaie, Alireza
AU - Abdelmotaleb, Mohamed
AU - Kocataş, Harun
AU - Niemann, Filip
AU - Antonenko, Daria
AU - Flöel, Agnes
AU - Meinzer, Marcus
TI - Multimodal imaging-based targeting approach for network-level brain stimulation
T2 - Frontiers in neuroscience
J2 - Front Neurosci
PY - 2026
DA - 2026/
VL - 20
SP - 1803897
SN - 1662-4548
PB - Frontiers Media SA
DO - 10.3389/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3389/
"type": "article-journal",
"title": "Multimodal imaging-based targeting approach for network-level brain stimulation",
"container-title": "Frontiers in neuroscience",
"author": [
{
"family": "Shahbabaie",
"given": "Alireza"
},
{
"family": "Abdelmotaleb",
"given": "Mohamed"
},
{
"family": "Kocataş",
"given": "Harun"
},
{
"family": "Niemann",
"given": "Filip"
},
{
"family": "Antonenko",
"given": "Daria"
},
{
"family": "Flöel",
"given": "Agnes"
},
{
"family": "Meinzer",
"given": "Marcus"
}
],
"container-title-short":
"volume": "20",
"page": "1803897",
"DOI": "10.3389/
"PMID": "42292341",
"PMCID": "PMC13260067",
"ISSN": "1662-4548",
"publisher": "Frontiers Media SA",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
29
]
]
}
}
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: Nilearn, NiBabel, SciPy, 2 other tools, other, systems, 3 references
- [2] doi:10.1162/imag.a.1283 [code]
- The language network responds robustly to sentences across tasks.Journal: Imaging neuroscience (Cambridge, Mass.)In common: CONN, Nilearn, SciPy, 2 other tools, fMRI, 2 references
- [3] doi:10.1016/j.neuron.2026.04.011 [code]
- Precision fMRI reveals densely interdigitated network patches with conserved motifs in the lateral prefrontal cortex.Journal: NeuronIn common: Nilearn, NiBabel, SciPy, 2 other tools, fMRI, systems, 3 references
- [4] doi:10.1371/journal.pbio.3003684 [code]
- The retrieval of previously learned motor memories is facilitated by the reinstatement of default mode network manifold structures.Journal: PLoS biologyIn common: Nilearn, NiBabel, SciPy, 2 other tools, fMRI, 4 references
- [5] doi:10.1038/s41531-026-01354-3 [code]
- Neuromodulation-induced normalization of cortical metastable dynamics signatures in Parkinson's disease.Journal: NPJ Parkinson's diseaseIn common: Nilearn, NiBabel, SciPy, 2 other tools, 4 references
- [6] doi:10.1186/s12916-026-04978-7 [code]
- Mapping shared and specific cortical after-effects of repetitive TMS on brain function.Journal: BMC medicineIn common: Nilearn, NiBabel, SciPy, 2 other tools, other, 2 references
- [7] doi:10.1162/imag.a.1256 [code]
- Gamer in the scanner: Event-related analysis of fMRI activity during retro videogame play guided by automated annotations of game content.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Nilearn, NiBabel, SciPy, 2 other tools, fMRI, 3 references
- [8] doi:10.1038/s41467-026-71428-6 [code]
- Binding items to contexts through conjunctive neural representations with the method of loci.Journal: Nature communicationsIn common: Nilearn, NiBabel, SciPy, 2 other tools, systems, 3 references
- [9] doi:10.21203/rs.3.rs-9326213/v1 [code]
- Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brainJournal: Research Square (preprint)In common: Nilearn, NiBabel, SciPy, 2 other tools, fMRI, 2 references
- [10] doi:10.64898/2026.03.09.710558 [code]
- Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brainJournal: bioRxiv (preprint)In common: Nilearn, NiBabel, SciPy, 2 other tools, fMRI, 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: 2 repositories of the authors' code, each at its verified commit and with its license, 3 scripts, and 4 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:70ac77a8484af088…
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.
