OSCR

The impact of Independent Component Analysis on TMS-evoked potentials: a within-subject comparison across motor and prefrontal areas.

Code ↔ Paper

2 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.

2 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 2 matches
  1. [1] § CRediT Authorship contribution statement ↔ preprocessing_1.m, lines 1 to 7 · score 0.55 · Timo van Hattem, Angremont, Emile · block oscr:b:7Q8J27QWECYKZ-S · Report a mismatch
  2. [2] § CRediT Authorship contribution statement ↔ preprocessing_2.m, lines 1 to 6 · score 0.55 · Timo van Hattem, Angremont, Emile · block oscr:b:9VYATHF4W3ANT-C · Report a mismatch

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

MATLAB · 125 lines · 5.8 KB · no license · 1 match

  1. % PREPROCESSING TMS-EEG DATA
  2. %
  3. % Timo van Hattem
  4. % Updated: 13-3-2023
  5. % Adjusted by Emile d'Angremont, 13-9-2023
  6. cd('/scratch/anw/edangremont/TMS-EEG/code/')
  7. %% Clean workspace
  8. clear
  9. close all
  10. clc
  11. %% Set path
  12. %addpath('/data/anw/anw-gold/NP/projects/data_TIPICCO/TMS_EEG/tvh/eeglab2023.0/');
  13. %addpath(genpath('/data/anw/anw-gold/NP/projects/data_TIPICCO/TMS_EEG/tvh/eeglab2023.0/FastICA_25/'));
  14. addpath(genpath('/scratch/anw/edangremont/TMS-EEG/data/'));
  15. addpath('/scratch/anw/edangremont/TMS-EEG/code/');
  16. addpath('/scratch/anw/edangremont/TMS-EEG/code/eeglab2023.0');
  17. % addpath(genpath('/scratch/anw/edangremont/TMS-EEG/code/eeglab2023.0/FastICA_25/'));
  18. fprintf('Paths added!\n')
  19. %% Initialize variables
  20. ppn = 'TC923'; %input subject number % make gui out of this
  21. br = 'rDLPFC'; %input brain region of interest
  22. % set input and output paths
  23. DATAIN = ['/scratch/anw/edangremont/TMS-EEG/data/raw/', ppn, '/', br, '/'];
  24. %DATAIN = ['/scratch/anw/tvanhattem/analysis_tvh/TMSEEG_data/convert/', ppn, '/', br, '/'];
  25. DATAOUT = '/scratch/anw/edangremont/TMS-EEG/data/processed/';
  26. %% Import data
  27. eeglab;
  28. EEG = loadcurry([DATAIN, dir(fullfile(DATAIN, '*.cdt')).name], 'KeepTriggerChannel', 'False', 'CurryLocations', 'False');
  29. %EEG = pop_biosig(); %for loading convert file
  30. fprintf('N_events start processing: %d\n', length(EEG.event)); % manually add to excel file?
  31. %% Load channel locations
  32. EEG = pop_chanedit(EEG,'lookup','/scratch/anw/edangremont/TMS-EEG/code/eeglab2023.0/plugins/dipfit/standard_BEM/elec/standard_1020.elc');
  33. %% Remove unused electrodes
  34. EEG = pop_select(EEG, 'nochannel', 63:68); % these are not used
  35. EEG.allchan = EEG.chanlocs;
  36. %% Automated removal bad electrodes step 1
  37. EEG = pop_clean_rawdata(EEG, 'FlatlineCriterion',5,'Highpass', 'off','ChannelCriterion',0.8,...
  38. 'LineNoiseCriterion',4,'BurstCriterion','off','WindowCriterion','off'); % should these parameters be saved somewhere?
  39. % EEG.rejchan = find(~ismember([EEG.allchan.urchan], [EEG.chanlocs.urchan]));
  40. rejchan_one = setdiff({EEG.allchan.labels}, {EEG.chanlocs.labels}); % I think this is superior to the previous line
  41. fprintf('Rejected channel step 1: %s\n',rejchan_one{:}); % manually copy into excel file?
  42. %% Automated removal bad electrodes step 2
  43. EEG = pop_rejchan(EEG, 'elec', 1:size(EEG.data,1), 'threshold', 4, 'norm', 'on', 'measure', 'kurt'); % same for these parameters
  44. % EEG.rejchan = find(~ismember([EEG.allchan.urchan], [EEG.chanlocs.urchan]));
  45. rejchan_two = setdiff(setdiff({EEG.allchan.labels}, {EEG.chanlocs.labels}),rejchan_one);
  46. fprintf('Rejected channel step 2: %s\n',rejchan_two{:}); % manually copy into excel file?
  47. EEG.rejchan = [rejchan_one rejchan_two];
  48. % manual rejection of electrodes should be added here
  49. %% Fix latency of events in D2 and D10 condition (from marker on conditioning pulse to marker on test pulse)
  50. EEG.oldeventlatency = [EEG.event.latency];
  51. for i = 1:size(EEG.event,2)
  52. if EEG.event(i).type == 3
  53. EEG.event(i).latency = EEG.event(i).latency + 21;
  54. EEG.urevent(i).latency = EEG.urevent(i).latency + 21;
  55. elseif EEG.event(i).type == 5
  56. EEG.event(i).latency = EEG.event(i).latency + 101;
  57. EEG.urevent(i).latency = EEG.urevent(i).latency + 101;
  58. end
  59. end
  60. %% Epoch segmentation
  61. EEG = pop_epoch(EEG, {'1', '3', '5'}, [-1.5 1.5]);
  62. %% Baseline correction
  63. EEG = pop_rmbase(EEG, [-800 -110]);
  64. %pop_eegplot(EEG,1,1,1);
  65. %% Seperate epochs on condition
  66. EEG_SP = pop_select(EEG, 'trial', find([EEG.event.type] == 1));
  67. EEG_D2 = pop_select(EEG, 'trial', find([EEG.event.type] == 3));
  68. EEG_D10 = pop_select(EEG, 'trial', find([EEG.event.type] == 5));
  69. %% Save additional information for later checks
  70. EEG_SP.rawepochs = EEG_SP.epoch;
  71. EEG_SP.rawurevents = EEG_SP.urevent;
  72. EEG_D2.rawepochs = EEG_D2.epoch;
  73. EEG_D2.rawurevents = EEG_D2.urevent;
  74. EEG_D10.rawepochs = EEG_D10.epoch;
  75. EEG_D10.rawurevents = EEG_D10.urevent;
  76. %% Manually check for true presence of TMS-pulse at given marker SP
  77. EEG_pulsecheck_SP = epoch2continuous(EEG_SP);
  78. EEG_pulsecheck_SP = tesa_findpulse(EEG_pulsecheck_SP, 'CZ', 'refract', 10, 'rate', 2e4, 'tmsLabel', 'SP'); % CZ, but PZ can be used if CZ was already filtered out
  79. EEG_SP.pulseinfo = EEG_pulsecheck_SP.event;
  80. fprintf('Is number of single pulses detected equal to %d?\n',EEG_SP.trials);
  81. % pop_eegplot(EEG_pulsecheck_SP,1,1,1);
  82. % EEG_SP = pop_select(EEG_SP, 'notrial', [44:51])
  83. %% Manually check for true presence of TMS-pulse at given marker D2
  84. EEG_pulsecheck_D2 = epoch2continuous(EEG_D2);
  85. EEG_pulsecheck_D2 = tesa_findpulse(EEG_pulsecheck_D2, 'CZ', 'refract', 2, 'rate', 2e4, 'paired', 'yes', 'ISI', 2);
  86. EEG_D2.pulseinfo = EEG_pulsecheck_D2.event;
  87. fprintf('Is number of test pulses detected equal to %d?\n',EEG_D2.trials); % dit automatiseren (latencies vergelijken en epoch verwijderen waar niet overeen)
  88. % pop_eegplot(EEG_pulsecheck_D2,1,1,1);
  89. % EEG_D2 = pop_select(EEG_D2, 'notrial', [43:44]);
  90. %% Manually check for true presence of TMS-pulse at given marker D10
  91. EEG_pulsecheck_D10 = epoch2continuous(EEG_D10);
  92. EEG_pulsecheck_D10 = tesa_findpulse(EEG_pulsecheck_D10, 'CZ', 'refract', 10, 'rate', 2e4, 'paired', 'yes', 'ISI', 10);
  93. EEG_D10.pulseinfo = EEG_pulsecheck_D10.event;
  94. fprintf('Is number of test pulses detected equal to %d?\n',EEG_D10.trials);
  95. % pop_eegplot(EEG_pulsecheck_D10,1,1,1);
  96. % EEG_D10 = pop_select(EEG_D10, 'notrial', [21]);
  97. %% Number of raw epochs per condition
  98. fprintf('N_rawepochs (SP/D2/D10): %d/%d/%d\n', length(EEG_SP.epoch),... % klopt dit nu?
  99. length(EEG_D2.epoch), length(EEG_D10.epoch));
  100. %% Seperate epochs for conditions and save
  101. mkdir([DATAOUT, '/', ppn, '/', br])
  102. pop_saveset(EEG_SP, 'filename', [ppn, '_rawepochs_', br, '_SP.set'], 'filepath', [DATAOUT, ppn, '/', br]);
  103. pop_saveset(EEG_D2, 'filename', [ppn, '_rawepochs_', br, '_D2.set'], 'filepath', [DATAOUT, ppn, '/', br]);
  104. pop_saveset(EEG_D10, 'filename', [ppn, '_rawepochs_', br, '_D10.set'], 'filepath', [DATAOUT, ppn, '/', br]);

preprocessing_1.m at commit c9ba510, no license · at the source

Overview

Authors: Eva Oostra1,2,3,4, Emile d’Angremont2, Timo van Hattem5,6, Shilpa Anand7, Sophie Schubert8,9, Odile A van den Heuvel1,2,10, Ysbrand D van der Werf2,10
ORCID iDs: Eva Oostra
  1. Amsterdam UMC, Vrije Universiteit Amsterdam, Dept. Psychiatry, De Boelelaan 1117, Amsterdam, the Netherlands
  2. Amsterdam UMC, Vrije Universiteit Amsterdam, Dept Anatomy & Neuroscience, De Boelelaan 1117, Amsterdam, the Netherlands
  3. GGZ inGeest Specialized Mental Health Care, Amsterdam, the Netherlands
  4. Amsterdam Neuroscience, Mood, Anxiety, Psychosis, Sleep & Stress program, Amsterdam, the Netherlands
  5. Hertie-Institute for Clinical Brain Research, University of Tübingen, Germany
  6. Department of Neurology & Stroke, University of Tübingen, Germany
  7. Child and Adolescent Psychiatry and Psychosocial Care, Emma Children’s Hospital, Amsterdam UMC, Amsterdam, the Netherlands
  8. Brain Research and Innovation Centre, Ministry of Defence, the Netherlands
  9. Department of Psychiatry, University Medical Centre Utrecht Brain Centre, the Netherlands
  10. Amsterdam Neuroscience, Compulsivity Impulsivity Attention program, Amsterdam, the Netherlands
Institutions: Amsterdam Neuroscience (Netherlands); GGZ inGeest (Netherlands); Amsterdam UMC (Netherlands); Vrije Universiteit Amsterdam (Netherlands); Hertie Institute for Clinical Brain Research (Germany); University of Tübingen (Germany); Emma Kinderziekenhuis (Netherlands); University Medical Center Utrecht (Netherlands); Ministry of Defence (Netherlands)
Journal: Clinical neurophysiology practice, volume 11, pages 273-281
Dates: received 28 October 2025; accepted 31 March 2026; published online 4 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.cnp.2026.03.007 · PMID 42006918 · PMCID PMC13091408 · OpenAlex W7149358289
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), other (modality), human (organism), healthy (population), systems (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Smoothing, state filtering, decompositions, Preprocessing, fMRI & imaging, Physiology & signal measures
Keywords: Transcranial magnetic stimulation, Electroencephalography, Prefrontal cortex, Motor cortex, Healthy subjects
Topic: EEG and Brain-Computer Interfaces (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Dutch Research Council (NWO) (91717306); ZonMw (91717306)
Citations: not cited yet (Europe PMC); 23 references in the paper

Abstract

Background: Independent component analysis (ICA) is a common method to remove artifacts and improve signal quality in transcranial magnetic stimulation combined with electroencephalography (TMS-EEG) data. However, the impact of applying different rounds of ICA for TMS-EEG datasets are lacking. Here, we investigated the impact of applying zero, one, or two rounds of ICA on TMS-evoked potentials (TEPs) in the motor cortex and prefrontal cortex using a within-subject design.

Methods: Twenty-three healthy participants received 51 single-pulses over the left primary motor cortex (M1) and dorsolateral prefrontal cortex (DLPFC), with simultaneous EEG-recording. Data were preprocessed three times: with zero, one, or two rounds of ICA. We compared the TEP-amplitudes and local mean field potential-area under the curve (LMFP-AUC).

Results: After M1 stimulation, preprocessing two ICA rounds resulted in significantly more N40-peaks identified, and smaller P30 (3.84 µV ± 0.78) and P60 (3.08 µV ± 0.96) amplitudes compared to 0 ICA rounds. After DLPFC stimulation, zero ICA rounds led to significantly fewer identified P30 (n = 4) and N40-peaks (n = 5), and larger P60 (5.63 µV ± 1.34) and P180-amplitudes (8.62 µV ± 0.76) compared to 0 ICA. The N100-component remained stable across ICA conditions for both brain areas.

Discussion: Our results showed a large impact of ICA, compared to zero ICA rounds, particularly after DLPFC stimulation; likely due to increased eye-blink artifacts. We therefore recommend implementing eye-blink artefact removal during the first round of ICA. In M1, the addition of an ICA round only impacted the early-TEPs. This study is the first to directly compare ICA-effects on both motor and non-motor TMS-EEG data using a within-subject design.

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 2 matches between paragraphs and lines of code.

emiledangremont/TMS-EEG

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: c9ba51000ce46e0d7ac31a3535142af365ea7643, 27 November 2023
Languages: MATLAB (2)
Size: 3 files, 2 scripts
Software Heritage: not archived
Found in: the text, “Preprocessing of acquired TMS-EEG data”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: EEGLAB (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
3 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;
  • 2 scripts, each with its path and the digest of its content;
  • 2 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, 28 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 7 authors, 5 keywords, 2 funders, 23 references.

Cite

This paper

Oostra, E., d’Angremont, E., van Hattem, T., Anand, S., Schubert, S., van den Heuvel, O. A., & van der Werf, Y. D. (2026). The impact of Independent Component Analysis on TMS-evoked potentials: a within-subject comparison across motor and prefrontal areas. Clinical neurophysiology practice, 11, 273-281. https://doi.org/10.1016/j.cnp.2026.03.007

BibTeX

@article{oostra2026impact,
author = {Oostra, Eva and d’Angremont, Emile and van Hattem, Timo and Anand, Shilpa and Schubert, Sophie and van den Heuvel, Odile A and van der Werf, Ysbrand D},
title = {{The impact of Independent Component Analysis on TMS-evoked potentials: a within-subject comparison across motor and prefrontal areas}},
journal = {Clinical neurophysiology practice},
year = {2026},
month = apr,
volume = {11},
pages = {273--281},
publisher = {Elsevier},
issn = {2467-981X},
doi = {10.1016/j.cnp.2026.03.007},
url = {https://doi.org/10.1016/j.cnp.2026.03.007},
pmid = {42006918},
pmcid = {PMC13091408}
}

RIS

TY - JOUR
AU - Oostra, Eva
AU - d’Angremont, Emile
AU - van Hattem, Timo
AU - Anand, Shilpa
AU - Schubert, Sophie
AU - van den Heuvel, Odile A
AU - van der Werf, Ysbrand D
TI - The impact of Independent Component Analysis on TMS-evoked potentials: a within-subject comparison across motor and prefrontal areas
T2 - Clinical neurophysiology practice
J2 - Clin Neurophysiol Pract
PY - 2026
DA - 2026/04/04
VL - 11
SP - 273
EP - 281
SN - 2467-981X
PB - Elsevier
DO - 10.1016/j.cnp.2026.03.007
UR - https://doi.org/10.1016/j.cnp.2026.03.007
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.cnp.2026.03.007",
"type": "article-journal",
"title": "The impact of Independent Component Analysis on TMS-evoked potentials: a within-subject comparison across motor and prefrontal areas",
"container-title": "Clinical neurophysiology practice",
"author": [
{
"family": "Oostra",
"given": "Eva"
},
{
"family": "d’Angremont",
"given": "Emile"
},
{
"family": "van Hattem",
"given": "Timo"
},
{
"family": "Anand",
"given": "Shilpa"
},
{
"family": "Schubert",
"given": "Sophie"
},
{
"family": "van den Heuvel",
"given": "Odile A"
},
{
"family": "van der Werf",
"given": "Ysbrand D"
}
],
"container-title-short": "Clin Neurophysiol Pract",
"volume": "11",
"page": "273-281",
"DOI": "10.1016/j.cnp.2026.03.007",
"PMID": "42006918",
"PMCID": "PMC13091408",
"ISSN": "2467-981X",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.cnp.2026.03.007",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
4
]
]
}
}

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.1007/s10548-025-01113-2 [code]
Stimulation Parameters Recruit Distinct Cortico-Cortical Pathways: Insights from Microstate Analysis on TMS-Evoked Potentials.
Journal: Brain topography
In common: other, systems, EEG, 7 references
[2] doi:10.3389/fnhum.2024.1324958 [code]
A simulation study: comparing independent component analysis and signal-space projection - source-informed reconstruction for rejecting muscle artifacts evoked by transcranial magnetic stimulation.
Journal: Frontiers in human neuroscience
In common: other, EEG, 7 references
[3] doi:10.7554/elife.88567 [code]
Combined transcranial magnetic stimulation and electroencephalography reveals alterations in cortical excitability during pain.
Journal: eLife
In common: EEGLAB, other, EEG, 6 references
[4] doi:10.1016/j.xpro.2025.103622 [code]
Protocol to assess changes in brain network resistance to perturbation during offline processing using TMS-EEG.
Journal: STAR protocols
In common: EEGLAB, other, EEG, 6 references
[5] doi:10.1162/imag.a.1086 [code]
Cortical markers of PAS-induced long-term potentiation and depression in the motor system: A TMS-EEG Registered Report.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: EEGLAB, other, EEG, 6 references
[6] doi:10.1038/s41598-024-59468-8 [code]
Stability of transcranial magnetic stimulation electroencephalogram evoked potentials in pediatric epilepsy.
Journal: Scientific reports
In common: EEGLAB, other, EEG, 6 references
[7] doi:10.1162/imag.a.1356
Sources of the N15 TMS-evoked potential following motor cortex stimulation localize rostrals to TMS-induced electric fields and depend on dose.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: other, systems, EEG, 5 references
[8] doi:10.1016/j.neuroimage.2026.121794 [code]
Pulse waveform and current direction alter network-level TMS-induced functional connectivity: Evidence from TMS-EEG.
Journal: NeuroImage
In common: other, systems, EEG, 5 references
[9] doi:10.1162/imag.a.1085
Extracting reproducible components from electroencephalographic responses to transcranial magnetic stimulation with group task-related component analysis.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: other, EEG, 5 references
[10] doi:10.3390/s23218833
Graph Analysis of TMS-EEG Connectivity Reveals Hemispheric Differences following Occipital Stimulation.
Journal: Sensors (Basel, Switzerland)
In common: other, systems, EEG, 4 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.cnp.2026.03.007.svg)](https://openscicode.org/badge/doi/10.1016/j.cnp.2026.03.007)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.cnp.2026.03.007.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.cnp.2026.03.007
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.cnp.2026.03.007"><img src="https://openscicode.org/badge/doi/10.1016/j.cnp.2026.03.007.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.