OSCR

Shared genetic and neuroimmune architecture links type 1 diabetes with neurocognitive traits.

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] § Methods › Mendelian randomization analyses › Sensitivity analyses ↔ MR/MR.R, lines 79–145 · score 0.68 · MR Egger regression, weighted median, IVW, exposure, pleiotropy
  2. [2] § Results › Bidirectional Mendelian randomization identifies directional and reciprocal associations between T1D and neurocognitive traits ↔ MR/MR.R, lines 79–145 · score 0.67 · Odds ratios, MR Egger, weighted median, standard errors, IVW
  3. [3] § Methods › Mendelian randomization analyses › Instrument selection and harmonization ↔ MR/MR.R, lines 36–77 · score 0.61 · LD clumping, genome wide, IVs, r2, alleles, exposure
  4. [4] § Methods › Study datasets and quality control ↔ conjFDR/step2_run_pleioFDR.sh, lines 84–148 · score 0.54 · minor allele frequency, MAF, ambiguous, LD, SNPs

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

R · 145 lines · 5 KB · no license · 3 matches

  1. # --- mr_T1D_to_PD.R ---
  2. # One-shot bidirectional MR: T1D (exposure) -> PD (outcome)
  3. # IVs: P < 5e-8, F >= 10; LD clumping r2 < 0.001 (other clump params default)
  4. library(TwoSampleMR)
  5. library(data.table)
  6. library(openxlsx)
  7. library(genetics.binaRies)
  8. setDTthreads(threads = 0)
  9. # ========= Paths (edit if needed) =========
  10. gwas_dir <- "/vast/palmer/pi/alagpulinsa/Annie/T1D_ALL_HT/GWAS/GWAS"
  11. exposure_file <- file.path(gwas_dir, "T1D.tsv") # exposure: T1D
  12. outcome_file <- file.path(gwas_dir, "PD.tsv") # outcome: PD
  13. # PLINK and LD reference (EUR) for clumping
  14. plink_bin <- genetics.binaRies::get_plink_binary()
  15. ld_ref_bfile <- "/vast/palmer/pi/alagpulinsa/Annie/tools/MR/EUR"
  16. # Output
  17. output_dir <- "/vast/palmer/pi/alagpulinsa/Annie/T1D_ALL_HT/mr_result/T1D_to_PD"
  18. dir.create(output_dir, showWarnings = FALSE, recursive = TRUE)
  19. out_xlsx <- file.path(output_dir, "T1D_PD.xlsx")
  20. # ========= Helper: odds ratios sheet =========
  21. add_or_sheet <- function(wb, mr_res, sheet = "odds_ratios") {
  22. if (is.null(mr_res) || nrow(mr_res) == 0) return(invisible(NULL))
  23. or_tab <- tryCatch(generate_odds_ratios(mr_res), error = function(e) NULL)
  24. if (!is.null(or_tab)) {
  25. addWorksheet(wb, sheet)
  26. writeData(wb, sheet, or_tab)
  27. }
  28. }
  29. # ========= 1) Build exposure IVs (T1D) =========
  30. message("Reading exposure (T1D) from: ", exposure_file)
  31. exp_raw <- fread(exposure_file)
  32. # Standardize to TwoSampleMR format
  33. exp_dt <- data.table(
  34. SNP = exp_raw$variant_id,
  35. chr.exposure = exp_raw$chromosome,
  36. pos.exposure = exp_raw$base_pair_location,
  37. effect_allele.exposure = exp_raw$effect_allele,
  38. other_allele.exposure = exp_raw$other_allele,
  39. eaf.exposure = exp_raw$effect_allele_frequency,
  40. beta.exposure = exp_raw$beta,
  41. se.exposure = exp_raw$standard_error,
  42. pval.exposure = exp_raw$p_value,
  43. exposure = "T1D",
  44. mr_keep.exposure = TRUE,
  45. pval_origin.exposure = "reported",
  46. id.exposure = "T1D",
  47. data_source.exposure = "textfile"
  48. )
  49. # Remove duplicates and apply genome-wide significance + F-stat >= 10
  50. exp_dt <- exp_dt[!duplicated(SNP)]
  51. exp_dt[, F_stat := (beta.exposure / se.exposure)^2]
  52. exp_dt <- exp_dt[pval.exposure < 5e-8 & F_stat >= 10]
  53. if (nrow(exp_dt) == 0L) {
  54. stop("No genome-wide significant (P<5e-8) and strong (F>=10) SNPs for T1D.")
  55. }
  56. message("Candidate IVs before clumping: ", nrow(exp_dt))
  57. # LD clumping at r2 < 0.001; all other clump params: defaults
  58. exp_iv <- clump_data(
  59. exp_dt,
  60. bfile = ld_ref_bfile,
  61. plink_bin = plink_bin,
  62. clump_r2 = 0.001
  63. )
  64. if (nrow(exp_iv) == 0L) stop("No instruments left after LD clumping (r2<0.001).")
  65. message("IVs after clumping: ", nrow(exp_iv))
  66. # ========= 2) Load outcome data (PD) on IV SNPs =========
  67. message("Reading outcome (PD) from: ", outcome_file)
  68. out_dat <- read_outcome_data(
  69. filename = outcome_file,
  70. snps = exp_iv$SNP,
  71. sep = "\t",
  72. snp_col = "variant_id",
  73. beta_col = "beta",
  74. se_col = "standard_error",
  75. effect_allele_col = "effect_allele",
  76. other_allele_col = "other_allele",
  77. pval_col = "p_value"
  78. )
  79. out_dat$id.outcome <- "PD"
  80. # ========= 3) Harmonise =========
  81. H <- harmonise_data(exposure_dat = exp_iv, outcome_dat = out_dat)
  82. message("SNPs before harmonisation: ", nrow(exp_iv))
  83. message("SNPs retained (mr_keep==TRUE) pre-NA filtering: ", sum(H$mr_keep == TRUE, na.rm = TRUE))
  84. # Keep valid rows
  85. H <- H[H$mr_keep == TRUE, ]
  86. H <- H[complete.cases(H$beta.exposure, H$beta.outcome, H$se.exposure, H$se.outcome), ]
  87. nsnp <- nrow(H)
  88. message("SNPs retained after filtering: ", nsnp)
  89. if (nsnp == 0L) stop("No SNPs remain for MR after harmonisation and filtering.")
  90. # ========= 4) Run MR (no iteration; one analysis) =========
  91. # Methods: choose minimally necessary set; if nsnp == 1 → Wald ratio. Otherwise use defaults below.
  92. method_list <- if (nsnp == 1L) {
  93. c("mr_wald_ratio")
  94. } else {
  95. c("mr_ivw_mre", "mr_weighted_median", "mr_egger_regression")
  96. }
  97. mr_res <- mr(H, method_list = method_list)
  98. # ========= 5) (Optional by defaults) Heterogeneity / Pleiotropy when applicable =========
  99. hetero <- if (nsnp > 1L) tryCatch(mr_heterogeneity(H), error = function(e) NULL) else NULL
  100. pleio <- if (nsnp > 2L) tryCatch(mr_pleiotropy_test(H), error = function(e) NULL) else NULL
  101. # ========= 6) Save results =========
  102. wb <- createWorkbook()
  103. add_or_sheet(wb, mr_res, sheet = "odds_ratios")
  104. # Also keep main MR table
  105. if (!is.null(mr_res) && nrow(mr_res) > 0) {
  106. addWorksheet(wb, "mr_results")
  107. writeData(wb, "mr_results", mr_res)
  108. }
  109. # Diagnostics if available
  110. if (!is.null(hetero)) {
  111. addWorksheet(wb, "heterogeneity_test")
  112. writeData(wb, "heterogeneity_test", hetero)
  113. }
  114. if (!is.null(pleio)) {
  115. addWorksheet(wb, "pleiotropy_test")
  116. writeData(wb, "pleiotropy_test", pleio)
  117. }
  118. # Always save harmonised data
  119. addWorksheet(wb, "H_data")
  120. writeData(wb, "H_data", H)
  121. saveWorkbook(wb, out_xlsx, overwrite = TRUE)
  122. message("Saved MR results to: ", out_xlsx)

MR.R at commit fa04ad4, no license · at the source

Overview

Authors: Priscilla Saarah1,2, Zehra A. Syeda1,2, Ziang Xu1,2, Yikai Dong1,2, Habei Jiang1,2, Michelle Shanguhyia1,2, Sourav Roy1,2, Biqing Zhu3, Le Zhang4,5, Andrew T. Dewan6,7, Samira Asgari8,9, David A. Alagpulinsa1,2
  1. Yale Center for Molecular & Systems Metabolism, Yale University School of Medicine,New Haven, CT USA
  2. Department of Comparative Medicine, Yale University School of Medicine,New Haven, CT USA
  3. Program of Computational Biology and Bioinformatics, Yale University,New Haven, CT 06510 USA
  4. Department of Neurology, Yale University School of Medicine,New Haven, CT USA
  5. Department of Neuroscience, Yale University School of Medicine,New Haven, CT USA
  6. Department of Chronic Disease Epidemiology, Yale School of Public Health,New Haven, CT USA
  7. Center for Perinatal, Pediatric and Environmental Epidemiology, Yale School of Public Health,New Haven, CT USA
  8. Institute for Genomic Health, Icahn School of Medicine at Mount Sinai,New York, NY USA
  9. Department of Genetics and Genomic Sciences, Icahn School of Medicine at Mount Sinai,New York, NY USA
Institutions: Yale University (United States); Icahn School of Medicine at Mount Sinai (United States)
Journal: Nature communications, volume 17, issue 1, article 4057
Dates: received 26 September 2025; accepted 3 March 2026; published online 13 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-70694-8 · PMID 41826324 · PMCID PMC13139607 · OpenAlex W7135213093
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), other condition (population), Alzheimer's / dementia (population), multiple sclerosis (population), bipolar (population), cellular / molecular (subfield)
Methods: Statistics
Keywords: Disease genetics, Genetics, Genetics of the nervous system, Type 1 diabetes
MeSH: Diabetes Mellitus, Type 1*, Alzheimer Disease, Bipolar Disorder, Brain, Female, Genetic Predisposition to Disease, Genome-Wide Association Study, Humans, Intelligence, Male, Microglia, Multiple Sclerosis, Myasthenia Gravis, Neuroimmunomodulation, Polymorphism, Single Nucleotide (* major topic)
Topic: Diabetes and associated disorders (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: Breadkthrough T1D, 5-CDA-2025-1682-S-B
Citations: cited by 3 papers (Europe PMC); 82 references in the paper

Abstract

Type 1 diabetes, particularly with childhood onset, is associated with altered neurocognitive traits, yet the underlying biological mechanisms are unclear. Here, we integrate genome-wide association results with single-cell epigenomic profiles and show that type 1 diabetes heritability is enriched in accessible chromatin of human brain-resident cells, most notably microglia, across neurodevelopment into adulthood. Bonferroni-corrected cross-trait genetic correlation analyses reveal negative correlations of type 1 diabetes with intelligence, executive function, and bipolar disorder, and a positive correlation with myasthenia gravis. Conjunctional false discovery rate analysis identifies pleiotropic loci jointly influencing type 1 diabetes and neurocognitive traits, including the 17q21.31 neurogenomic hub. Mendelian randomization further demonstrates protective effects of educational attainment, intelligence, Alzheimer’s disease, and bipolar disorder on type 1 diabetes risk, whereas liability to multiple sclerosis and myasthenia gravis increases type 1 diabetes risk. In the reverse direction, liability to type 1 diabetes is associated with increased risk of myasthenia gravis. We identify several gene expression regulatory variants in brain and immune cells that jointly influence type 1 diabetes and neurocognitive traits, some of which show concordant differential expression in disease-affected versus control tissue. Together, these findings highlight pleiotropic genetic and neuroimmune mechanisms that link type 1 diabetes with cognition and neuropsychiatric disease risk.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

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

AlagsLabTeam/T1D-NEURO

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: fa04ad4e311f10779fdf2f3a04c53b270ba32d6e, 11 September 2025
Languages: Shell (6), R (3)
Size: 10 files, 9 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: data.table (2 files), igraph (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
10 files

Zenodo 18793533

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: data.table (2 files), igraph (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
10 files
At the source:

Code availability

Code for this study is available at GitHub (https://github.com/AlagsLabTeam/T1D-NEURO) and archived at Zenodo82.

Reproduced under the paper's license (CC BY), from the paper cited above.

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:

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

No dataset and no data link were found in the paper.

Data availability

Genome-wide association study (GWAS) summary statistics used in this study are publicly available from the original consortia and repositories listed in Supplementary Table 1, with accession links and/or PMIDs provided. Single-cell ATAC-seq and RNA-seq data are available from the referenced studies as indicated in the Methods. Processed data generated in this work, including results from LDSC, MiXeR, conjunctional false discovery rate, SMR/HEIDI, and Mendelian randomization analyses, are provided in the Supplementary Tables. Source data are provided with this paper.

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

Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 4 keywords, 15 MeSH terms, 1 funder, 81 references.

Cite

This paper

Saarah, P., Syeda, Z. A., Xu, Z., Dong, Y., Jiang, H., Shanguhyia, M., Roy, S., Zhu, B., Zhang, L., Dewan, A. T., Asgari, S., & Alagpulinsa, D. A. (2026). Shared genetic and neuroimmune architecture links type 1 diabetes with neurocognitive traits. Nature communications, 17(1), 4057. https://doi.org/10.1038/s41467-026-70694-8

BibTeX

@article{saarah2026shared,
author = {Saarah, Priscilla and Syeda, Zehra A. and Xu, Ziang and Dong, Yikai and Jiang, Habei and Shanguhyia, Michelle and Roy, Sourav and Zhu, Biqing and Zhang, Le and Dewan, Andrew T. and Asgari, Samira and Alagpulinsa, David A.},
title = {{Shared genetic and neuroimmune architecture links type 1 diabetes with neurocognitive traits}},
journal = {Nature communications},
year = {2026},
month = mar,
volume = {17},
number = {1},
pages = {4057},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-70694-8},
url = {https://doi.org/10.1038/s41467-026-70694-8},
pmid = {41826324},
pmcid = {PMC13139607}
}

RIS

TY - JOUR
AU - Saarah, Priscilla
AU - Syeda, Zehra A.
AU - Xu, Ziang
AU - Dong, Yikai
AU - Jiang, Habei
AU - Shanguhyia, Michelle
AU - Roy, Sourav
AU - Zhu, Biqing
AU - Zhang, Le
AU - Dewan, Andrew T.
AU - Asgari, Samira
AU - Alagpulinsa, David A.
TI - Shared genetic and neuroimmune architecture links type 1 diabetes with neurocognitive traits
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/03/13
VL - 17
IS - 1
SP - 4057
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-70694-8
UR - https://doi.org/10.1038/s41467-026-70694-8
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-70694-8",
"type": "article-journal",
"title": "Shared genetic and neuroimmune architecture links type 1 diabetes with neurocognitive traits",
"container-title": "Nature communications",
"author": [
{
"family": "Saarah",
"given": "Priscilla"
},
{
"family": "Syeda",
"given": "Zehra A."
},
{
"family": "Xu",
"given": "Ziang"
},
{
"family": "Dong",
"given": "Yikai"
},
{
"family": "Jiang",
"given": "Habei"
},
{
"family": "Shanguhyia",
"given": "Michelle"
},
{
"family": "Roy",
"given": "Sourav"
},
{
"family": "Zhu",
"given": "Biqing"
},
{
"family": "Zhang",
"given": "Le"
},
{
"family": "Dewan",
"given": "Andrew T."
},
{
"family": "Asgari",
"given": "Samira"
},
{
"family": "Alagpulinsa",
"given": "David A."
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "4057",
"DOI": "10.1038/s41467-026-70694-8",
"PMID": "41826324",
"PMCID": "PMC13139607",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-70694-8",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
13
]
]
}
}

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/s43856-026-01510-z [code]
Mapping genetic convergence across brain structure, mental health, and cardiometabolic disease.
Journal: Communications medicine
In common: data.table, tidyverse, genetics / omics, other condition, 9 references
[2] doi:10.1371/journal.pcbi.1014422 [code]
Deciphering cell type-specific causal genetic effects on brain imaging-derived phenotypes and disorders with single-cell Mendelian randomization.
Journal: PLoS computational biology
In common: data.table, tidyverse, genetics / omics, cellular / molecular, 7 references
[3] doi:10.1186/s12967-026-08266-z [code]
Single-cell multi-omic integration analysis prioritizes druggable genes and reveals cell-type-specific causal effects in glioblastomagenesis.
Journal: Journal of translational medicine
In common: igraph, data.table, tidyverse, genetics / omics, other condition, cellular / molecular, 5 references
[4] doi:10.1097/md.0000000000050109
The gut-immune-brain axis in CNS tumors: Causal roles of microbiota and inflammatory proteins unveiled by Mendelian randomization and single-cell transcriptomics.
Journal: Medicine
In common: genetics / omics, other condition, cellular / molecular, 6 references
[5] doi:10.1073/pnas.2609814123 [code]
Genetic architectures of brain-related traits are shaped by strong selective constraints.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: data.table, tidyverse, genetics / omics, cellular / molecular, 5 references
[6] doi:10.1002/brb3.71366
Integrative Multi-Omics Mendelian Randomization Highlights Causal Autophagy-Related Genes for Amyotrophic Lateral Sclerosis.
Journal: Brain and behavior
In common: genetics / omics, other condition, cellular / molecular, 6 references
[7] doi:10.1002/gps3.70017 [code]
Shared genetic variants across substance use disorders implicate common neurobiological pathways, a genome-wide mixed methods study.
Journal: General psychiatry
In common: data.table, genetics / omics, other condition, cellular / molecular, 5 references
[8] doi:10.1038/s41467-026-70374-7 [code]
scTWAS: a powerful statistical framework for single-cell transcriptome-wide association studies.
Journal: Nature communications
In common: data.table, tidyverse, Alzheimer's / dementia, genetics / omics, cellular / molecular, 4 references
[9] doi:10.21203/rs.3.rs-10380518/v1 [code]
Shared Genetic Architecture of Premenstrual Disorder and Postpartum Depression: Registry-Based and Genetic Evidence
Journal: Research Square (preprint)
In common: data.table, genetics / omics, cellular / molecular, 5 references
[10] doi:10.1038/s41380-026-03571-x [code]
Convergent coexpression reveals shared biological mechanisms underlying common and rare variant risk in six neuropsychiatric disorders.
Journal: Molecular psychiatry
In common: igraph, data.table, tidyverse, genetics / omics, cellular / molecular, 3 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.