OSCR

Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation.

Code ↔ Paper

3 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 3 matches
  1. [1] § Methods and materials › Network transcriptomics analysis ↔ 8_allen/network_allen_GPU.ipynb, lines 72–86 · score 0.63 · exponential decay, correlated gene expression, CGE, distance, Network
  2. [2] § Methods and materials › Network transcriptomics analysis ↔ 8_allen/allen_pls_CGE.ipynb, lines 12–155 · score 0.60 · explained variance, optimal, regression, predictor, error, components
  3. [3] § Methods and materials › IShN and ISpN were extracted from the SC, FC, and SFC networks ↔ solver.py, lines 28–107 · score 0.54 · gradient descent, subspaces, global, optimization

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

Jupyter notebook · 132 lines · 4.8 KB · no license · 1 match

  1. # %%
  2. import torch
  3. import numpy as np
  4. import pandas as pd
  5. from scipy.spatial.distance import pdist, squareform
  6. from scipy.optimize import curve_fit
  7. from scipy.stats import zscore
  8. # %%
  9. # Step 0: 从 Excel 文件中读取脑区坐标和基因表达矩阵
  10. coordinates_df = pd.read_excel(r'E:\aliyun_backup\common_indivi\dosenbach-2010-160.labels.xlsx') # 假设坐标文件
  11. coordinates = coordinates_df[['x', 'y', 'z']].values # 转换为 numpy 数组
  12. gene_expression_df = pd.read_csv(r'E:\aliyun_backup\common_indivi\23_Allen_avg\Allen_160.csv') # 假设基因表达矩阵文件
  13. gene_expression_df = gene_expression_df.drop(columns='label')
  14. gene_names = gene_expression_df.columns # 基因名作为列名
  15. gene_expression_matrix = gene_expression_df.values # 转换为 numpy 数组
  16. # %%
  17. # Step 1: 计算每对脑区的欧氏距离矩阵
  18. distance_matrix = squareform(pdist(coordinates, metric='euclidean'))
  19. # Step 2: 对基因表达矩阵按行进行 z-score 标准化
  20. z_gene_expression = np.apply_along_axis(zscore, 1, gene_expression_matrix)
  21. # %%
  22. # %%
  23. # Step 3: 将距离矩阵和基因表达矩阵转换为 PyTorch 张量,并移动到 GPU
  24. device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
  25. distance_matrix = torch.tensor(distance_matrix, dtype=torch.float32, device=device)
  26. z_gene_expression = torch.tensor(z_gene_expression, dtype=torch.float32, device=device)
  27. # %%
  28. distance_matrix
  29. # %%
  30. # Step 4: 定义指数衰减函数,形式为 A * e^(-d / n) + B
  31. def exponential_decay(d, A, n, B):
  32. return A * np.exp(-d / n) + B
  33. # %%
  34. # Step 5: 计算每对脑区之间的基因表达相关性矩阵 (CGE)
  35. correlation_matrix = torch.corrcoef(z_gene_expression)
  36. # %%
  37. # Step 6: 提取距离矩阵和相关性矩阵的上三角元素
  38. upper_tri_indices = torch.triu_indices(distance_matrix.size(0), distance_matrix.size(1), offset=1)
  39. distances = distance_matrix[upper_tri_indices[0], upper_tri_indices[1]]
  40. correlations = correlation_matrix[upper_tri_indices[0], upper_tri_indices[1]]
  41. # %%
  42. # Step 7: 使用 SciPy 的 curve_fit 进行非线性拟合,以获得参数 A, n, 和 B
  43. # 注意: curve_fit 不支持 GPU 张量,因此这里需转换回 CPU
  44. distances_cpu = distances.cpu().numpy()
  45. correlations_cpu = correlations.cpu().numpy()
  46. # 设置初始参数
  47. initial_params = [0.64, 90.4, -0.19]
  48. # 执行拟合
  49. popt, _ = curve_fit(exponential_decay, distances_cpu, correlations_cpu, p0=initial_params)
  50. A, n, B = popt
  51. print("拟合参数 A:", A)
  52. print("拟合参数 n:", n)
  53. print("拟合参数 B:", B)
  54. # %%
  55. import matplotlib.pyplot as plt
  56. # 可视化拟合效果
  57. plt.figure(figsize=(8, 6))
  58. plt.scatter(distances_cpu, correlations_cpu, s=1, color='gray', alpha=0.5, label='Data')
  59. sorted_indices = np.argsort(distances_cpu)
  60. plt.plot(distances_cpu[sorted_indices], exponential_decay(distances_cpu[sorted_indices], *popt),
  61. color='red', linewidth=2, label='Fitted Curve')
  62. plt.xlabel("Distance between regions (mm)")
  63. plt.ylabel("Correlated gene expression (CGE)")
  64. plt.title("CGE vs. Distance with Fitted Exponential Decay")
  65. plt.legend()
  66. plt.savefig(r'E:\aliyun_backup\common_individual_166\11_ALLEN_avg\CGE_vs_Distance.tif',dpi=300)
  67. plt.show()
  68. # %%
  69. # Step 8: 使用 PyTorch 重新创建拟合参数并在 GPU 上计算期望值矩阵
  70. A = torch.tensor(A, device=device)
  71. n = torch.tensor(n, device=device)
  72. B = torch.tensor(B, device=device)
  73. # 初始化 expected_matrix 张量并计算距离相关的期望值矩阵
  74. expected_matrix = torch.zeros_like(distance_matrix)
  75. for i in range(distance_matrix.size(0)):
  76. for j in range(i + 1, distance_matrix.size(1)):
  77. expected_matrix[i, j] = A * torch.exp(-distance_matrix[i, j] / n) + B
  78. expected_matrix[j, i] = expected_matrix[i, j] # 对称矩阵
  79. # %%
  80. pd.DataFrame(expected_matrix.cpu().numpy())
  81. # %%
  82. # Step 9: 构建存储每条连接基因贡献度的 DataFrame
  83. num_regions = z_gene_expression.size(0) # 160个脑区
  84. num_genes = z_gene_expression.size(1) # 10000个基因
  85. num_connections = distances.size(0) # 上三角元素数量
  86. # 创建 gene_contribution_df 数据框架
  87. gene_contribution_df = pd.DataFrame(np.zeros((num_connections, num_genes)),
  88. columns=gene_names) # 使用基因名作为列名
  89. # %%
  90. # %%
  91. # Step 10: 计算每条连接的基因贡献度
  92. region_pairs = list(zip(upper_tri_indices[0].cpu().numpy(), upper_tri_indices[1].cpu().numpy()))
  93. # 对每个连接计算基因贡献度
  94. for idx, (i, j) in enumerate(region_pairs):
  95. product_z_scores = z_gene_expression[i] * z_gene_expression[j]
  96. contribution_scores = product_z_scores - expected_matrix[i, j]
  97. gene_contribution_df.iloc[idx, :] = contribution_scores.cpu().numpy() # 从 GPU 移动到 CPU
  98. # %%
  99. # 为 gene_contribution_df 添加连接信息列
  100. gene_contribution_df.insert(0, 'Region_Pair', [f'{i}-{j}' for i, j in region_pairs])
  101. gene_contribution_df

network_allen_GPU.ipynb at commit d48d78a, no license · at the source

Overview

Authors: Yunheng Diao1, Yuanyuan Huang2, Minxin Guo1, Wenhao Li1, Wei Wang1, Zhaobo Li1, Heng Zhang1, Jing Zhou3,4, Xiaobo Li5, Fengchun Wu2,6,7, Kai Wu1,4,8
ORCID iDs: Fengchun Wu, Kai Wu
  1. School of Biomedical Sciences and Engineering, South China University of Technology, Guangzhou International Campus,Guangzhou, China
  2. Department of Psychiatry, The Affiliated Brain Hospital, Guangzhou Medical University,Guangzhou, China
  3. School of Material Science and Engineering, South China University of Technology,Guangzhou, China
  4. National Engineering Research Center for Tissue Restoration and Reconstruction, South China University of Technology,Guangzhou, China
  5. Department of Biomedical Engineering, New Jersey Institute of Technology,Newark, NJ USA
  6. Guangdong Engineering Technology Research Center for Translational Medicine of Mental Disorders, Guangzhou, China
  7. Key Laboratory of Neurogenetics and Channelopathies of Guangdong Province and the Ministry of Education of China, Guangzhou Medical University,Guangzhou, China
  8. Department of Aging Research and Geriatric Medicine, Institute of Development, Aging and Cancer, Tohoku University,Sendai, Japan
Journal: Translational psychiatry, volume 16, issue 1, article 273
Dates: received 7 November 2025; accepted 6 March 2026; published online 1 April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41398-026-03965-z · PMID 41922324 · PMCID PMC13184121 · OpenAlex W7147357632
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), depression (population), cellular / molecular (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, fMRI & imaging
Keywords: Depression, Molecular neuroscience
MeSH: Brain*, Major Depressive Disorder*, Nerve Net*, Suicidal Ideation*, Adult, Female, Humans, Individuality, Magnetic Resonance Imaging, Male, Middle Aged, Principal Component Analysis, Transcriptome (* major topic)
Topic: Mental Health Research Topics (Experimental and Cognitive Psychology, Psychology), according to OpenAlex
Funding: National Key Research and Development Program of China (2023YFC2414500, 2023YFC2414504); Guangdong Basic and Applied Basic Research Foundation Outstanding Youth Project (2021B1515020064); National Natural Science Foundation of China (81971585, 72174082, 82271953); Key Research and Development Program of Guangdong (2023B0303020001 and 2023B0303010003); Guangdong Basic and Applied Basic Research Foundation (2022A1515140142); Natural Science Foundation of Guangdong Province (2024A1515013058); Science and Technology Program of Guangzhou (202206060005, 202206080005, 202206010077, 202206010034, 202201010093); National Natural Science Foundation of China (82301688); Science and Technology Program of Guangzhou (2023A03J0856, 2023A03J0839)
Citations: cited by 4 papers (Europe PMC); 113 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.

Repositories

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

juryxy/juspace

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 99c08a889b292d1f28a89aa12df25663243f16c8, 8 June 2026
Languages: MATLAB (19), Shell (1)
Size: 182 files, 20 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
21 files

UMDataScienceLab/LBMAM_perpca

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 593b2dde03e8a83c390ea8511834499fef0f68be, 22 February 2023
Languages: Python (3), Jupyter (1), MATLAB (1)
Size: 24 files, 5 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, 1 notebook
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (4 files), PyTorch (4 files), Matplotlib (3 files), OpenCV (1 file), pandas (1 file), Pillow (1 file), scikit-learn (1 file), SciPy (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
6 files

Diego999/pyGAT

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 3664f2dc90cbf971564c0bf186dc794f12446d0c, 14 August 2021
Languages: Python (5)
Size: 13 files, 5 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (requirements.txt)
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: PyTorch (5 files), NumPy (3 files), SciPy (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
7 files

Yunheng-Diao/Paper_Code

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: d48d78a80ae5de3fddb3d6ca64aeb90aff57e16b, 11 December 2025
Languages: Jupyter (7), Python (3)
Size: 11 files, 10 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, 7 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (10 files), pandas (10 files), SciPy (7 files), Matplotlib (5 files), scikit-learn (4 files), statsmodels (3 files), NetworkX (2 files), PyTorch (2 files), seaborn (2 files), NiBabel (1 file), PyTorch Geometric (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
11 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.1038/s41398-026-03965-z.

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:

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

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.1038/s41398-026-03965-z.

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, 11 authors, 2 keywords, 13 MeSH terms, 3 funders, 105 references.

Cite

This paper

Diao, Y., Huang, Y., Guo, M., Li, W., Wang, W., Li, Z., Zhang, H., Zhou, J., Li, X., Wu, F., & Wu, K. (2026). Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation. Translational psychiatry, 16(1), 273. https://doi.org/10.1038/s41398-026-03965-z

BibTeX

@article{diao2026disentangling,
author = {Diao, Yunheng and Huang, Yuanyuan and Guo, Minxin and Li, Wenhao and Wang, Wei and Li, Zhaobo and Zhang, Heng and Zhou, Jing and Li, Xiaobo and Wu, Fengchun and Wu, Kai},
title = {{Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation}},
journal = {Translational psychiatry},
year = {2026},
month = apr,
volume = {16},
number = {1},
pages = {273},
publisher = {Nature Publishing Group},
issn = {2158-3188},
doi = {10.1038/s41398-026-03965-z},
url = {https://doi.org/10.1038/s41398-026-03965-z},
pmid = {41922324},
pmcid = {PMC13184121}
}

RIS

TY - JOUR
AU - Diao, Yunheng
AU - Huang, Yuanyuan
AU - Guo, Minxin
AU - Li, Wenhao
AU - Wang, Wei
AU - Li, Zhaobo
AU - Zhang, Heng
AU - Zhou, Jing
AU - Li, Xiaobo
AU - Wu, Fengchun
AU - Wu, Kai
TI - Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation
T2 - Translational psychiatry
J2 - Transl Psychiatry
PY - 2026
DA - 2026/04/01
VL - 16
IS - 1
SP - 273
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/s41398-026-03965-z
UR - https://doi.org/10.1038/s41398-026-03965-z
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41398-026-03965-z",
"type": "article-journal",
"title": "Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation",
"container-title": "Translational psychiatry",
"author": [
{
"family": "Diao",
"given": "Yunheng"
},
{
"family": "Huang",
"given": "Yuanyuan"
},
{
"family": "Guo",
"given": "Minxin"
},
{
"family": "Li",
"given": "Wenhao"
},
{
"family": "Wang",
"given": "Wei"
},
{
"family": "Li",
"given": "Zhaobo"
},
{
"family": "Zhang",
"given": "Heng"
},
{
"family": "Zhou",
"given": "Jing"
},
{
"family": "Li",
"given": "Xiaobo"
},
{
"family": "Wu",
"given": "Fengchun"
},
{
"family": "Wu",
"given": "Kai"
}
],
"container-title-short": "Transl Psychiatry",
"volume": "16",
"issue": "1",
"page": "273",
"DOI": "10.1038/s41398-026-03965-z",
"PMID": "41922324",
"PMCID": "PMC13184121",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41398-026-03965-z",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
1
]
]
}
}

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.1002/hbm.70469 [code]
VarCoNet: A Variability-Aware Self-Supervised Framework for Functional Connectome Extraction From Resting-State fMRI.
Journal: Human brain mapping
In common: PyTorch Geometric, NetworkX, OpenCV, 9 other tools, 3 references
[2] doi:10.1038/s41398-026-04025-2 [code]
Brain energetic landscapes shape state dysregulation in major depressive disorder: a morphological network controllability perspective.
Journal: Translational psychiatry
In common: SPM, NiBabel, PyTorch, 7 other tools, depression, 5 references
[3] doi:10.21203/rs.3.rs-9326213/v1 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: Research Square (preprint)
In common: SPM, Pillow, NiBabel, 7 other tools, 5 references
[4] doi:10.64898/2026.03.09.710558 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: bioRxiv (preprint)
In common: SPM, Pillow, NiBabel, 7 other tools, 5 references
[5] doi:10.1038/s41593-026-02205-3 [code]
Competitive interactions shape mammalian brain network dynamics and computation.
Journal: Nature neuroscience
In common: NetworkX, SPM, NiBabel, 8 other tools, 4 references
[6] doi:10.1002/hbm.70605 [code]
BrainEnrich: Revealing Biological Insights for Imaging-Derived Phenotypes Through Transcriptomic Enrichment.
Journal: Human brain mapping
In common: fdr_bh (Benjamini-Hochberg FDR), SPM, NiBabel, 7 other tools, depression, genetics / omics, 3 references
[7] doi:10.1073/pnas.2531706123 [code]
Metabolism-weighted brain connectome reveals synaptic integration and vulnerability to neurodegeneration.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: NetworkX, NiBabel, statsmodels, 6 other tools, cellular / molecular, 5 references
[8] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: NetworkX, SPM, OpenCV, 10 other tools, cellular / molecular
[9] doi:10.64898/2026.08.18.26360725 [code]
Temporal pole blurring in hippocampal sclerosis reflects seizure-disrupted myelination
Journal: medRxiv (preprint)
In common: PyTorch Geometric, Pillow, NiBabel, 8 other tools, cellular / molecular, 2 references
[10] doi:10.1371/journal.pbio.3003684 [code]
The retrieval of previously learned motor memories is facilitated by the reinstatement of default mode network manifold structures.
Journal: PLoS biology
In common: NiBabel, seaborn, scikit-learn, 4 other tools, 6 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.