A semi-automated MEA spike sorting method for high-throughput assessment of cultured neurons.
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] § 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] § 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] § 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] § 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] § 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
- function [initial_idx_list, HDT_flag] = fix_undersorting(initial_idx_list, spikes, Times, score, refractoryT, params)
- % Fix undersorting using Hartigan's dip test for bimodality
- %
- % INPUTS:
- % initial_idx_list - Cell array of indices for each cluster after outlier removal
- % spikes - Spike waveforms matrix (time points × spikes)
- % Times - Spike timing vector
- % score - PCA scores for each spike
- % refractoryT - Refractory period in seconds
- % params - Parameter structure
- %
- % OUTPUTS:
- % initial_idx_list - Updated cell array of indices after fixing undersorting
- % HDT_flag - Flag indicating if Hartigan's dip test found bimodality
- HDT_flag = 0;
- nboot = 500; % Bootstrap sample size for the dip test
- count_fix_undersorting = 0;
- copy_initial_idx_list = initial_idx_list;
- initial_idx_list = cell(1, length(copy_initial_idx_list)*2); % Pre-allocate larger array
- for num_unit_initial = 1:length(copy_initial_idx_list)
- try
- if length(copy_initial_idx_list{num_unit_initial}) > 10
- % Get PCA scores for this cluster
- samplePCA1 = score(copy_initial_idx_list{num_unit_initial}, 1)';
- samplePCA2 = score(copy_initial_idx_list{num_unit_initial}, 2)';
- % Perform Hartigan's dip test on the first two PCs
- [~, p_value1, ~, ~] = HartigansDipSignifTest(samplePCA1, nboot);
- [~, p_value2, ~, ~] = HartigansDipSignifTest(samplePCA2, nboot);
- % If either PC shows significant bimodality (p < 0.05)
- if (p_value1 < 0.05) || (p_value2 < 0.05)
- try
- % Perform additional clustering on this unit
- sample2d = score(copy_initial_idx_list{num_unit_initial}, 1:2);
- % Use evalclusters to determine optimal K
- klist = 2:5;
- myfunc = @(X, K) spectralcluster(X, K);
- eva = evalclusters(sample2d, myfunc, "DaviesBouldin", 'KList', klist);
- optimal_K = eva.OptimalK;
- % Perform spectral clustering with optimal K
- [cluster_idx, ~] = spectralcluster(sample2d, optimal_K);
- catch ME
- if contains(ME.message, 'Invalid data type') || contains(ME.message, 'real array')
- try
- % Try k-means as fallback
- optimal_K = 2; % Default to 2 for fallback
- [cluster_idx, ~] = kmeans(sample2d, optimal_K, 'Replicates', 2);
- warning('Used k-means fallback');
- catch
- % If even k-means fails, skip this iteration
- warning('Both spectral clustering and k-means failed');
- continue;
- end
- else
- rethrow(ME); % Re-throw if it's a different error
- end
- end
- % Split the cluster into K sub-clusters based on optimal K
- sub_clusters = cell(1, optimal_K);
- for k = 1:optimal_K
- sub_clusters{k} = copy_initial_idx_list{num_unit_initial}(cluster_idx == k);
- end
- % Validate sub-clusters through pairwise overlap analysis
- valid_clusters = true(1, optimal_K);
- merge_groups = cell(1, optimal_K);
- for k = 1:optimal_K
- merge_groups{k} = k;
- end
- % Check all pairs of sub-clusters for overlap
- for k1 = 1:optimal_K-1
- for k2 = k1+1:optimal_K
- if valid_clusters(k1) && valid_clusters(k2)
- % Get spike waveforms and times for each sub-cluster
- spk1 = spikes(:, sub_clusters{k1});
- t1 = Times(:, sub_clusters{k1});
- spk2 = spikes(:, sub_clusters{k2});
- t2 = Times(:, sub_clusters{k2});
- % Calculate overlap between the two sub-clusters
- [ovlp1, ovlp2, tdiff] = calculate_overlap(spk1, spk2, t1, t2);
- ovlp = max(sum(ovlp2 > params.overlap_threshold) / length(ovlp1), sum(ovlp2 > params.overlap_threshold) / length(ovlp2));
- % Check if the sub-clusters are likely from the same spike
- sameSpike = (ovlp > params.overlap_threshold) && (tdiff(1) > refractoryT);
- if sameSpike
- % Mark for merging - combine indices
- sub_clusters{k1} = [sub_clusters{k1}; sub_clusters{k2}];
- valid_clusters(k2) = false;
- end
- end
- end
- end
- % Add validated sub-clusters to the output
- num_valid = sum(valid_clusters);
- if num_valid > 1
- % Split detected - add each valid sub-cluster
- HDT_flag = 1;
- for k = 1:optimal_K
- if valid_clusters(k)
- count_fix_undersorting = count_fix_undersorting + 1;
- initial_idx_list{count_fix_undersorting} = sub_clusters{k};
- end
- end
- else
- % All sub-clusters merged back - keep as single unit
- count_fix_undersorting = count_fix_undersorting + 1;
- initial_idx_list{count_fix_undersorting} = copy_initial_idx_list{num_unit_initial};
- end
- else
- % Keep as a single unit if no bimodality detected
- count_fix_undersorting = count_fix_undersorting + 1;
- initial_idx_list{count_fix_undersorting} = copy_initial_idx_list{num_unit_initial};
- end
- end
- catch
- % Keep as is if an error occurs
- fprintf('Error in dip test for unit %d, keeping as is\n', num_unit_initial);
- count_fix_undersorting = count_fix_undersorting + 1;
- initial_idx_list{count_fix_undersorting} = copy_initial_idx_list{num_unit_initial};
- end
- end
- % Trim empty cells
- initial_idx_list = initial_idx_list(~cellfun('isempty', initial_idx_list));
- end
fix_undersorting.m at commit 9e40131, under MIT · at the source
Overview
- Department of Biomedical Engineering, University of Wisconsin-Madison, Madison, WI 53705, USA
- Department of Electrical and Computer Engineering, University of Wisconsin - Madison, Madison, WI 53706, USA
- Waisman Center, University of Wisconsin-Madison, Madison, WI 53705, USA
- Department of Neuroscience, School of Medicine and Public Health, University of Wisconsin-Madison, Madison, WI 53705, USA
- Molecular Cellular Pharmacology Training Program, University of Wisconsin-Madison, Madison, WI 53705, USA
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-
9e40131904514b30ad91059356b325372983af58, 10 February 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
76 files
- src/
AxionFileLoader/ , MATLAB, 39 linesAnnotation.m - src/
AxionFileLoader/ , MATLAB, 631 linesAxisFile.m - src/
AxionFileLoader/ , MATLAB, 163 linesBasicChannelArray.m - src/
AxionFileLoader/ , MATLAB, 24 linesBlockVectorData.m - src/
AxionFileLoader/ , MATLAB, 41 linesBlockVectorDataType.m - src/
AxionFileLoader/ , MATLAB, 100 linesBlockVectorHeader.m - src/
AxionFileLoader/ , MATLAB, 58 linesBlockVectorHeaderExtensi on.m - src/
AxionFileLoader/ , MATLAB, 73 linesBlockVectorSampleType.m - src/
AxionFileLoader/ , MATLAB, 79 linesBlockVectorSet.m - src/
AxionFileLoader/ , MATLAB, 95 linesCRC32.m - src/
AxionFileLoader/ , MATLAB, 135 linesChannelArray.m - src/
AxionFileLoader/ , MATLAB, 27 linesChannelID.m - src/
AxionFileLoader/ , MATLAB, 120 linesChannelMapping.m - src/
AxionFileLoader/ , MATLAB, 270 linesCombinedBlockVectorHeade rEntry.m - src/
AxionFileLoader/ , MATLAB, 155 linesContinuousBlockVectorHea derEntry.m - src/
AxionFileLoader/ , MATLAB, 268 linesContinuousDataSet.m - src/
AxionFileLoader/ , MATLAB, 67 linesContractilityWaveform.m - src/
AxionFileLoader/ , MATLAB, 573 linesDataSet.m - src/
AxionFileLoader/ , MATLAB, 76 linesDateTime.m - src/
AxionFileLoader/ , MATLAB, 150 linesDiscontinuousBlockVector HeaderEntry.m - src/
AxionFileLoader/ , MATLAB, 69 linesEntry.m - src/
AxionFileLoader/ , MATLAB, 97 linesEntryRecord.m - src/
AxionFileLoader/ , MATLAB, 57 linesEntryRecordID.m - src/
AxionFileLoader/ , MATLAB, 45 linesEventTag.m - src/
AxionFileLoader/ , MATLAB, 36 linesKeyValuePairTag.m - src/
AxionFileLoader/ , MATLAB, 77 linesLeapInductionEvent.m - src/
AxionFileLoader/ , MATLAB, 25 linesLedColor.m - src/
AxionFileLoader/ , MATLAB, 76 linesLedPosition.m - src/
AxionFileLoader/ , MATLAB, 110 linesLegacySupport.m - src/
AxionFileLoader/ , MATLAB, 302 linesLoadArgs.m - src/
AxionFileLoader/ , MATLAB, 86 linesNote.m - src/
AxionFileLoader/ , MATLAB, 239 linesPlateTypes.m - src/
AxionFileLoader/ , MATLAB, 313 linesSpikeDataSet.m - src/
AxionFileLoader/ , MATLAB, 53 linesSpike_v1.m - src/
AxionFileLoader/ , MATLAB, 70 linesStimulationChannels.m - src/
AxionFileLoader/ , MATLAB, 124 linesStimulationEvent.m - src/
AxionFileLoader/ , MATLAB, 38 linesStimulationEventData.m - src/
AxionFileLoader/ , MATLAB, 76 linesStimulationLeds.m - src/
AxionFileLoader/ , MATLAB, 65 linesStimulationWaveform.m - src/
AxionFileLoader/ , MATLAB, 107 linesTag.m - src/
AxionFileLoader/ , MATLAB, 52 linesTagEntry.m - src/
AxionFileLoader/ , MATLAB, 64 linesTagType.m - src/
AxionFileLoader/ , MATLAB, 87 linesViabilityImpedanceEvent. m - src/
AxionFileLoader/ , MATLAB, 36 linesVoltageWaveform.m - src/
AxionFileLoader/ , MATLAB, 74 linesWaveform.m - src/
AxionFileLoader/ , MATLAB, 124 linesWellInformation.m - src/
AxionFileLoader/ , MATLAB, 18 linesfreadstring.m - src/
AxionFileLoader/ , MATLAB, 35 linesparseGuid.m - src/
HartigansDipSignifTest.m , MATLAB, 76 lines - src/
HartigansDipTest.m , MATLAB, 304 lines - src/
InterX.m , MATLAB, 78 lines - src/
align_and_trim_spikes.m , MATLAB, 272 lines - src/
calculate_WF_RMSE.m , MATLAB, 27 lines - src/
calculate_electrode_stat , MATLAB, 243 linesistics.m - src/
calculate_multivariate_s , MATLAB, 45 linesynchrony.m - src/
calculate_overlap.m , MATLAB, 59 lines - src/
exportToPPTX.m , MATLAB, 3,075 lines - src/
fix_undersorting.m , MATLAB, 133 lines, 2 matches - src/
get_burst.m , MATLAB, 191 lines - src/
get_individual_unit_anal , MATLAB, 596 linesysis.m - src/
get_network_burst_info.m , MATLAB, 252 lines - src/
get_network_spike_partic , MATLAB, 144 lines, 1 matchipation.m - src/
get_recording_properties , MATLAB, 47 lines.m - src/
initialize_parameters.m , MATLAB, 24 lines - src/
initialize_tables.m , MATLAB, 105 lines - src/
process_electrode.m , MATLAB, 199 lines, 1 match - src/
process_file.m , MATLAB, 318 lines - src/
process_final_clusters.m , MATLAB, 266 lines - src/
progressbar.m , MATLAB, 334 lines - src/
remove_outliers_before_H , MATLAB, 44 linesDT.m - src/
run_SAMS.m , MATLAB, 68 lines, 1 match - src/
template_comparison.m , MATLAB, 134 lines - src/
template_comparison_outl , MATLAB, 158 linesier.m - src/
update_results.m , MATLAB, 201 lines - LICENSE, License, 21 lines
- README.md, Text, 109 lines
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:
- it points to the authors' code: Zhao-Lab-UW/
SAMS-Semi-Automatic-MEA- Spike-sorting-pipeline-
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:
- it points to the authors' code: Zhao-Lab-UW/
SAMS-Semi-Automatic-MEA- Spike-sorting-pipeline-
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://
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/
url = {https://
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/
VL - 21
IS - 4
SP - 102872
SN - 2213-6711
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"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":
"volume": "21",
"issue": "4",
"page": "102872",
"DOI": "10.1016/
"PMID": "41932338",
"PMCID": "PMC13083792",
"ISSN": "2213-6711",
"publisher": "Elsevier",
"URL": "https://
"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 reportsIn 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 discoveryIn 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 neuroscienceIn 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 biologyIn 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 neuroinformaticsIn 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 methodsIn 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 medicineIn 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 scienceIn 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.
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, 74 scripts, and 5 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:35ffdfb5acca13d6…
Add the badge to the code's README
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 -->
[](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:endHTML
<!-- 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.
