Effect of Caffeine on Cell Death, Oxidative Stress, and Microglial Morphology in a Ferret Organotypic Brain Slice Model of Hypoxia-Ischemia.
The 3 matches
- [1] § 2. Materials and Methods › 2.7. Automated Nuclei Counting ↔ analysis/cell_counter.py, lines 123–161 · score 0.89 · min_sigma, num_sigma, threshold_rel, max_sigma, relative intensity, overlap
- [2] § 2. Materials and Methods › 2.7. Automated Nuclei Counting ↔ train_rdf_model.py, lines 4–59 · score 0.63 · ideal radius, weighted intensity, trained, filtered, perimeter, sigma
- [3] § 2. Materials and Methods › 2.7. Automated Nuclei Counting ↔ fit_pca.py, lines 132–223 · score 0.60 · ideal radius, weighted intensity, fit, perimeter, sigma, eccentricity
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
Python · 285 lines · 9.4 KB · MIT · 1 match
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """Identifies cells in a preprocessed microscopy image"""
- from math import sqrt
- # from typing import Any, Optional
- import warnings
- import numpy as np
- import matplotlib.pyplot as plt
- from scipy.signal import find_peaks
- # from skimage.io import imread, imshow
- # from skimage.color import rgb2gray, label2rgb
- from skimage.feature import blob_dog, blob_log # , blob_doh
- # from skimage.morphology import erosion, dilation, opening, closing
- # from skimage.measure import label, regionprops
- from .utils import pixels_in_radius, calc_weighted_intensity
- from utils.models import Cell
- def apply_blob_log_REDUNDANT(img: np.ndarray, **kwargs) -> np.ndarray:
- """Blob detection using Laplacian of Gaussian (log)
- Arguments:
- img: cleaned and preprocesed image. Should be masked to reduce false positives
- Kwargs:
- min_sigma: float, minimum sigma value, default = 2
- max_sigma: float, maximum sigma value, default = 8
- num_sigma: int, number of sigmas to test = 20
- threshold: float, absolute threshold for cell detection, default = 0.1
- overlap: float, amount cells can overlap, default = 0.5,
- Returns:
- (n x 3) array with n rows of (i, j, sigma) representing the coordinates of each
- blob and the gaussian value of sigma that detected the blob
- """
- params = {
- "min_sigma": 2,
- "max_sigma": 8,
- "num_sigma": 20,
- "threshold": 0.1,
- "threshold_rel": 0,
- "overlap": 0.6,
- }
- params.update(kwargs)
- blobs_log = blob_log(
- img,
- **params,
- )
- # blobs_log[:, 2] *= sqrt(2)
- if False:
- plt.close("all")
- fig = plt.figure()
- ax = fig.gca()
- ax.imshow(img, origin="lower", cmap="gray")
- for i in range(blobs_log.shape[0]):
- [y, x] = blobs_log[i, :2]
- r = blobs_log[i, 2]
- c = plt.Circle((x, y), r, color="r", linewidth=2, fill=False, alpha=0.6)
- ax.add_patch(c)
- plt.show()
- plt.close(fig)
- return blobs_log
- def apply_blob_dog(img: np.ndarray) -> np.ndarray:
- """Blob detection using Difference of Gaussian (dog)
- More computationally efficient than Laplacian of Gaussian
- Arguments:
- img: cleaned and preprocesed image. Should be masked to reduce false positives
- Returns:
- (n x 3) array with n rows of (x, y, sigma) representing the coordinates of each
- blob and the gaussian value of sigma that detected the blob
- """
- blobs_dog = blob_dog(img, max_sigma=30, threshold=0.1)
- blobs_dog[:, 2] = blobs_dog[:, 2] * sqrt(2)
- return blobs_dog
- def find_blob_params(
- img: np.ndarray, blobs_info: np.ndarray
- ) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
- """Finds pixels
- Args:
- img: image
- blobs_info: (n x 3) array of [i, j, sigma/radius]
- Returns:
- average intensity,
- weighted intensity,
- total intensity,
- """
- n, _ = np.shape(blobs_info)
- avg_intensity = np.zeros(n, dtype=np.float64)
- weighted_intensity = np.zeros(n, dtype=np.float64)
- total_intensity = np.zeros(n, dtype=np.float64)
- for i in range(n):
- center = (blobs_info[i, 0], blobs_info[i, 1])
- intensities, dists = pixels_in_radius(img, center, blobs_info[i, 2])
- if len(intensities) > 0:
- avg_intensity[i] = np.sum(intensities)
- weighted_intensity[i] = calc_weighted_intensity(intensities, dists)
- total_intensity[i] = np.mean(intensities)
- return (avg_intensity, weighted_intensity, total_intensity)
- def optimize_blob_kwargs(meta: dict, max_value: float) -> dict:
- """Optimize blob parameters"""
- x_px_width, y_px_width, _ = meta["axes_calibration"]
- x_px_width = float(x_px_width)
- y_px_width = float(y_px_width)
- if abs(x_px_width - y_px_width) > 1e-8:
- print("Confirm axes_calibration is stored as (x,y,z), not (i,j,k)")
- warnings.warn(
- f"different x, y dimensions ({x_px_width}, {y_px_width})",
- category=UserWarning,
- )
- px_width = np.mean([x_px_width, y_px_width])
- if abs(px_width - 0.8631674575031096) > 1e-3:
- warnings.warn(
- "Blob kwargs are only optimized for a pixel width of ~0.86 micrometers",
- category=UserWarning,
- )
- # All of these values are chosen semi-arbitrarily and can be adjusted.
- # The scaling factors are intended to convert pixel length (um) back to some number
- # of pixels.
- min_sigma_ = 2.2 # microns
- max_sigma_ = 4.2 # microns
- n_step_ = round((max_sigma_ - min_sigma_) / 0.1) + 1
- params = { # expected pixel edge length is 0.8631674575031096 micrometers
- "min_sigma": float(min_sigma_ / px_width), # 1.5 (init: 2 @ 0.86 -> 2.3)
- "max_sigma": float(max_sigma_ / px_width), # 4.5 (init: 8 @ 0.86 -> 9.3)
- # "min_sigma": float(2 * px_width), # 2 @ 0.86 -> 2.3
- # "max_sigma": float(8 * px_width), # 8 @ 0.86 -> 9.3
- # "min_sigma": float(2.1 * px_width), # 2 @ 0.86 -> 2.3
- # "max_sigma": float(9.3 * px_width), # 8 @ 0.86 -> 9.3
- "num_sigma": n_step_, # previously 25
- "threshold": 0.005 * max_value, # absolute intensity a peak must exceed
- "threshold_rel": 0, # relative intensity, between 0 and 1
- "overlap": 0.7, # 0.6 @ 0.86 -> 0.695
- }
- return params
- def filter_cells(cells_found: np.ndarray, criteria: np.ndarray) -> np.ndarray:
- """Filter cells
- Args:
- cells_found: array of (n_cells x 3)
- criteria: measure by which to filter cells
- Return:
- indices of cells to include
- """
- n_cells, _ = np.shape(cells_found)
- hist, bins = np.histogram(criteria, bins=len(np.unique(criteria)))
- x_vals = bins[:-1]
- peaks, info = find_peaks(hist)
- if len(peaks) == 0:
- thresh = 0.0
- elif len(peaks) == 1:
- thresh = float(peaks[0] / 2)
- else:
- pk0 = int(peaks[0])
- pk1 = int(peaks[1])
- thresh = x_vals[np.argmin(hist[pk0:pk1+1]) + pk0]
- indices = np.arange(n_cells, dtype=np.int64)[criteria > thresh]
- return indices
- def find_cells(
- img: np.ndarray, img_norm: np.ndarray, meta: dict, include_all: bool = False
- ) -> list | tuple[list, dict]:
- """Finds cells within preprocessed image
- Parameters:
- ----------
- img: preprocessed image
- meta: dict of meta info for image
- Returns:
- -------
- list of Cell models
- Optionally, returns this dict:
- - all_cells: np.ndarray (n x 3) of [i, j, sigma] for every blob detected
- - all_avg_intensities: np.ndarray (n,) of average intensity within sigma for each
- blob
- - all_weighted_intensities: np.ndarray (n,) of weighted average intensity of each
- blob
- - all_total_intensities: np.ndarray (n,) of total intensity within sigma for each
- blob
- - acceptable_indices: np.ndarray (m,) of cell indices deemed true positives
- - cells: np.ndarray (m x 3) of [i, j, sigma] for "acceptable" blobs
- - avg_intensities: np.ndarray (m,) of average intensity within sigma for
- "acceptable" blobs
- - weighted_intensities: np.ndarray (m,) of weighted average intensity of
- "acceptable" blobs
- - total_intensities: np.ndarray (m,) of total intensity within sigma for
- "acceptable" blobs
- """
- # _compare_blob_methods(masked_img, mask)
- px_height, px_width, _ = meta["axes_calibration"]
- px_height = float(px_height)
- px_width = float(px_width)
- blob_kwargs = optimize_blob_kwargs(meta, np.max(img.copy().flatten()))
- cells_found = blob_log(img, **blob_kwargs)
- avg_intensity, weighted_intensity, total_intensity = find_blob_params(
- img_norm, cells_found
- )
- # filter cells to remove some false positives
- acceptable_indices = filter_cells(cells_found, total_intensity)
- cells = []
- for i, idx in enumerate(acceptable_indices):
- cells.append(
- Cell(
- uid=i,
- center=tuple(cells_found[idx, :2].astype(np.int64).tolist()),
- sigma_px=float(cells_found[idx, 2]),
- avg_intensity=float(avg_intensity[idx]),
- weighted_intensity=float(weighted_intensity[idx]),
- total_intensity=float(total_intensity[idx]),
- pixel_height=px_height,
- pixel_width=px_width,
- image_dims=tuple(meta["voxel_count"][:2]),
- )
- )
- # if False:
- # fig, axes = plot_blobs(
- # (img + 50),
- # cells_found[acceptable_indices, :],
- # side_by_side=True,
- # show=False,
- # )
- # radii = cells_found[:, -1].copy().flatten()
- # fig1, ax1 = plot_cell_histogram(
- # radii, avg_intensity, weighted_intensity, total_intensity, show=False
- # )
- # plt.show()
- # plt.close()
- if include_all:
- d = {
- "all_cells": cells_found.copy(),
- "all_avg_intensities": avg_intensity.copy(),
- "all_weighted_intensities": weighted_intensity.copy(),
- "all_total_intensities": total_intensity.copy(),
- "acceptable_indices": acceptable_indices.copy(),
- "cells": np.array(cells_found[acceptable_indices, :]),
- "avg_intensities": np.array(avg_intensity[acceptable_indices]),
- "weighted_intensities": np.array(weighted_intensity[acceptable_indices]),
- "total_intensities": np.array(total_intensity[acceptable_indices]),
- }
- return (cells, d)
- return cells
cell_counter.py at commit 72057f8, under MIT · at the source
Overview
- Division of Neonatology, University of Washington, Seattle, WA 98195, USA; (O.C.B.); (K.A.C.); (K.F.D.); (D.H.M.); (S.E.J.); (T.R.W.)
- Department of Chemical Engineering, University of Washington, Seattle, WA 98195, USA; (Z.R.J.); (N.S.); (E.A.N.)
- Department of Bioengineering, University of Washington, Seattle, WA 98195, USA; (M.J.M.); (P.M.B.)
- Institute on Human Development and Disability, University of Washington, Seattle, WA 98195, USA
Abstract
Brain injury after hypoxia–ischemia (HI) is the leading cause of morbidity and mortality in term and near-term neonates worldwide. The ferret is a promising translational model to study HI due to its gyrified brain and white-to-gray matter ratio that more closely resembles humans compared to rodents. Caffeine, an adenosine A2A receptor (A2AR) antagonist, shows neuroprotective potential after HI, but its effects have not been fully characterized. We sought to evaluate caffeine’s effect on neuronal cell death, cytotoxicity, and inflammatory and oxidative stress markers in a term-equivalent ferret organotypic brain slice model of HI. Slices were cultured for 72 h, exposed to two hours of oxygen–glucose deprivation (OGD), and randomized to OGD alone, OGD with caffeine (20 or 50 mg/
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 3 matches between paragraphs and lines of code.
MattM719/NeuroCellCounter
72057f8233c9bb728db757530b356ca192be6b84, 6 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
42 files
- analysis/
__init__.py , Python, 12 lines - analysis/
cell_counter.py , Python, 285 lines, 1 match - analysis/
characterize_cells.py , Python, 443 lines - analysis/
filters.py , Python, 178 lines - analysis/
find_annotations.py , Python, 197 lines - analysis/
image_processing.py , Python, 117 lines - analysis/
match_cell_regions.py , Python, 304 lines - analysis/
region_finder.py , Python, 267 lines - analysis/
utils.py , Python, 116 lines - apply_prev_rdf_model.py, Python, 327 lines
- cell_counter.py, Python, 429 lines
- classifiers/
__init__.py , Python, 7 lines - classifiers/
classifier.py , Python, 79 lines - classifiers/
transformer.py , Python, 191 lines - fit_pca.py, Python, 227 lines, 1 match
- image_viewer.py, Python, 58 lines
- outputs/
__init__.py , Python, 24 lines - outputs/
basic_analyses.py , Python, 75 lines - outputs/
img_plotter.py , Python, 454 lines - outputs/
logger.py , Python, 94 lines - outputs/
results.py , Python, 176 lines - outputs/
save_processed_images.py , Python, 28 lines - outputs/
show_processing_steps.py , Python, 106 lines - outputs/
validation_plots.py , Python, 117 lines - reader/
__init__.py , Python, 18 lines - reader/
img_reader.py , Python, 117 lines - reader/
tiff_reader.py , Python, 194 lines - reader/
validation_reader.py , Python, 75 lines - train_rdf_model.py, Python, 929 lines, 1 match
- utils/
__init__.py , Python, 23 lines - utils/
color_maps.py , Python, 160 lines - utils/
data_pickling.py , Python, 124 lines - utils/
decorators.py , Python, 19 lines - utils/
filter.py , Python, 63 lines - utils/
models.py , Python, 521 lines - utils/
onnx_classifiers.py , Python, 512 lines - utils/
parameter_optimization.p , Python, 166 linesy - utils/
resampling.py , Python, 51 lines - utils/
tools.py , Python, 93 lines - utils/
types.py , Python, 25 lines - LICENSE, License, 21 lines
- README.md, Text, 92 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:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 40 scripts, each with its path and the digest of its content;
- 3 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 data described in the manuscript and/
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, issue, pages, dates, 12 authors, 5 keywords, 1 funder, 49 references.
Cite
This paper
Brandon, O. C., Corry, K. A., Jin, Z. R., DiNucci, K. F., Magoon, M. J., Schimek, N., Moralejo, D. H., Juul, S. E., Boyle, P. M., Nance, E. A., Wood, T. R., & Kolnik, S. E. (2026). Effect of Caffeine on Cell Death, Oxidative Stress, and Microglial Morphology in a Ferret Organotypic Brain Slice Model of Hypoxia-Ischemia. NeuroSci, 7(4), 79. https://
BibTeX
@article{brandon2026effe
author = {Brandon, Olivia C. and Corry, Kylie A. and Jin, Zheyu Ruby and DiNucci, Kate F. and Magoon, Matthew J. and Schimek, Nels and Moralejo, Daniel H. and Juul, Sandra E. and Boyle, Patrick M. and Nance, Elizabeth A. and Wood, Thomas R. and Kolnik, Sarah E.},
title = {{Effect of Caffeine on Cell Death, Oxidative Stress, and Microglial Morphology in a Ferret Organotypic Brain Slice Model of Hypoxia-Ischemia}},
journal = {NeuroSci},
year = {2026},
month = jul,
volume = {7},
number = {4},
pages = {79},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {2673-4087},
doi = {10.3390/
url = {https://
pmid = {42496326},
pmcid = {PMC13398045}
}
RIS
TY - JOUR
AU - Brandon, Olivia C.
AU - Corry, Kylie A.
AU - Jin, Zheyu Ruby
AU - DiNucci, Kate F.
AU - Magoon, Matthew J.
AU - Schimek, Nels
AU - Moralejo, Daniel H.
AU - Juul, Sandra E.
AU - Boyle, Patrick M.
AU - Nance, Elizabeth A.
AU - Wood, Thomas R.
AU - Kolnik, Sarah E.
TI - Effect of Caffeine on Cell Death, Oxidative Stress, and Microglial Morphology in a Ferret Organotypic Brain Slice Model of Hypoxia-Ischemia
T2 - NeuroSci
J2 - NeuroSci
PY - 2026
DA - 2026/
VL - 7
IS - 4
SP - 79
SN - 2673-4087
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3390/
"type": "article-journal",
"title": "Effect of Caffeine on Cell Death, Oxidative Stress, and Microglial Morphology in a Ferret Organotypic Brain Slice Model of Hypoxia-Ischemia",
"container-title": "NeuroSci",
"author": [
{
"family": "Brandon",
"given": "Olivia C."
},
{
"family": "Corry",
"given": "Kylie A."
},
{
"family": "Jin",
"given": "Zheyu Ruby"
},
{
"family": "DiNucci",
"given": "Kate F."
},
{
"family": "Magoon",
"given": "Matthew J."
},
{
"family": "Schimek",
"given": "Nels"
},
{
"family": "Moralejo",
"given": "Daniel H."
},
{
"family": "Juul",
"given": "Sandra E."
},
{
"family": "Boyle",
"given": "Patrick M."
},
{
"family": "Nance",
"given": "Elizabeth A."
},
{
"family": "Wood",
"given": "Thomas R."
},
{
"family": "Kolnik",
"given": "Sarah E."
}
],
"container-title-short":
"volume": "7",
"issue": "4",
"page": "79",
"DOI": "10.3390/
"PMID": "42496326",
"PMCID": "PMC13398045",
"ISSN": "2673-4087",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
10
]
]
}
}
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.1038/s41467-026-72057-9 [code]
- Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.Journal: Nature communicationsIn common: xarray, scikit-image, Pillow, 5 other tools, 1 reference
- [2] doi:10.7554/elife.107635 [code]
- Stable excitatory-inhibitory synapse balance despite dynamic turnover.Journal: eLifeIn common: ImageJ / Fiji, scikit-image, Pillow, 5 other tools, cellular / molecular
- [3] doi:10.7554/elife.110074 [code]
- Disentangling cephalopod chromatophores motor units with computer vision.Journal: eLifeIn common: xarray, scikit-image, Pillow, 5 other tools, other
- [4] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: SHAP, scikit-image, Pillow, 5 other tools, cellular / molecular
- [5] doi:10.1038/s41467-026-76098-y [code]
- A single computational objective can produce specialization of streams in visual cortex.Journal: Nature communicationsIn common: xarray, scikit-image, Pillow, 5 other tools
- [6] doi: [code]
- Naturalistic behavior and self-generated neural activity predictive of self-correctionJournal: bioRxiv : the preprint server for biologyIn common: xarray, scikit-image, Pillow, 5 other tools
- [7] doi:10.1038/s41593-026-02232-0 [code]
- Entorhinal cortex represents task-relevant remote locations independently of CA1.Journal: Nature neuroscienceIn common: xarray, scikit-image, Pillow, 5 other tools
- [8] doi:10.1126/sciadv.aed3650 [code]
- Truthful visualizations for mass spectrometry imaging enable high-spatial-resolution interactive &
lt;i& gt;m/ z& lt;/ i& gt; mapping and exploration. Journal: Science advancesIn common: SHAP, scikit-image, Pillow, 5 other tools - [9] doi:10.1038/s41467-026-76837-1 [code]
- Drug screen and machine learning predict neuroprotective agents in a preclinical human model of childhood dementia.Journal: Nature communicationsIn common: SHAP, scikit-image, Pillow, 5 other tools
- [10] doi:10.1016/j.isci.2026.116825 [code]
- Social hierarchy shapes behavioral and transcriptional responses to chronic stress and ketamine in male mice.Journal: iScienceIn common: SHAP, scikit-image, Pillow, 5 other tools
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, 40 scripts, and 3 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:f7ee42c96fae3a56…
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.
