OSCR

Cellular state heterogeneity underlying sex differences in Alzheimer's disease based on single-cell transcriptome.

Code ↔ Paper

7 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 7 matches
  1. [1] § Materials and methods › Cell type annotation ↔ codes/01 datasets integration/01 single cell preprocess.py, lines 40–48 · score 0.99 · HLA DRA, C1QB, CAMK2A, CSF1R, CX3CR1, SLC17A7
  2. [2] § Materials and methods › Sex differential analysis within individual datasets ↔ codes/02 DEG calculation/03 DEG calculation.R, lines 41–122 · score 0.82 · APOE genotype, fold change, FindMarkers, Seurat, MAST, age
  3. [3] § Materials and methods › Identification of cell type-specific meta-programs (MPs) ↔ codes/03 MPs calculation/02-1 NMF_robust_modules.R, lines 1–27 · score 0.76 · negative matrix factorization, robust module, gene modules, threshold, ranked, NMF
  4. [4] § Materials and methods › Cell type annotation ↔ codes/03 MPs calculation/02-2 modules leiden clustering.py, lines 58–62 · score 0.58 · dimensionality reduction, highly variable genes, Scanpy, clustered
  5. [5] § Materials and methods › Identification of cell type-specific meta-programs (MPs) ↔ codes/01 datasets integration/01 single cell preprocess.py, lines 1–18 · score 0.57 · highly variable genes, Leiden clustering, selection, cell
  6. [6] § Results › Identification of cell type-specific meta-programs ↔ codes/03 MPs calculation/02-1 NMF_robust_modules.R, lines 1–27 · score 0.56 · negative matrix factorization, major cell, NMF, module, filtering, genes
  7. [7] § Materials and methods › Identification of cell type-specific meta-programs (MPs) ↔ codes/03 MPs calculation/02-2 modules leiden clustering.py, lines 58–62 · score 0.55 · highly variable genes, Leiden clustering, Scanpy, PCA, modules

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 · 172 lines · 5 KB · no license · 2 matches

  1. #!/usr/bin/env python3
  2. """
  3. Single-cell RNA-seq preprocessing pipeline
  4. ==========================================
  5. This script loads per-cell-type Loom files, merges them, performs QC,
  6. normalization, highly-variable gene selection, Harmony batch correction,
  7. Leiden clustering, UMAP visualization and marker-gene dot-plots.
  8. Author: wzy
  9. Date: 2025
  10. License: MIT
  11. """
  12. import os
  13. from typing import Dict, List
  14. import scanpy as sc
  15. import harmonypy
  16. # ------------------------- CONFIGURATION ------------------------- #
  17. # Groups and cell types to process
  18. GROUPS: List[str] = ["normal_F"]
  19. CELL_TYPES: List[str] = [
  20. "astrocytes",
  21. "excitatory neurons",
  22. "inhibitory neurons",
  23. "microglia",
  24. "oligodendrocytes",
  25. "OPCs",
  26. ]
  27. # Input / output paths
  28. BASE_INPUT = "/home/wzy/zyx_nmf/NC/scoreinput"
  29. OUTPUT_DIR = "/home/wzy/zyx_nmf/ecosystem/leiden_umap"
  30. INTEGRATED_DIR = "/home/wzy/zyx_nmf/ecosystem/integrated_data"
  31. os.makedirs(OUTPUT_DIR, exist_ok=True)
  32. os.makedirs(INTEGRATED_DIR, exist_ok=True)
  33. # Marker genes for dot-plot
  34. MARKER_GENES: Dict[str, List[str]] = {
  35. "astrocytes": ["AQP4", "SLC1A2"],
  36. "excitatory neurons": ["NRNG", "CAMK2A", "SLC17A7"],
  37. "inhibitory neurons": ["GAD1", "GAD2"],
  38. "microglia": ["CSF1R", "CD74", "C3", "HLA-DRA", "CX3CR1", "C1QB"],
  39. "oligodendrocytes": ["MBP", "MOBP", "PLP1", "MOG"],
  40. "OPCs": ["VCAN", "PCDH15", "MEGF11", "PDGFRA", "SOX10"],
  41. }
  42. # Sample-type mapping
  43. SAMPLE_TYPE_MAP = {"1": "AD", "2": "normal"}
  44. # ------------------------- FUNCTIONS ------------------------- #
  45. def load_and_concatenate(group: str) -> sc.AnnData:
  46. """
  47. Load per-cell-type Loom files and the external reference,
  48. then concatenate into a single AnnData object.
  49. """
  50. # Per-cell-type files
  51. adatas = [
  52. sc.read_loom(os.path.join(BASE_INPUT, f"{ct}_{group}.loom"))
  53. for ct in CELL_TYPES
  54. ]
  55. adata = sc.concat(adatas, join="outer")
  56. # External reference
  57. ex_path = os.path.join(BASE_INPUT, f"{group}_ROSMAP_ex.loom")
  58. adata_ex = sc.read_loom(ex_path)
  59. adata = sc.concat([adata_ex, adata], join="outer")
  60. return adata
  61. def qc_and_normalize(adata: sc.AnnData) -> None:
  62. """
  63. Basic QC, normalization, HVG selection and scaling (in-place).
  64. """
  65. sc.pp.filter_cells(adata, min_genes=200)
  66. sc.pp.filter_genes(adata, min_cells=3)
  67. sc.pp.normalize_total(adata, target_sum=1e4)
  68. sc.pp.log1p(adata)
  69. sc.pp.highly_variable_genes(
  70. adata, min_mean=0.0125, max_mean=3, min_disp=0.5, n_top_genes=5000
  71. )
  72. adata.raw = adata.copy()
  73. sc.pp.scale(adata, max_value=10)
  74. def harmony_correction_and_cluster(adata: sc.AnnData) -> None:
  75. """
  76. Run Harmony batch correction on 'subject', compute neighbours,
  77. UMAP and Leiden clustering (in-place).
  78. """
  79. sc.external.pp.harmony_integrate(adata, key="subject")
  80. sc.pp.neighbors(adata, use_rep="X_pca_harmony", key_added="harmony_neighbors")
  81. sc.tl.umap(adata, neighbors_key="harmony_neighbors")
  82. sc.tl.leiden(
  83. adata,
  84. resolution=1,
  85. key_added="clusters",
  86. neighbors_key="harmony_neighbors",
  87. flavor="igraph",
  88. n_iterations=2,
  89. directed=False,
  90. )
  91. def plot_umap(adata: sc.AnnData, group: str) -> None:
  92. """Save UMAP coloured by Leiden clusters."""
  93. sc.settings.figdir = OUTPUT_DIR
  94. sc.pl.umap(
  95. adata,
  96. color="clusters",
  97. frameon=False,
  98. title=f"{group} Leiden Clustering (UMAP)",
  99. palette="tab20",
  100. save=f"_{group}_clusters_1.pdf",
  101. )
  102. def plot_dotplot(adata: sc.AnnData, group: str) -> None:
  103. """Filter marker genes for presence and save dot-plot."""
  104. present_markers = {
  105. ct: [g for g in genes if g in adata.var_names]
  106. for ct, genes in MARKER_GENES.items()
  107. if any(g in adata.var_names for g in genes)
  108. }
  109. sc.settings.figdir = OUTPUT_DIR
  110. sc.pl.dotplot(
  111. adata,
  112. present_markers,
  113. groupby="clusters",
  114. dendrogram=True,
  115. save=f"_{group}_Dotplot_markers.pdf",
  116. )
  117. # ------------------------- MAIN PIPELINE ------------------------- #
  118. def main() -> None:
  119. for group in GROUPS:
  120. print(f"Processing group: {group}")
  121. adata = load_and_concatenate(group)
  122. print(adata)
  123. print("Data loaded")
  124. qc_and_normalize(adata)
  125. print("QC & normalization finished")
  126. harmony_correction_and_cluster(adata)
  127. print("Harmony integration & clustering finished")
  128. # Map sample_type to human-readable labels
  129. adata.obs["sample_type"] = adata.obs["sample_type"].replace(SAMPLE_TYPE_MAP)
  130. # Save integrated object
  131. integrated_path = os.path.join(INTEGRATED_DIR, f"{group}.h5ad")
  132. adata.write(integrated_path)
  133. # Visualisations
  134. plot_umap(adata, group)
  135. plot_dotplot(adata, group)
  136. # Memory cleanup
  137. del adata
  138. if __name__ == "__main__":
  139. main()

01 single cell preprocess.py at commit 2aa4cf8, no license · at the source

Overview

Authors: Zhiyi Wu1, Qinglong Tan1, Fei Xue1, Zhuotong Jiang1, Hongyu Zhao1, Yuting Zhang1, Yiming Liu1, Yu Zhang1, Danli Ding1, Hongping Chen2, Yingqi Xu1, Feng Li1, Chunlong Zhang1
  1. College of Bioinformatics Science and Technology, Harbin Medical University,Harbin, 150081 China
  2. Department of Neurology, The First Affiliated Hospital of Harbin Medical University,Harbin, 150081 China
Journal: Alzheimer's research & therapy, volume 18, issue 1, article 158
Dates: received 25 November 2025; accepted 8 May 2026; published online 14 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1186/s13195-026-02081-w · PMID 42135783 · PMCID PMC13343642 · OpenAlex W7161153970
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), Alzheimer's / dementia (population), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Preprocessing, Machine learning
Keywords: Alzheimer's disease, Sex difference, Single-cell RNA sequencing, Transcriptome meta-programs, Cellular states
MeSH: Alzheimer Disease*, Brain*, Sex Characteristics*, Transcriptome*, Female, Humans, Male, Single-Cell Analysis, Single-Cell Gene Expression Analysis (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Citations: not cited yet (Europe PMC); 48 references in the paper

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

327025640/AD-sex-difference

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 2aa4cf8ca799ccb2c32dcc7ce4bee7348a8e584a, 28 April 2026
Languages: R (3), Python (2)
Size: 9 files, 5 scripts
Software Heritage: not archived
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Harmony (2 files), Scanpy (2 files), Seurat (2 files), tidyverse (2 files), Matplotlib (1 file), NumPy (1 file), pandas (1 file), seaborn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
5 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;
  • 5 scripts, each with its path and the digest of its content;
  • 7 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.1186/s13195-026-02081-w.

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, 13 authors, 5 keywords, 9 MeSH terms, 1 funder, 48 references.

Cite

This paper

Wu, Z., Tan, Q., Xue, F., Jiang, Z., Zhao, H., Zhang, Y., Liu, Y., Zhang, Y., Ding, D., Chen, H., Xu, Y., Li, F., & Zhang, C. (2026). Cellular state heterogeneity underlying sex differences in Alzheimer's disease based on single-cell transcriptome. Alzheimer's research & therapy, 18(1), 158. https://doi.org/10.1186/s13195-026-02081-w

BibTeX

@article{wu2026cellular,
author = {Wu, Zhiyi and Tan, Qinglong and Xue, Fei and Jiang, Zhuotong and Zhao, Hongyu and Zhang, Yuting and Liu, Yiming and Zhang, Yu and Ding, Danli and Chen, Hongping and Xu, Yingqi and Li, Feng and Zhang, Chunlong},
title = {{Cellular state heterogeneity underlying sex differences in Alzheimer's disease based on single-cell transcriptome}},
journal = {Alzheimer's research \& therapy},
year = {2026},
month = may,
volume = {18},
number = {1},
pages = {158},
publisher = {BMC},
issn = {1758-9193},
doi = {10.1186/s13195-026-02081-w},
url = {https://doi.org/10.1186/s13195-026-02081-w},
pmid = {42135783},
pmcid = {PMC13343642}
}

RIS

TY - JOUR
AU - Wu, Zhiyi
AU - Tan, Qinglong
AU - Xue, Fei
AU - Jiang, Zhuotong
AU - Zhao, Hongyu
AU - Zhang, Yuting
AU - Liu, Yiming
AU - Zhang, Yu
AU - Ding, Danli
AU - Chen, Hongping
AU - Xu, Yingqi
AU - Li, Feng
AU - Zhang, Chunlong
TI - Cellular state heterogeneity underlying sex differences in Alzheimer's disease based on single-cell transcriptome
T2 - Alzheimer's research & therapy
J2 - Alzheimers Res Ther
PY - 2026
DA - 2026/05/14
VL - 18
IS - 1
SP - 158
SN - 1758-9193
PB - BMC
DO - 10.1186/s13195-026-02081-w
UR - https://doi.org/10.1186/s13195-026-02081-w
LA - en
ER -

CSL-JSON

{
"id": "10.1186/s13195-026-02081-w",
"type": "article-journal",
"title": "Cellular state heterogeneity underlying sex differences in Alzheimer's disease based on single-cell transcriptome",
"container-title": "Alzheimer's research & therapy",
"author": [
{
"family": "Wu",
"given": "Zhiyi"
},
{
"family": "Tan",
"given": "Qinglong"
},
{
"family": "Xue",
"given": "Fei"
},
{
"family": "Jiang",
"given": "Zhuotong"
},
{
"family": "Zhao",
"given": "Hongyu"
},
{
"family": "Zhang",
"given": "Yuting"
},
{
"family": "Liu",
"given": "Yiming"
},
{
"family": "Zhang",
"given": "Yu"
},
{
"family": "Ding",
"given": "Danli"
},
{
"family": "Chen",
"given": "Hongping"
},
{
"family": "Xu",
"given": "Yingqi"
},
{
"family": "Li",
"given": "Feng"
},
{
"family": "Zhang",
"given": "Chunlong"
}
],
"container-title-short": "Alzheimers Res Ther",
"volume": "18",
"issue": "1",
"page": "158",
"DOI": "10.1186/s13195-026-02081-w",
"PMID": "42135783",
"PMCID": "PMC13343642",
"ISSN": "1758-9193",
"publisher": "BMC",
"URL": "https://doi.org/10.1186/s13195-026-02081-w",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
14
]
]
}
}

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.1093/bib/bbag411 [code]
Screening of cell-type-specific meta-programs for drug repurposing in Alzheimer's disease.
Journal: Briefings in bioinformatics
In common: Harmony, Seurat, tidyverse, Alzheimer's / dementia, genetics / omics, 13 references
[2] doi:10.1007/s12035-026-05859-z [code]
Uncovering Spatiotemporal and Functional Dynamics of Long Non-coding RNAs During Alzheimer's Progression in the Human Brain at Single-Cell Resolution.
Journal: Molecular neurobiology
In common: Scanpy, Seurat, tidyverse, 3 other tools, Alzheimer's / dementia, genetics / omics, cellular / molecular, 7 references
[3] doi:10.1101/gr.280436.125 [code]
Cell type-specific gene regulatory atlas prioritizes drug targets and repurposable medicines in Alzheimer's disease.
Journal: Genome research
In common: Scanpy, Seurat, seaborn, 4 other tools, Alzheimer's / dementia, genetics / omics, cellular / molecular, 6 references
[4] doi:10.1038/s41593-026-02267-3 [code]
Spatial proteomic analysis in human Alzheimer's disease brains enables identification of microenvironment-dependent microglial cell states.
Journal: Nature neuroscience
In common: Harmony, Scanpy, Seurat, 4 other tools, Alzheimer's / dementia, genetics / omics, cellular / molecular, 4 references
[5] doi:10.1038/s41514-026-00391-9 [code]
Region-specific transcriptional signatures of brain aging in the absence of neuropathology at the single-cell level.
Journal: npj aging
In common: Harmony, Scanpy, Seurat, 5 other tools, genetics / omics, cellular / molecular, 4 references
[6] doi:10.1038/s41467-026-73007-1 [code]
Single-nucleus epigenomic dysregulation unmasks genetic risk-associated neurodegenerative glia states.
Journal: Nature communications
In common: Scanpy, Seurat, tidyverse, 3 other tools, Alzheimer's / dementia, genetics / omics, cellular / molecular, 5 references
[7] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: Harmony, Scanpy, Seurat, 5 other tools, genetics / omics, cellular / molecular, 4 references
[8] doi:10.1038/s41467-026-74038-4 [code]
Semaglutide attenuates neuroinflammation in male mice.
Journal: Nature communications
In common: Scanpy, Seurat, tidyverse, 2 other tools, Alzheimer's / dementia, cellular / molecular, 6 references
[9] doi:10.1038/s41586-026-10793-0
Cell-type signatures of Alzheimer's disease shared across population groups.
Journal: Nature
In common: Alzheimer's / dementia, genetics / omics, cellular / molecular, 9 references
[10] doi:10.1038/s41586-026-10612-6 [code]
Acquired genetic and cell-state changes in IDH-mutant glioma progression.
Journal: Nature
In common: Harmony, Seurat, tidyverse, 2 other tools, cellular / molecular, 5 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.