Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation.
One block of code here has 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 3 matches
- [1] § Methods and materials › Network transcriptomics analysis ↔ 8_allen/network_allen_GPU.ipynb, lines 72 to 86 · score 0.63 · exponential decay, correlated gene expression, CGE, distance, Network · Report a mismatch
- [2] § Methods and materials › Network transcriptomics analysis ↔ 8_allen/allen_pls_CGE.ipynb, lines 12 to 155 · score 0.60 · explained variance, optimal, regression, predictor, error, components · Report a mismatch
- [3] § Methods and materials › IShN and ISpN were extracted from the SC, FC, and SFC networks ↔ solver.py, lines 28 to 107 · score 0.54 · gradient descent, subspaces, global, optimization · block
oscr:b:W6ZP4HYX42KH3-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
Jupyter notebook · 132 lines · 4.8 KB · no license · 1 match
- # %%
- import torch
- import numpy as np
- import pandas as pd
- from scipy.spatial.distance import pdist, squareform
- from scipy.optimize import curve_fit
- from scipy.stats import zscore
- # %%
- # Step 0: 从 Excel 文件中读取脑区坐标和基因表达矩阵
- coordinates_df = pd.read_excel(r'E:\aliyun_backup\common_indivi\dosenbach-2010-160.labels.xlsx') # 假设坐标文件
- coordinates = coordinates_df[['x', 'y', 'z']].values # 转换为 numpy 数组
- gene_expression_df = pd.read_csv(r'E:\aliyun_backup\common_indivi\23_Allen_avg\Allen_160.csv') # 假设基因表达矩阵文件
- gene_expression_df = gene_expression_df.drop(columns='label')
- gene_names = gene_expression_df.columns # 基因名作为列名
- gene_expression_matrix = gene_expression_df.values # 转换为 numpy 数组
- # %%
- # Step 1: 计算每对脑区的欧氏距离矩阵
- distance_matrix = squareform(pdist(coordinates, metric='euclidean'))
- # Step 2: 对基因表达矩阵按行进行 z-score 标准化
- z_gene_expression = np.apply_along_axis(zscore, 1, gene_expression_matrix)
- # %%
- # %%
- # Step 3: 将距离矩阵和基因表达矩阵转换为 PyTorch 张量,并移动到 GPU
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
- distance_matrix = torch.tensor(distance_matrix, dtype=torch.float32, device=device)
- z_gene_expression = torch.tensor(z_gene_expression, dtype=torch.float32, device=device)
- # %%
- distance_matrix
- # %%
- # Step 4: 定义指数衰减函数,形式为 A * e^(-d / n) + B
- def exponential_decay(d, A, n, B):
- return A * np.exp(-d / n) + B
- # %%
- # Step 5: 计算每对脑区之间的基因表达相关性矩阵 (CGE)
- correlation_matrix = torch.corrcoef(z_gene_expression)
- # %%
- # Step 6: 提取距离矩阵和相关性矩阵的上三角元素
- upper_tri_indices = torch.triu_indices(distance_matrix.size(0), distance_matrix.size(1), offset=1)
- distances = distance_matrix[upper_tri_indices[0], upper_tri_indices[1]]
- correlations = correlation_matrix[upper_tri_indices[0], upper_tri_indices[1]]
- # %%
- # Step 7: 使用 SciPy 的 curve_fit 进行非线性拟合,以获得参数 A, n, 和 B
- # 注意: curve_fit 不支持 GPU 张量,因此这里需转换回 CPU
- distances_cpu = distances.cpu().numpy()
- correlations_cpu = correlations.cpu().numpy()
- # 设置初始参数
- initial_params = [0.64, 90.4, -0.19]
- # 执行拟合
- popt, _ = curve_fit(exponential_decay, distances_cpu, correlations_cpu, p0=initial_params)
- A, n, B = popt
- print("拟合参数 A:", A)
- print("拟合参数 n:", n)
- print("拟合参数 B:", B)
- # %%
- import matplotlib.pyplot as plt
- # 可视化拟合效果
- plt.figure(figsize=(8, 6))
- plt.scatter(distances_cpu, correlations_cpu, s=1, color='gray', alpha=0.5, label='Data')
- sorted_indices = np.argsort(distances_cpu)
- plt.plot(distances_cpu[sorted_indices], exponential_decay(distances_cpu[sorted_indices], *popt),
- color='red', linewidth=2, label='Fitted Curve')
- plt.xlabel("Distance between regions (mm)")
- plt.ylabel("Correlated gene expression (CGE)")
- plt.title("CGE vs. Distance with Fitted Exponential Decay")
- plt.legend()
- plt.savefig(r'E:\aliyun_backup\common_individual_166\11_ALLEN_avg\CGE_vs_Distance.tif',dpi=300)
- plt.show()
- # %%
- # Step 8: 使用 PyTorch 重新创建拟合参数并在 GPU 上计算期望值矩阵
- A = torch.tensor(A, device=device)
- n = torch.tensor(n, device=device)
- B = torch.tensor(B, device=device)
- # 初始化 expected_matrix 张量并计算距离相关的期望值矩阵
- expected_matrix = torch.zeros_like(distance_matrix)
- for i in range(distance_matrix.size(0)):
- for j in range(i + 1, distance_matrix.size(1)):
- expected_matrix[i, j] = A * torch.exp(-distance_matrix[i, j] / n) + B
- expected_matrix[j, i] = expected_matrix[i, j] # 对称矩阵
- # %%
- pd.DataFrame(expected_matrix.cpu().numpy())
- # %%
- # Step 9: 构建存储每条连接基因贡献度的 DataFrame
- num_regions = z_gene_expression.size(0) # 160个脑区
- num_genes = z_gene_expression.size(1) # 10000个基因
- num_connections = distances.size(0) # 上三角元素数量
- # 创建 gene_contribution_df 数据框架
- gene_contribution_df = pd.DataFrame(np.zeros((num_connections, num_genes)),
- columns=gene_names) # 使用基因名作为列名
- # %%
- # %%
- # Step 10: 计算每条连接的基因贡献度
- region_pairs = list(zip(upper_tri_indices[0].cpu().numpy(), upper_tri_indices[1].cpu().numpy()))
- # 对每个连接计算基因贡献度
- for idx, (i, j) in enumerate(region_pairs):
- product_z_scores = z_gene_expression[i] * z_gene_expression[j]
- contribution_scores = product_z_scores - expected_matrix[i, j]
- gene_contribution_df.iloc[idx, :] = contribution_scores.cpu().numpy() # 从 GPU 移动到 CPU
- # %%
- # 为 gene_contribution_df 添加连接信息列
- gene_contribution_df.insert(0, 'Region_Pair', [f'{i}-{j}' for i, j in region_pairs])
- gene_contribution_df
network_allen_GPU.ipynb at commit d48d78a, no license · at the source
Overview
- School of Biomedical Sciences and Engineering, South China University of Technology, Guangzhou International Campus,Guangzhou, China
- Department of Psychiatry, The Affiliated Brain Hospital, Guangzhou Medical University,Guangzhou, China
- School of Material Science and Engineering, South China University of Technology,Guangzhou, China
- National Engineering Research Center for Tissue Restoration and Reconstruction, South China University of Technology,Guangzhou, China
- Department of Biomedical Engineering, New Jersey Institute of Technology,Newark, NJ USA
- Guangdong Engineering Technology Research Center for Translational Medicine of Mental Disorders, Guangzhou, China
- Key Laboratory of Neurogenetics and Channelopathies of Guangdong Province and the Ministry of Education of China, Guangzhou Medical University,Guangzhou, China
- Department of Aging Research and Geriatric Medicine, Institute of Development, Aging and Cancer, Tohoku University,Sendai, Japan
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
99c08a889b292d1f28a89aa12df25663243f16c8, 8 June 2026Availability: 2 checks, the latest on 27 October 2026: the link answers
- 27 October 2026: the link answers
- 26 September 2026: the link answers
21 files
- JuSpace_v2/
JuSpace.m , MATLAB, 1,154 lines - JuSpace_v2/
append_prefix_to_fileNam , MATLAB, 13 lineses_my.m - JuSpace_v2/
cell2num_my.m , MATLAB, 29 lines - JuSpace_v2/
center_of_mass_my.m , MATLAB, 26 lines - JuSpace_v2/
compute_DomainGauges.m , MATLAB, 315 lines - JuSpace_v2/
compute_exact_pvalue.m , MATLAB, 163 lines - JuSpace_v2/
compute_exact_spatial_pv , MATLAB, 227 linesalue.m - JuSpace_v2/
fdr_bh.m , MATLAB, 58 lines - JuSpace_v2/
fishers_r_to_z.m , MATLAB, 3 lines - JuSpace_v2/
fishers_z_to_r.m , MATLAB, 3 lines - JuSpace_v2/
generate_colors_blue_my. , MATLAB, 9 linesm - JuSpace_v2/
generate_colors_nice_my. , MATLAB, 54 linesm - JuSpace_v2/
generate_spatial_nullMap , MATLAB, 250 liness.m - JuSpace_v2/
isemptycell.m , MATLAB, 16 lines - JuSpace_v2/
mean_time_course.m , MATLAB, 50 lines - JuSpace_v2/
num2cell_my.m , MATLAB, 14 lines - JuSpace_v2/
removenan_my.m , MATLAB, 28 lines - JuSpace_v2/
resize_img_useTemp_imcal , MATLAB, 17 linesc.m - JuSpace_v2/
run_JuSpace.sh , Shell, 36 lines - JuSpace_v2/
select_con_maps_forfMRI_ , MATLAB, 39 linesmy.m - README.md, Text, 137 lines
UMDataScienceLab/LBMAM_perpca
593b2dde03e8a83c390ea8511834499fef0f68be, 22 February 2023Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
6 files
- main.ipynb, Jupyter, 439 lines
- main.py, Python, 231 lines
- proprocess.m, MATLAB, 172 lines
- solver.py, Python, 108 lines, 1 match
- torchimgpro.py, Python, 257 lines
- README.md, Text, 18 lines
Diego999/pyGAT
3664f2dc90cbf971564c0bf186dc794f12446d0c, 14 August 2021Availability: 2 checks, the latest on 7 November 2026: the link answers
- 7 November 2026: the link answers
- 28 September 2026: the link answers
7 files
Yunheng-Diao/Paper_Code
d48d78a80ae5de3fddb3d6ca64aeb90aff57e16b, 11 December 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
11 files
- 1_fMRI_network/
mat_to_csv.ipynb , Jupyter, 139 lines - 2_sMRI_network/
gmv.py , Python, 65 lines - 2_sMRI_network/
kls.py , Python, 80 lines - 3_node_feature/
all-2.py , Python, 325 lines - 4_embedding_node_feature
s/ , Jupyter, 261 linesGraphSAGE.ipynb - 5_couple_matrix/
network_cosine_similarit , Jupyter, 84 linesy.ipynb - 6_common_network_permuta
tion/ , Jupyter, 132 linespermutation_test.ipynb - 7_indivial_network_HAMD/
network_hamd17_corr.ipyn , Jupyter, 137 linesb - 8_allen/
allen_pls_CGE.ipynb , Jupyter, 213 lines, 1 match - 8_allen/
network_allen_GPU.ipynb , Jupyter, 132 lines, 1 match - README.md, Text, 1 line
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: Diego999/
pyGAT , juryxy/juspace , UMDataScienceLab/LBMAM_perpca , Yunheng-Diao/Paper_Code
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:
- it points to the authors' code: Diego999/
pyGAT , juryxy/juspace , UMDataScienceLab/LBMAM_perpca , Yunheng-Diao/Paper_Code
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://
BibTeX
@article{diao2026disenta
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/
url = {https://
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/
VL - 16
IS - 1
SP - 273
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"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":
"volume": "16",
"issue": "1",
"page": "273",
"DOI": "10.1038/
"PMID": "41922324",
"PMCID": "PMC13184121",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://
"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.34133/research.1115 [code]
- Heterogeneity-Aware, Multiscale Annotation of Shared and Specific Neurobiological Signatures among Major Neurodevelopmental Disorders.Journal: Research (Washington, D.C.)In common: fdr_bh (Benjamini-Hochberg FDR), NetworkX, SPM, 11 other tools, 22 references, author Kai Wu
- [2] doi:10.34133/research.0659 [code]
- Transcriptional Patterns of Nodal Entropy Abnormalities in Major Depressive Disorder Patients with and without Suicidal Ideation.Journal: Research (Washington, D.C.)In common: statsmodels, Statistics and Machine Learning Toolbox, pandas, 2 other tools, depression, 13 references
- [3] doi:10.1038/s41398-025-03715-7 [code]
- Dynamic changes in hemispheric lateralization in major depressive disorder correlate with neurotransmitter and genetic profiles: a DIRECT consortium study.Journal: Translational psychiatryIn common: fdr_bh (Benjamini-Hochberg FDR), SPM, statsmodels, 8 other tools, depression, 7 references
- [4] doi:10.1038/s41398-025-03615-w
- The association between gut microbiota and functional connectivity in cognitive impairment of first-episode major depressive disorder.Journal: Translational psychiatryIn common: depression, 4 references, 2 authors
- [5] doi:10.1038/s41380-024-02450-7 [code]
- Divergent suicidal symptomatic activations converge on somato-cognitive action network in depression.Journal: Molecular psychiatryIn common: NetworkX, Pillow, NiBabel, 6 other tools, depression, 7 references
- [6] doi:10.1002/hbm.70469 [code]
- VarCoNet: A Variability-Aware Self-Supervised Framework for Functional Connectome Extraction From Resting-State fMRI.Journal: Human brain mappingIn common: PyTorch Geometric, NetworkX, OpenCV, 9 other tools, 3 references
- [7] 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 psychiatryIn common: SPM, NiBabel, PyTorch, 7 other tools, depression, 5 references
- [8] doi:10.1073/pnas.2502021122 [code]
- Action-mode subnetworks for decision-making, action control, and feedback.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: NetworkX, statsmodels, NiBabel, 6 other tools, 7 references
- [9] doi:10.1016/j.patter.2024.101081 [code]
- An objective quantitative diagnosis of depression using a local-to-global multimodal fusion graph neural network.Journal: Patterns (New York, N.Y.)In common: PyTorch Geometric, NetworkX, PyTorch, 5 other tools, depression, 6 references
- [10] doi:10.1016/j.cell.2025.11.039 [code]
- Stimulant medications affect arousal and reward, not attention networks.Journal: CellIn common: SPM, statsmodels, NiBabel, 7 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.
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: 4 repositories 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:1356830726f895a1…
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.1038/s41398-026-03965-z)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41398-026-03965-z.svg
:target: https://openscicode.org/badge/doi/10.1038/s41398-026-03965-z
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41398-026-03965-z"><img src="https://openscicode.org/badge/doi/10.1038/s41398-026-03965-z.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".
- juryxy/juspace: README.md on GitHub
- UMDataScienceLab/LBMAM_perpca: README.md on GitHub
- Diego999/pyGAT: README.md on GitHub
- Yunheng-Diao/Paper_Code: README.md on GitHub
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.
