OSCR

Spatial transcriptomics on an expanded dataset at the brain-electrode interface: exploration of variability and identification of novel biomarkers.

Code ↔ Paper

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

The 4 matches
  1. [1] § Materials and methods › Data analysis and computational methods › Cell type-specific association of DEGs ↔ coreJointNMF.m, lines 1–52 · score 0.89 · joint NMF, reactivity gene distribution, Pearson correlation, spatial spots, NMF factors, OPC
  2. [2] § Results › Variance of top differentially expressed genes (DEGs) near the device across samples ↔ coreNMF.m, lines 43–92 · score 0.56 · S100a9, Il1b, Gpnmb, Spp1, Cxcl2, Slpi
  3. [3] § Results › Differentially expressed genes (DEGs) between and within 1 and 6-week implants ↔ coreJointNMF.m, lines 1–52 · score 0.53 · S100a9, Ctsk, Ighm, Hmox1, Gpnmb, Serping1
  4. [4] § Results › Differentially expressed genes (DEGs) between and within 1 and 6-week implants ↔ coreNMF.m, lines 43–92 · score 0.51 · S100a9, Ctsk, Ighm, Hmox1, Gpnmb, Serping1

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 · 250 lines · 8.6 KB · no license · 2 matches

  1. % Joint NMF analysis across grouped datasets
  2. % Pools all spatial spots within each time point group, runs a single
  3. % group-level NMF factorization, and computes Pearson correlation and
  4. % cosine similarity between NMF factors and reactivity gene distributions.
  5. % --- Configuration ---
  6. sampleDir = '/home/anirban/ubssd/BhanvaPaper_NMF';
  7. % Sample groups
  8. datasets_1week = {'1weekB', '1weekC', '1weekD', '1weekE', '1weekF', '1weekG', '1weekH'};
  9. datasets_6week = {'6weekB', '6weekC', '6weekF', '6weekG', '6weekH', '6weekI', '6weekJ'};
  10. % Reactivity genes per group
  11. %genes_1week = {'Cxcl3', 'Cxcl2', 'Ccl2', 'Il1b', 'Slpi', 'S100a9', ...
  12. % 'Hmox1', 'Lgals3', 'Gpnmb', 'Spp1', 'Ighm', 'Ctsk'};
  13. genes_1week = {'S100a4', 'S100a9', 'Cxcl3', 'Cxcl2', 'Ccl2', 'Il1b',...
  14. 'Hmox1', 'Lgals3', 'Gpnmb', 'Spp1','Ighm', 'Ctsk','Slpi'};
  15. genes_6week = {'Spp1', 'A2m', 'Lgals3', 'Gpnmb', 'S100a4', 'Serping1', ...
  16. 'Vim', 'Lyz2', 'S100a6', 'S100a9', 'Slpi', 'Ccl6', ...
  17. 'Hmox1', 'Il1b', 'Cxcl3', 'Il1rn', 'Srgn', 'Ccl2', 'Cxcl2'};
  18. % NMF rank per cell type: [Astrocytes, Neurons, OPCs, Microglia]
  19. % Change values here — everything downstream adapts automatically
  20. Klist = [1, 2, 1, 1];
  21. % Cell type names (must match order of Klist)
  22. cellTypeNames = {'Astrocytes', 'Neurons', 'OPCs', 'Microglia'};
  23. % Groups to process
  24. groups = {'1week', '6week' };
  25. allDatasets = {datasets_1week, datasets_6week};
  26. allGenes = {genes_1week, genes_6week };
  27. % --- End Configuration ---
  28. % Make profile names automatically from Klist and cellTypeNames
  29. % e.g. Klist=[1,2,1,1] -> {'Astrocyte','Neuron 1','Neuron 2','OPC','Microglia'}
  30. profileNames = {};
  31. for ct = 1:length(Klist)
  32. baseName = cellTypeNames{ct};
  33. % Remove trailing 's' for singular form (e.g. 'Astrocytes' -> 'Astrocyte')
  34. if baseName(end) == 's'
  35. baseName = baseName(1:end-1);
  36. end
  37. if Klist(ct) == 1
  38. profileNames{end+1} = baseName;
  39. else
  40. for f = 1:Klist(ct)
  41. profileNames{end+1} = [baseName, ' ', num2str(f)];
  42. end
  43. end
  44. end
  45. nFactors = sum(Klist); % Total NMF factors across all cell types
  46. % Map each factor index back to its cell type (used for gene labels in plots)
  47. % e.g. Klist=[1,2,1,1] -> factorCellTypeIdx = [1, 2, 2, 3, 4]
  48. factorCellTypeIdx = [];
  49. for ct = 1:length(Klist)
  50. factorCellTypeIdx = [factorCellTypeIdx, repmat(ct, 1, Klist(ct))];
  51. end
  52. % --- Main Loop: one iteration per group (1week, 6week) ---
  53. for g = 1:length(groups)
  54. groupName = groups{g};
  55. current_datasets = allDatasets{g};
  56. current_genes = allGenes{g};
  57. disp(['=== Starting Joint Analysis for Group: ', groupName, ' ===']);
  58. % Create output directory
  59. outputDir = fullfile(sampleDir, ['Joint_Analysis_', groupName]);
  60. if ~exist(outputDir, 'dir')
  61. mkdir(outputDir);
  62. end
  63. disp('Step 1: Pooling data from all samples...');
  64. pooled_Y = cell(1, length(Klist));
  65. pooled_R_vec = []; % Reactivity gene counts: [TotalSpots x nReactivityGenes]
  66. spot_origin = []; % Tracks which sample each spot came from
  67. for k = 1:length(current_datasets)
  68. fdir = current_datasets{k};
  69. mat_file = fullfile(sampleDir, fdir, [fdir, '_normalized.mat']);
  70. if ~exist(mat_file, 'file')
  71. disp([' Skipping ', fdir, ' (file not found)']);
  72. continue;
  73. end
  74. fprintf(' Loading %s... ', fdir);
  75. load(mat_file, 'S');
  76. C = readCelltypeGeneCSV(1);
  77. C = array2geneCounts(C, S);
  78. R = struct;
  79. R.names = current_genes;
  80. R = array2geneCounts(R, S);
  81. for ct = 1:length(Klist)
  82. if k == 1
  83. pooled_Y{ct} = C.vec(:, :, ct);
  84. else
  85. pooled_Y{ct} = [pooled_Y{ct}; C.vec(:, :, ct)];
  86. end
  87. end
  88. pooled_R_vec = [pooled_R_vec; R.vec];
  89. num_spots = size(C.vec, 1);
  90. spot_origin = [spot_origin; repmat({fdir}, num_spots, 1)];
  91. fprintf('Done. (%d spots added)\n', num_spots);
  92. clear S C R
  93. end
  94. disp('Step 2: Running joint NMF models...');
  95. C_ref = readCelltypeGeneCSV(1);
  96. U_joint = cell(1, length(Klist)); % Spatial loadings per cell type
  97. V_joint = cell(1, length(Klist)); % Gene profiles per cell type
  98. U_total_matrix = []; % All factors concatenated: [TotalSpots x nFactors]
  99. for ct = 1:length(Klist)
  100. disp([' Processing cell type: ', cellTypeNames{ct}]);
  101. Y = pooled_Y{ct};
  102. K = Klist(ct);
  103. nruns = 500;
  104. niters = 1000;
  105. rho = 1e2;
  106. flag = [0, 0];
  107. [U, V] = RINMF(Y, K, nruns, niters, rho, flag);
  108. % Round U if binary flag is set
  109. if isequal(flag, [1, 0])
  110. U = round(U);
  111. end
  112. U_joint{ct} = U;
  113. V_joint{ct} = V;
  114. U_total_matrix = [U_total_matrix, U];
  115. for k_nmf = 1:K
  116. h_profile = figure('Visible', 'off', 'Position', [100, 100, 800, 1000]);
  117. barh(V(:, k_nmf))
  118. xlabel('Gene Contribution (Global)')
  119. set(gca, 'YDir', 'reverse')
  120. set(gca, 'YTick', 1:40);
  121. ct_idx = factorCellTypeIdx(sum(Klist(1:ct-1)) + k_nmf);
  122. try
  123. set(gca, 'YTickLabel', C_ref.names(:, ct_idx));
  124. catch
  125. disp(' Warning: Could not set gene labels.');
  126. end
  127. title({['Global Joint Factor ', num2str(k_nmf)], ...
  128. [cellTypeNames{ct}, ' (', groupName, ')']});
  129. fname = sprintf('Joint_Profile_%s_%s_Factor%d.png', groupName, cellTypeNames{ct}, k_nmf);
  130. saveas(h_profile, fullfile(outputDir, fname));
  131. close(h_profile);
  132. end
  133. end
  134. clear ct k_nmf
  135. disp('Step 4: Calculating joint statistics (Pearson & Cosine)...');
  136. numSamples = 10^5; % Random permutations for cosine similarity p-value
  137. temp = zeros(nFactors, length(current_genes));
  138. pearson_r_table = array2table(temp, 'RowNames', profileNames, 'VariableNames', current_genes);
  139. pearson_p_table = array2table(temp, 'RowNames', profileNames, 'VariableNames', current_genes);
  140. cosine_theta_table = array2table(temp, 'RowNames', profileNames, 'VariableNames', current_genes);
  141. cosine_p_table = array2table(temp, 'RowNames', profileNames, 'VariableNames', current_genes);
  142. for mr = 1:length(current_genes)
  143. for mct = 1:nFactors
  144. % Pearson: sqrt transform
  145. R_vec_pearson = sqrt(pooled_R_vec(:, mr));
  146. U_vec_pearson = sqrt(U_total_matrix(:, mct));
  147. % Cosine: raw counts (no transform )
  148. R_vec_cosine = pooled_R_vec(:, mr);
  149. U_vec_cosine = U_total_matrix(:, mct);
  150. min_len = min(length(R_vec_pearson), length(U_vec_pearson));
  151. R_vec_pearson = R_vec_pearson(1:min_len);
  152. U_vec_pearson = U_vec_pearson(1:min_len);
  153. R_vec_cosine = R_vec_cosine(1:min_len);
  154. U_vec_cosine = U_vec_cosine(1:min_len);
  155. % Pearson correlation
  156. [r, p] = corrcoef(R_vec_pearson, U_vec_pearson);
  157. pearson_r_table{mct, mr} = r(1, 2);
  158. pearson_p_table{mct, mr} = p(1, 2);
  159. % Cosine similarity with empirical p-value
  160. [cos_r, cos_p, ~] = getcostheta(R_vec_cosine, U_vec_cosine, numSamples);
  161. cosine_theta_table{mct, mr} = cos_r;
  162. cosine_p_table{mct, mr} = cos_p;
  163. end
  164. end
  165. clear mr mct
  166. pearson_r_table.Properties.VariableNames = strcat('Pearson_r_', pearson_r_table.Properties.VariableNames);
  167. pearson_p_table.Properties.VariableNames = strcat('Pearson_p_', pearson_p_table.Properties.VariableNames);
  168. cosine_theta_table.Properties.VariableNames = strcat('Cosine_theta_', cosine_theta_table.Properties.VariableNames);
  169. cosine_p_table.Properties.VariableNames = strcat('Cosine_p_', cosine_p_table.Properties.VariableNames);
  170. combined_joint_table = [pearson_r_table, pearson_p_table, cosine_theta_table, cosine_p_table];
  171. csvName = fullfile(outputDir, ['Joint_Stats_', groupName, '.csv']);
  172. writetable(combined_joint_table, csvName, 'WriteRowNames', true);
  173. disp([' Saved joint statistics to: ', csvName]);
  174. disp('Step 5: Saving joint results...');
  175. saveFile = fullfile(outputDir, ['Joint_Results_', groupName, '.mat']);
  176. save(saveFile, 'U_joint', 'V_joint', 'pooled_Y', 'spot_origin', 'cellTypeNames', 'profileNames', 'combined_joint_table');
  177. disp([' Saved joint MAT file to: ', saveFile]);
  178. disp(['=== Finished Joint Analysis for ', groupName, ' ===']);
  179. disp(' ');
  180. end
  181. clear g
  182. disp('All joint analyses completed.');

coreJointNMF.m at commit 124a09e, no license · at the source

Overview

Authors: Bhavna Gupta1,2, Anirban Chakraborty2,3, Akash Saxena1,2, Michael G Moore1,2, Quentin A Whitsitt1,2, Erin K Purcell1,2,3
ORCID iDs: Akash Saxena
  1. Department of Biomedical Engineering, Michigan State University, East Lansing, MI, United States
  2. Institute for Quantitative Health Science and Engineering, Michigan State University, East Lansing, MI, United States
  3. Department of Electrical and Computer Engineering, Michigan State University, East Lansing, MI, United States
Institutions: Michigan State University (United States)
Journal: Frontiers in neuroscience, volume 20, article 1852774
Dates: received 10 April 2026; accepted 20 May 2026; published online 15 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3389/fnins.2026.1852774 · PMID 42375631 · PMCID PMC13311015 · OpenAlex W7164817173
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), extracellular electrophysiology (units, LFP) (modality), rat (organism)
Methods: Statistics, Smoothing, state filtering, decompositions, Connectivity, Machine learning
Keywords: biomarkers, chronic implant, differential gene expression, foreign body reaction, neural device, silicon microelectrode array, spatial transcriptomics
Topic: Neuroscience and Neural Engineering (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 122 references in the paper

Abstract

The foreign body reaction to implanted electrodes in the brain has long been recognized as a major challenge impacting the performance and reliability of indwelling neurotechnologies. Spatially resolved transcriptomic approaches have enabled high-resolution mapping of cellular and molecular dynamics at the device-tissue interface, yielding novel insight into both acute and chronic tissue responses. Recent whole-transcriptome profiling methods generate exceptionally dense gene expression datasets from individual samples, offering unprecedented resolution and analytical power. Yet, limited studies have explored aggregated results from larger datasets and sample-to-sample variation within an implanted cohort using such techniques due to high costs and complicated downstream analyses. In this work, we provide a comprehensive report of spatial transcriptomics data collected from an expanded cohort of rats (n = 14 rats) implanted with silicon microelectrode arrays in the motor cortices for 1 week (acute) and 6 weeks (chronic). This larger dataset enabled us to explore the variation in results across samples, assess outliers, and examine potential batch effects. We employed differential expression analysis to identify top differentially expressed genes (DEGs) in spatially defined regions at the device-tissue interface to reveal novel biomarkers in the aggregated dataset. We assessed sample-to-sample variabilities, and applied a factorization strategy to identify prominent cell-type contributors of the top DEGs. Using network-based co-expression analysis, we identified gene modules, hub genes, and central regulatory processes governing the device-tissue interface. Our results show: (a) greater variation of top DEGs across samples at the 1-week time point with notable microglial and astroglial cell-type contributors, (b) lower variation of top DEGs across samples and a shift to prominent astroglial cell-type contributors at the 6-week time point, and (c) novel biomarkers that suggest major macrophage- and microglial mediated processes and homeostasis events at the 1-week time point, and greater tissue remodeling, apoptotic and synaptic changes at the 6-week time point. These findings support previous ideas on the evolving tissue response to implanted devices, and present novel details on biomarkers, biological processes and sample variation. Additionally, this study provides a framework for assessing larger datasets employing high-dimensional spatial transcriptomics and highlight key considerations related to across-sample variability and batch effects.

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

msureil/SpatioBiomarker

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 124a09e7efa76b2167cda2c4cda091186bf16625, 13 March 2026
Languages: MATLAB (13)
Size: 14 files, 13 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
14 files

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 13 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

Datasets cited

Other data links

Data availability statement

The data used in this study are publicly available at the following URLs. Previously reported (1 week sample B, 1 week sample C, 6 week sample B and 6 week sample C) can be found at www.ncbi.nlm.nih.gov/sra/PRJNA1089183, and remaining samples are available at https://www.ncbi.nlm.nih.gov/bioproject/1472787. The code used in this study is publicly available on GitHub at https://github.com/msureil/SpatioBiomarker.

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, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 6 authors, 7 keywords, 118 references.

Cite

This paper

Gupta, B., Chakraborty, A., Saxena, A., Moore, M. G., Whitsitt, Q. A., & Purcell, E. K. (2026). Spatial transcriptomics on an expanded dataset at the brain-electrode interface: exploration of variability and identification of novel biomarkers. Frontiers in neuroscience, 20, 1852774. https://doi.org/10.3389/fnins.2026.1852774

BibTeX

@article{gupta2026spatial,
author = {Gupta, Bhavna and Chakraborty, Anirban and Saxena, Akash and Moore, Michael G and Whitsitt, Quentin A and Purcell, Erin K},
title = {{Spatial transcriptomics on an expanded dataset at the brain-electrode interface: exploration of variability and identification of novel biomarkers}},
journal = {Frontiers in neuroscience},
year = {2026},
month = jun,
volume = {20},
pages = {1852774},
publisher = {Frontiers Media SA},
issn = {1662-4548},
doi = {10.3389/fnins.2026.1852774},
url = {https://doi.org/10.3389/fnins.2026.1852774},
pmid = {42375631},
pmcid = {PMC13311015}
}

RIS

TY - JOUR
AU - Gupta, Bhavna
AU - Chakraborty, Anirban
AU - Saxena, Akash
AU - Moore, Michael G
AU - Whitsitt, Quentin A
AU - Purcell, Erin K
TI - Spatial transcriptomics on an expanded dataset at the brain-electrode interface: exploration of variability and identification of novel biomarkers
T2 - Frontiers in neuroscience
J2 - Front Neurosci
PY - 2026
DA - 2026/06/15
VL - 20
SP - 1852774
SN - 1662-4548
PB - Frontiers Media SA
DO - 10.3389/fnins.2026.1852774
UR - https://doi.org/10.3389/fnins.2026.1852774
LA - en
ER -

CSL-JSON

{
"id": "10.3389/fnins.2026.1852774",
"type": "article-journal",
"title": "Spatial transcriptomics on an expanded dataset at the brain-electrode interface: exploration of variability and identification of novel biomarkers",
"container-title": "Frontiers in neuroscience",
"author": [
{
"family": "Gupta",
"given": "Bhavna"
},
{
"family": "Chakraborty",
"given": "Anirban"
},
{
"family": "Saxena",
"given": "Akash"
},
{
"family": "Moore",
"given": "Michael G"
},
{
"family": "Whitsitt",
"given": "Quentin A"
},
{
"family": "Purcell",
"given": "Erin K"
}
],
"container-title-short": "Front Neurosci",
"volume": "20",
"page": "1852774",
"DOI": "10.3389/fnins.2026.1852774",
"PMID": "42375631",
"PMCID": "PMC13311015",
"ISSN": "1662-4548",
"publisher": "Frontiers Media SA",
"URL": "https://doi.org/10.3389/fnins.2026.1852774",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
15
]
]
}
}

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.isci.2026.116485 [code]
MicroFace maps microglial morphology remodeling, revealing spatial zones and bifurcated trajectories during brain microinjury recovery.
Journal: iScience
In common: 5 references
[2] doi:10.1126/sciadv.aed6825
SORLA up-regulation suppresses pathological effects in aged tauopathy mouse brain.
Journal: Science advances
In common: genetics / omics, 4 references
[3] doi:10.1186/s13062-026-00912-2
Integrated analysis of single-cell transcriptome identifies a glial-neurovascular signaling trajectory in brain repair after ischemia.
Journal: Biology direct
In common: rat, genetics / omics, 3 references
[4] doi:10.3389/fnins.2026.1805957
Treadmill training induces sex-dependent changes in hippocampal epigenetic patterns and plaque-associated microglial morphology in aged TgF344 rats.
Journal: Frontiers in neuroscience
In common: rat, genetics / omics, 2 references
[5] doi:10.1002/glia.70163
A Cross-Disease Microglial Transcriptional Program Characterizes Neurodegeneration and Highlights SPP1 as a Biomarker.
Journal: Glia
In common: genetics / omics, 3 references
[6] doi:10.1007/s10565-026-10177-0
Multi-omics analysis and experimental validation reveal the IRF7-CXCL10 axis as a master regulator of microglial PCD in ischemic stroke.
Journal: Cell biology and toxicology
In common: genetics / omics, 3 references
[7] doi:10.1016/j.isci.2026.117228 [code]
Single-nucleus transcriptomics reveals cell type-specific remodeling and epilepsy-associated microglia.
Journal: iScience
In common: genetics / omics, 3 references
[8] doi:10.1371/journal.pone.0321830
Long-term neuron tracking reveals balance of stability and plasticity in functional properties.
Journal: PloS one
In common: 2 references
[9] doi:10.1038/s41598-026-51581-0 [code]
TLR7-induced murine inflammation results in a global neuroinflammatory response driving neural circuit-specific transcriptomic changes.
Journal: Scientific reports
In common: genetics / omics, 3 references
[10] doi:
Middle-aged mice treated with GHK-Cu peptide administered intraperitoneally or intranasally show behavioral rescue but divergent hippocampal aging programs
Journal: Research square
In common: genetics / omics, 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.

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.