OSCR

A semi-automated MEA spike sorting method for high-throughput assessment of cultured neurons.

Code ↔ Paper

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

4 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 5 matches · 4 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › SAMS ↔ src/fix_undersorting.m, the whole file · a weak match · score 0.90 · fix undersorting, Davies Bouldin, spectral clustering, refractory period, spike waveforms, split · block oscr:b:4FC7A18JBV86A-7 · Report a mismatch
  2. [2] § Results › Overview of spike sorting using SAMS ↔ src/fix_undersorting.m, the whole file · a weak match · score 0.84 · Davies Bouldin, Spectral clustering, refractory period, spike waveform, optimal, undersorting · block oscr:b:4FC7A18JBV86A-7 · Report a mismatch
  3. [3] § Methods › SAMS ↔ src/process_electrode.m, lines 1 to 89 · score 0.76 · Davies Bouldin, spectral clustering, spike waveforms, HDT, dimension, outliers · block oscr:b:JKG25Q9YMTW7B-6 · Report a mismatch
  4. [4] § Results › Overview of spike sorting using SAMS ↔ src/run_SAMS.m, the whole file · a weak match · score 0.74 · inter spike intervals, standard deviations, refractory period, firing rate, templates, outlier · block oscr:b:SJ9WXFC2J9WPV-P · Report a mismatch
  5. [5] § Results › SAMS provides a user-friendly interface containing key information of output data ↔ src/get_network_spike_participation.m, the whole file · a weak match · score 0.62 · electrodes participating, network burst, minimum spike, ISIs, detection · block oscr:b:3WGT3TDPW66JR-X · 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 · 133 lines · 6.8 KB · MIT · 2 matches

  1. function [initial_idx_list, HDT_flag] = fix_undersorting(initial_idx_list, spikes, Times, score, refractoryT, params)
  2. % Fix undersorting using Hartigan's dip test for bimodality
  3. %
  4. % INPUTS:
  5. % initial_idx_list - Cell array of indices for each cluster after outlier removal
  6. % spikes - Spike waveforms matrix (time points × spikes)
  7. % Times - Spike timing vector
  8. % score - PCA scores for each spike
  9. % refractoryT - Refractory period in seconds
  10. % params - Parameter structure
  11. %
  12. % OUTPUTS:
  13. % initial_idx_list - Updated cell array of indices after fixing undersorting
  14. % HDT_flag - Flag indicating if Hartigan's dip test found bimodality
  15. HDT_flag = 0;
  16. nboot = 500; % Bootstrap sample size for the dip test
  17. count_fix_undersorting = 0;
  18. copy_initial_idx_list = initial_idx_list;
  19. initial_idx_list = cell(1, length(copy_initial_idx_list)*2); % Pre-allocate larger array
  20. for num_unit_initial = 1:length(copy_initial_idx_list)
  21. try
  22. if length(copy_initial_idx_list{num_unit_initial}) > 10
  23. % Get PCA scores for this cluster
  24. samplePCA1 = score(copy_initial_idx_list{num_unit_initial}, 1)';
  25. samplePCA2 = score(copy_initial_idx_list{num_unit_initial}, 2)';
  26. % Perform Hartigan's dip test on the first two PCs
  27. [~, p_value1, ~, ~] = HartigansDipSignifTest(samplePCA1, nboot);
  28. [~, p_value2, ~, ~] = HartigansDipSignifTest(samplePCA2, nboot);
  29. % If either PC shows significant bimodality (p < 0.05)
  30. if (p_value1 < 0.05) || (p_value2 < 0.05)
  31. try
  32. % Perform additional clustering on this unit
  33. sample2d = score(copy_initial_idx_list{num_unit_initial}, 1:2);
  34. % Use evalclusters to determine optimal K
  35. klist = 2:5;
  36. myfunc = @(X, K) spectralcluster(X, K);
  37. eva = evalclusters(sample2d, myfunc, "DaviesBouldin", 'KList', klist);
  38. optimal_K = eva.OptimalK;
  39. % Perform spectral clustering with optimal K
  40. [cluster_idx, ~] = spectralcluster(sample2d, optimal_K);
  41. catch ME
  42. if contains(ME.message, 'Invalid data type') || contains(ME.message, 'real array')
  43. try
  44. % Try k-means as fallback
  45. optimal_K = 2; % Default to 2 for fallback
  46. [cluster_idx, ~] = kmeans(sample2d, optimal_K, 'Replicates', 2);
  47. warning('Used k-means fallback');
  48. catch
  49. % If even k-means fails, skip this iteration
  50. warning('Both spectral clustering and k-means failed');
  51. continue;
  52. end
  53. else
  54. rethrow(ME); % Re-throw if it's a different error
  55. end
  56. end
  57. % Split the cluster into K sub-clusters based on optimal K
  58. sub_clusters = cell(1, optimal_K);
  59. for k = 1:optimal_K
  60. sub_clusters{k} = copy_initial_idx_list{num_unit_initial}(cluster_idx == k);
  61. end
  62. % Validate sub-clusters through pairwise overlap analysis
  63. valid_clusters = true(1, optimal_K);
  64. merge_groups = cell(1, optimal_K);
  65. for k = 1:optimal_K
  66. merge_groups{k} = k;
  67. end
  68. % Check all pairs of sub-clusters for overlap
  69. for k1 = 1:optimal_K-1
  70. for k2 = k1+1:optimal_K
  71. if valid_clusters(k1) && valid_clusters(k2)
  72. % Get spike waveforms and times for each sub-cluster
  73. spk1 = spikes(:, sub_clusters{k1});
  74. t1 = Times(:, sub_clusters{k1});
  75. spk2 = spikes(:, sub_clusters{k2});
  76. t2 = Times(:, sub_clusters{k2});
  77. % Calculate overlap between the two sub-clusters
  78. [ovlp1, ovlp2, tdiff] = calculate_overlap(spk1, spk2, t1, t2);
  79. ovlp = max(sum(ovlp2 > params.overlap_threshold) / length(ovlp1), sum(ovlp2 > params.overlap_threshold) / length(ovlp2));
  80. % Check if the sub-clusters are likely from the same spike
  81. sameSpike = (ovlp > params.overlap_threshold) && (tdiff(1) > refractoryT);
  82. if sameSpike
  83. % Mark for merging - combine indices
  84. sub_clusters{k1} = [sub_clusters{k1}; sub_clusters{k2}];
  85. valid_clusters(k2) = false;
  86. end
  87. end
  88. end
  89. end
  90. % Add validated sub-clusters to the output
  91. num_valid = sum(valid_clusters);
  92. if num_valid > 1
  93. % Split detected - add each valid sub-cluster
  94. HDT_flag = 1;
  95. for k = 1:optimal_K
  96. if valid_clusters(k)
  97. count_fix_undersorting = count_fix_undersorting + 1;
  98. initial_idx_list{count_fix_undersorting} = sub_clusters{k};
  99. end
  100. end
  101. else
  102. % All sub-clusters merged back - keep as single unit
  103. count_fix_undersorting = count_fix_undersorting + 1;
  104. initial_idx_list{count_fix_undersorting} = copy_initial_idx_list{num_unit_initial};
  105. end
  106. else
  107. % Keep as a single unit if no bimodality detected
  108. count_fix_undersorting = count_fix_undersorting + 1;
  109. initial_idx_list{count_fix_undersorting} = copy_initial_idx_list{num_unit_initial};
  110. end
  111. end
  112. catch
  113. % Keep as is if an error occurs
  114. fprintf('Error in dip test for unit %d, keeping as is\n', num_unit_initial);
  115. count_fix_undersorting = count_fix_undersorting + 1;
  116. initial_idx_list{count_fix_undersorting} = copy_initial_idx_list{num_unit_initial};
  117. end
  118. end
  119. % Trim empty cells
  120. initial_idx_list = initial_idx_list(~cellfun('isempty', initial_idx_list));
  121. end

fix_undersorting.m at commit 9e40131, under MIT · at the source

Overview

Authors: Xiaoxuan Ren1,2, Carissa L. Sirois3,4, Raymond Doudlah4, Ethan E. Dayley3,4, Natasha M. Méndez-Albelo3,4,5, Aviad Hai1,2, Ari Rosenberg4, Xinyu Zhao3,4
ORCID iDs: Xinyu Zhao
  1. Department of Biomedical Engineering, University of Wisconsin-Madison, Madison, WI 53705, USA
  2. Department of Electrical and Computer Engineering, University of Wisconsin - Madison, Madison, WI 53706, USA
  3. Waisman Center, University of Wisconsin-Madison, Madison, WI 53705, USA
  4. Department of Neuroscience, School of Medicine and Public Health, University of Wisconsin-Madison, Madison, WI 53705, USA
  5. Molecular Cellular Pharmacology Training Program, University of Wisconsin-Madison, Madison, WI 53705, USA
Institutions: University of Wisconsin–Madison (United States)
Journal: Stem cell reports, volume 21, issue 4, article 102872
Dates: received 20 January 2025; accepted 2 March 2026; published online 2 April 2026; in print April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1016/j.stemcr.2026.102872 · PMID 41932338 · PMCID PMC13083792 · OpenAlex W7148445046
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: extracellular electrophysiology (units, LFP) (modality), human (organism)
Methods: Smoothing, state filtering, decompositions, Statistics, Single-unit activity, calcium imaging, Machine learning
Keywords: human iPSCs, pluripotent stem cells, multi-electrode array, spike sorting, semi-automated, neurons, eletrophysiological, open source, neuronal activity, user-friendly
MeSH: Action Potentials*, High-Throughput Screening Assays*, Neurons*, Algorithms, Cells, Cultured, Humans, Pluripotent Stem Cells, Software (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: U.S. Department of Defense; IIRA (W81XWH-22-1-0621); national institutes of health (R01MH118827, R01MH116582, R01MH136152, R01NS138268, R01EY029438, R01EY035005, P50HD105353); Waisman Center (DP2NS122605, P51OD011106); Retina Research Foundation; Wisconsin Alumni Research Foundation; Simons Foundation Autism Research Initiative; Wisconsin; Stem Cell and Regenerative Medicine Center; FRAXA Research Foundation; Autism Science Foundation
Citations: not cited yet (Europe PMC); 52 references in the paper
Research resources: SAMS RRID:SCR_027843

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

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

Zhao-Lab-UW/SAMS-Semi-Automatic-MEA-Spike-sorting-pipeline-

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 9e40131904514b30ad91059356b325372983af58, 10 February 2026
Languages: MATLAB (74)
Size: 107 files, 74 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: README, license file, documentation
Not found: CITATION.cff, environment file, tests, continuous integration
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
76 files

Code availability statement

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

Read it in the paper: doi.org/10.1016/j.stemcr.2026.102872.

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;
  • 74 scripts, each with its path and the digest of its content;
  • 5 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.

Code and data availability statement

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

Read it in the paper: doi.org/10.1016/j.stemcr.2026.102872.

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, issue, pages, dates, 8 authors, 10 keywords, 8 MeSH terms, 11 funders, 50 references, 1 RRID.

Cite

This paper

Ren, X., Sirois, C. L., Doudlah, R., Dayley, E. E., Méndez-Albelo, N. M., Hai, A., Rosenberg, A., & Zhao, X. (2026). A semi-automated MEA spike sorting method for high-throughput assessment of cultured neurons. Stem cell reports, 21(4), 102872. https://doi.org/10.1016/j.stemcr.2026.102872

BibTeX

@article{ren2026semi,
author = {Ren, Xiaoxuan and Sirois, Carissa L. and Doudlah, Raymond and Dayley, Ethan E. and Méndez-Albelo, Natasha M. and Hai, Aviad and Rosenberg, Ari and Zhao, Xinyu},
title = {{A semi-automated MEA spike sorting method for high-throughput assessment of cultured neurons}},
journal = {Stem cell reports},
year = {2026},
month = apr,
volume = {21},
number = {4},
pages = {102872},
publisher = {Elsevier},
issn = {2213-6711},
doi = {10.1016/j.stemcr.2026.102872},
url = {https://doi.org/10.1016/j.stemcr.2026.102872},
pmid = {41932338},
pmcid = {PMC13083792}
}

RIS

TY - JOUR
AU - Ren, Xiaoxuan
AU - Sirois, Carissa L.
AU - Doudlah, Raymond
AU - Dayley, Ethan E.
AU - Méndez-Albelo, Natasha M.
AU - Hai, Aviad
AU - Rosenberg, Ari
AU - Zhao, Xinyu
TI - A semi-automated MEA spike sorting method for high-throughput assessment of cultured neurons
T2 - Stem cell reports
J2 - Stem Cell Reports
PY - 2026
DA - 2026/04/02
VL - 21
IS - 4
SP - 102872
SN - 2213-6711
PB - Elsevier
DO - 10.1016/j.stemcr.2026.102872
UR - https://doi.org/10.1016/j.stemcr.2026.102872
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.stemcr.2026.102872",
"type": "article-journal",
"title": "A semi-automated MEA spike sorting method for high-throughput assessment of cultured neurons",
"container-title": "Stem cell reports",
"author": [
{
"family": "Ren",
"given": "Xiaoxuan"
},
{
"family": "Sirois",
"given": "Carissa L."
},
{
"family": "Doudlah",
"given": "Raymond"
},
{
"family": "Dayley",
"given": "Ethan E."
},
{
"family": "Méndez-Albelo",
"given": "Natasha M."
},
{
"family": "Hai",
"given": "Aviad"
},
{
"family": "Rosenberg",
"given": "Ari"
},
{
"family": "Zhao",
"given": "Xinyu"
}
],
"container-title-short": "Stem Cell Reports",
"volume": "21",
"issue": "4",
"page": "102872",
"DOI": "10.1016/j.stemcr.2026.102872",
"PMID": "41932338",
"PMCID": "PMC13083792",
"ISSN": "2213-6711",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.stemcr.2026.102872",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
2
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1016/j.celrep.2024.114330
CGG repeats in the human FMR1 gene regulate mRNA localization and cellular stress in developing neurons.
Journal: Cell reports
In common: 3 references, author Xinyu Zhao
[2] doi:10.1002/advs.202519893 [code]
NeuroSuite for Long-Term Functional and Structural Studies of Air-Liquid Interface Cerebral Organoids.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, extracellular electrophysiology (units, LFP), 4 references
[3] doi:10.1038/s41420-026-03185-w [code]
An electrophysiological and proteomics roadmap for human induced glutamatergic neurons: fine-tuning of culture conditions for pathophysiological studies.
Journal: Cell death discovery
In common: 5 references
[4] doi:10.3389/fnins.2024.1446578 [code]
autoMEA: machine learning-based burst detection for multi-electrode array datasets.
Journal: Frontiers in neuroscience
In common: extracellular electrophysiology (units, LFP), 4 references
[5] doi:10.1002/advs.202515887 [code]
An Open-Source Pipeline for Calcium Imaging and All-Optical Physiology in Human Stem Cell-Derived Neurons.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: 4 references
[6] doi:10.1038/s42003-024-07120-6 [code]
Deep functional measurements of Fragile X syndrome human neurons reveal multiparametric electrophysiological disease phenotype.
Journal: Communications biology
In common: 4 references
[7] doi:10.3389/fninf.2022.851024 [code]
From End to End: Gaining, Sorting, and Employing High-Density Neural Single Unit Recordings.
Journal: Frontiers in neuroinformatics
In common: extracellular electrophysiology (units, LFP), 4 references
[8] doi:10.1016/j.crmeth.2023.100409 [code]
BOMA, a machine-learning framework for comparative gene expression analysis across brains and organoids.
Journal: Cell reports methods
In common: 1 reference, author Xinyu Zhao
[9] doi:10.1186/s12916-022-02370-9
Sustained correction of hippocampal neurogenic and cognitive deficits after a brief treatment by Nutlin-3 in a mouse model of fragile X syndrome.
Journal: BMC medicine
In common: 1 reference, author Xinyu Zhao
[10] doi:10.1098/rsos.240839 [code]
Astrocytes induce desynchronization and reduce predictability in neuron-astrocyte networks cultured on microelectrode arrays.
Journal: Royal Society open science
In common: Signal Processing Toolbox, extracellular electrophysiology (units, LFP), 3 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.stemcr.2026.102872.svg)](https://openscicode.org/badge/doi/10.1016/j.stemcr.2026.102872)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.stemcr.2026.102872.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.stemcr.2026.102872
   :alt: OSCR

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