OSCR

Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans.

Code ↔ Paper

8 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 8 matches
  1. [1] § Methods › Mendelian randomization ↔ Mendelian Randomization/Bone2Brain.R, lines 100–130 · score 0.93 · MR RAPs, MR Egger, weighted median, simple median, weighted mode, IV
  2. [2] § Methods › Mendelian randomization ↔ Mendelian Randomization/Bone2Brain.R, lines 100–130 · score 0.85 · RadialMR, egger_radial, ivw_radial, alpha, IVs, exposure
  3. [3] § Methods › Genomic SEM ↔ R/rgmodel.R, lines 1–35 · score 0.71 · Genomic SEM, genetic covariance matrix, genetic correlation matrix, score regression, latent, LDSC
  4. [4] § Methods › Genomic SEM ↔ R/paLDSC.R, lines 1–62 · score 0.69 · exploratory factor, genetic correlation matrix, psych, nFactors, parallel, latent
  5. [5] § Methods › Polygenic risk scores ↔ ldscore/jackknife.py, lines 172–261 · score 0.59 · linear regression, independent variable, squared, Covariates
  6. [6] § Results › Causal relationships between bone and brain disorders ↔ Mendelian Randomization/Bone2Brain.R, lines 14–21 · score 0.58 · weak instrument bias, Mendelian randomization, brain
  7. [7] § Methods › Genomic SEM ↔ R/simLDSC.R, lines 61–120 · score 0.52 · MHC region, Genomic SEM, LDSC, score, modeling, matrix
  8. [8] § Methods › Mendelian randomization ↔ Mendelian Randomization/Bone2Brain.R, lines 23–98 · score 0.51 · Mendelian randomization, IVs, exposure, r2, MR, GWAS

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 · 130 lines · 4.7 KB · no license · 4 matches

  1. library(data.table)
  2. library(dplyr)
  3. library(stringr)
  4. library(TwoSampleMR)
  5. library(RadialMR)
  6. library(mr.raps)
  7. library(ieugwasr)
  8. library(plinkbinr)
  9. ####Define Function####
  10. source("/mr_modified.R") # The mr-raps cannot not be conducted in the original function; derived from https://github.com/linjf15/MR_tricks
  11. source("/MRFindEAF.R") # Find effect allele frequency; derived from https://github.com/linjf15/MR_tricks
  12. Prepro <- function(data, threshold_GWAS) {
  13. if ("pval.exposure" %in% names(data)) {
  14. data <- data[data$MAF >= 0.01 & (data$beta.exposure^2 / data$se.exposure^2) > 10, ] # Reduce weak instrument bias
  15. } else if ("pval.outcome" %in% names(data)) {
  16. data <- data[data$pval.outcome > threshold_GWAS, ] # remove the variants strongly associated with outcomes, reducing false positive
  17. }
  18. return(data)
  19. }
  20. Plink <- get_plink_exe() # Get LD matrix using local plink binary and reference dataset
  21. ####Define path####
  22. Exposure_Dir <- "path to Exposure files"
  23. Outcome_Dir <- "path to Outcome files"
  24. Output_Dir <- 'path to save MR estimate results'
  25. ScalePara <- readRDS('Path to Scale files') # Scale beta and SE of bone measures based on phenotypes'SD
  26. #### Define Parameter####
  27. threshold_GWAS <- 5e-8 # Threshold for IVs
  28. ####Run####
  29. filenamesBone <- list.files(path = Exposure_Dir, pattern = "*.txt")
  30. filenamesBrainTraits <- list.files(path = Outcome_Dir, pattern = "*.txt")
  31. epoch = 1
  32. for (exposure_index in filenamesBone) {
  33. exposure <- fread(str_c(Exposure_Dir,exposure_index))
  34. setnames(exposure, new = c('pval'), old = c('P_value'))
  35. exposure <- exposure[which(exposure$pval < threshold_GWAS),]
  36. exposure$rsid <- exposure$ID
  37. ## Scale Beta and SE of bone measures
  38. Scale_SD <- subset(ScalePara,ScalePara==str_extract(exposure_index,"\\d+"))$SD
  39. exposure$BETA <- exposure$BETA/Scale_SD; exposure$SE = exposure$SE/Scale_SD;
  40. ## Clumping
  41. exposure <- ld_clump(
  42. exposure,
  43. clump_kb = 1000,
  44. clump_r2 = 0.001,
  45. plink_bin = Plink,
  46. bfile = "/1kgClump/EUR" #use local file in case of network block
  47. )
  48. exposure <- as.data.frame(exposure)
  49. exposure <- format_data(
  50. dat= exposure,
  51. type= "exposure",
  52. header = TRUE,
  53. snp_col = "rsid",
  54. beta_col = "BETA",
  55. se_col = "SE",
  56. pval_col = "pval",
  57. effect_allele_col = "ALLELE1",
  58. other_allele_col = "ALLELE0",
  59. eaf_col = "A1FREQ",
  60. chr_col = "CHROM",
  61. pos_col = "GENPOS"
  62. )
  63. exposure$MAF <- ifelse(exposure$eaf.exposure > .5, 1-exposure$eaf.exposure, exposure$eaf.exposure)
  64. exposure <- Prepro(exposure,threshold_GWAS)
  65. for (outcome_index in filenamesBrainTraits) {
  66. Outcome <- fread(str_c(Outcome_Dir,outcome_index),fill = TRUE)
  67. Outcome <- Outcome[Outcome$snpid %in% exposure$SNP,]
  68. Outcome$pval <- as.numeric(Outcome$pval)
  69. Outcome <- as.data.frame(Outcome)
  70. Outcome <- format_data(
  71. dat= Outcome,
  72. type= "outcome",
  73. header = TRUE,
  74. snp_col = "snpid",
  75. beta_col = "beta",
  76. se_col = "se",
  77. pval_col = "pval",
  78. effect_allele_col = "A1",
  79. other_allele_col = "A2",
  80. eaf_col = "A1fre"
  81. )
  82. if (any(is.na(Outcome$eaf.outcome))){Outcome = snp_add_eaf(Outcome)}
  83. Outcome <- Prepro(Outcome,threshold_GWAS)
  84. ## Harmonise
  85. mydata <- harmonise_data(
  86. exposure_dat= exposure,
  87. outcome_dat= Outcome,
  88. action= 2)
  89. ## Remove outliers using RadialMR
  90. outliers <- ivw_radial(r_input = mydata, alpha = 0.05, weights = 1, tol = 0.0001, summary = TRUE)
  91. mydata <- mydata[!(mydata$SNP %in% outliers[["outliers"]][["SNP"]]),]
  92. outliers <- egger_radial(r_input = mydata, alpha = 0.05, weights = 1, summary = TRUE)
  93. mydata <- mydata[!(mydata$SNP %in% outliers[["outliers"]][["SNP"]]),]
  94. ## IVW-random effect when IVs more than 3, otherwise -fix effect
  95. if (nrow(mydata)>3){ res <- mr_modified(mydata,method_list = c("mr_ivw_mre","mr_egger_regression", "mr_raps",
  96. "mr_simple_median","mr_weighted_median","mr_penalised_weighted_median",
  97. "mr_simple_mode","mr_weighted_mode","mr_simple_mode_nome","mr_weighted_mode_nome") )
  98. } else if (nrow(mydata)>1) {
  99. res <- mr_modified(mydata,method_list = c("mr_ivw_fe","mr_egger_regression", "mr_raps",
  100. "mr_simple_median","mr_weighted_median","mr_penalised_weighted_median",
  101. "mr_simple_mode","mr_weighted_mode","mr_simple_mode_nome","mr_weighted_mode_nome"))
  102. } else {
  103. res <- mr_modified(mydata,method_list = c("mr_wald_ratio"))} # note: MR estimate with only 1 IV will not be considered
  104. epoch <- epoch+1
  105. }
  106. }

Bone2Brain.R at commit bb3e75c, no license · at the source

Overview

Authors: Lei Zhao1,2, Yilan Tang1,2, Wenhui Zhao3, Shijiani Li1,2, Jie Chen1,2, Tian Ge4,5,6, Yiheng Tu1,2
  1. State Key Laboratory of Cognitive Science and Mental Health, Institute of Psychology, Chinese Academy of Sciences,Beijing, China
  2. Department of Psychology, University of Chinese Academy of Sciences,Beijing, China
  3. Leonard Davis School of Gerontology, University of Southern California,Los Angeles, CA USA
  4. Psychiatric and Neurodevelopmental Genetics Unit, Center for Genomic Medicine, Massachusetts General Hospital,Boston, MA USA
  5. Center for Precision Psychiatry, Department of Psychiatry, Massachusetts General Hospital,Boston, MA USA
  6. Stanley Center for Psychiatric Research, Broad Institute of MIT and Harvard,Cambridge, MA USA
Journal: Nature communications, volume 17, issue 1, article 6789
Dates: received 2 May 2025; accepted 9 May 2026; published online 25 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-73428-y · PMID 42185266 · PMCID PMC13385815 · OpenAlex W7162325142
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Connectivity, fMRI & imaging, Preprocessing
Keywords: Genome-wide association studies, Genetics of the nervous system, Bone
MeSH: Bone and Bones*, Brain*, Aged, Female, Genetic Heterogeneity, Genome-Wide Association Study, Humans, Male, Middle Aged, Phenotype, Polymorphism, Single Nucleotide, Wnt Signaling Pathway (* major topic)
Topic: Genetic Associations and Epidemiology (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Citations: not cited yet (Europe PMC); 145 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 8 matches between paragraphs and lines of code.

bulik/ldsc

License: GPL-3.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 2fdeeb3b44379408794154993dbd6101b8946b7e, 16 January 2026
Languages: Python (19), MATLAB (4), Perl (1), R (1)
Size: 1,093 files, 25 scripts
Software Heritage: archived
Found in: the text, “GWAS of bone measures”
Holds: README, license file, environment (environment.yml, requirements.txt, setup.py), tests
Not found: CITATION.cff, continuous integration, documentation
Tools: NumPy (18 files), pandas (11 files), SciPy (5 files), BEDTools (2 files)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
27 files
At the source: github.com/bulik/ldsc

GenomicSEM/GenomicSEM

License: GPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 6b65ca5db39fdade08b0d811477be1cdd57b5039, 26 August 2026
Languages: R (32)
Size: 82 files, 32 scripts
Software Heritage: not archived
Found in: the text, “Genomic SEM”
Holds: README, license file, environment (DESCRIPTION), documentation
Not found: CITATION.cff, tests, continuous integration
Tools: tidyverse (4 files), data.table (3 files), ggplot2 (2 files), ggpubr (2 files), lavaan (2 files), psych (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
34 files

tulab-brain/Bone-Brain-connections

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: bb3e75ce1e3069324131703714eb09e2320639c2, 27 May 2026
Languages: R (3), Shell (2)
Size: 14 files, 5 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: data.table (2 files), tidyverse (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
6 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/s41467-026-73428-y.

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:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 62 scripts, each with its path and the digest of its content;
  • 8 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

Datasets cited

Data availability statement

The paper has a 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/s41467-026-73428-y.

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 2, 28 September 2026

  • Funding: added China Association for Science and Technology: E1KX0210; National Natural Science Foundation of China: 32171078, E2CX4015, 32322035; Chinese Academy of Sciences: E0CX5210, E2CX4015; Institute of Psychology, Chinese Academy of Sciences

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 3 keywords, 12 MeSH terms, 144 references.

Cite

This paper

Zhao, L., Tang, Y., Zhao, W., Li, S., Chen, J., Ge, T., & Tu, Y. (2026). Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans. Nature communications, 17(1), 6789. https://doi.org/10.1038/s41467-026-73428-y

BibTeX

@article{zhao2026regional,
author = {Zhao, Lei and Tang, Yilan and Zhao, Wenhui and Li, Shijiani and Chen, Jie and Ge, Tian and Tu, Yiheng},
title = {{Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {6789},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-73428-y},
url = {https://doi.org/10.1038/s41467-026-73428-y},
pmid = {42185266},
pmcid = {PMC13385815}
}

RIS

TY - JOUR
AU - Zhao, Lei
AU - Tang, Yilan
AU - Zhao, Wenhui
AU - Li, Shijiani
AU - Chen, Jie
AU - Ge, Tian
AU - Tu, Yiheng
TI - Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/05/25
VL - 17
IS - 1
SP - 6789
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-73428-y
UR - https://doi.org/10.1038/s41467-026-73428-y
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-73428-y",
"type": "article-journal",
"title": "Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans",
"container-title": "Nature communications",
"author": [
{
"family": "Zhao",
"given": "Lei"
},
{
"family": "Tang",
"given": "Yilan"
},
{
"family": "Zhao",
"given": "Wenhui"
},
{
"family": "Li",
"given": "Shijiani"
},
{
"family": "Chen",
"given": "Jie"
},
{
"family": "Ge",
"given": "Tian"
},
{
"family": "Tu",
"given": "Yiheng"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "6789",
"DOI": "10.1038/s41467-026-73428-y",
"PMID": "42185266",
"PMCID": "PMC13385815",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-73428-y",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
25
]
]
}
}

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-72164-7 [code]
Multivariate genetic analysis reveals three distinct pathological dimensions in musculoskeletal disorders.
Journal: Nature communications
In common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, 9 references
[2] doi:10.1038/s41467-026-73996-z [code]
Genetic architecture of white matter microstructure captured by unsupervised deep representation learning of fractional anisotropy maps.
Journal: Nature communications
In common: ggplot2, tidyverse, pandas, 2 other tools, genetics / omics, cellular / molecular, 12 references
[3] doi:10.1038/s41562-026-02486-5 [code]
Genome-wide association studies of infant and toddler temperament in European and multi-ancestry populations.
Journal: Nature human behaviour
In common: psych, data.table, ggplot2, 4 other tools, genetics / omics, 10 references
[4] doi:10.1038/s42003-026-10131-0 [code]
Shared genetic architecture between the topology of brain white matter structural connectome and fluid intelligence.
Journal: Communications biology
In common: BEDTools, data.table, pandas, 2 other tools, genetics / omics, 11 references
[5] doi:10.1038/s43856-026-01510-z [code]
Mapping genetic convergence across brain structure, mental health, and cardiometabolic disease.
Journal: Communications medicine
In common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, 4 references
[6] doi:10.1038/s41467-026-71682-8 [code]
GWAS meta-analysis of cerebrospinal fluid Alzheimer's biomarkers reveals loci regulating lipids, brain volume and autophagy.
Journal: Nature communications
In common: BEDTools, data.table, ggplot2, 4 other tools, genetics / omics, 7 references
[7] doi:10.1038/s41562-026-02476-7 [code]
Genome-wide meta-analysis of quantitatively measured generalized anxiety symptoms in individuals of European ancestry.
Journal: Nature human behaviour
In common: lavaan, BEDTools, psych, 2 other tools, genetics / omics, 6 references
[8] 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, ggplot2, tidyverse, genetics / omics, cellular / molecular, 9 references
[9] doi:10.1038/s41467-026-71738-9 [code]
Genetic landscape of adult executive function reveals a cell-type-specific developmental origin.
Journal: Nature communications
In common: psych, ggpubr, data.table, 2 other tools, genetics / omics, 7 references
[10] doi:10.1038/s41467-026-76676-0 [code]
Determinants of functional burden pleiotropy and gene dosage responses across human traits.
Journal: Nature communications
In common: ggpubr, data.table, ggplot2, 4 other tools, genetics / omics, cellular / molecular, 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.