Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans.
7 blocks of code here have 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 8 matches
- [1] § Methods › Mendelian randomization ↔ Mendelian Randomization/Bone2Brain.R, lines 100 to 130 · score 0.93 · MR RAPs, MR Egger, weighted median, simple median, weighted mode, IV · block
oscr:b:KN8KJBX149PE1-4· Report a mismatch - [2] § Methods › Mendelian randomization ↔ Mendelian Randomization/Bone2Brain.R, lines 100 to 130 · score 0.85 · RadialMR, egger_radial, ivw_radial, alpha, IVs, exposure · block
oscr:b:KN8KJBX149PE1-4· Report a mismatch - [3] § Methods › Genomic SEM ↔ R/rgmodel.R, lines 1 to 35 · score 0.71 · Genomic SEM, genetic covariance matrix, genetic correlation matrix, score regression, latent, LDSC · block
oscr:b:EP0WN9JGN6121-V· Report a mismatch - [4] § Methods › Genomic SEM ↔ R/paLDSC.R, lines 1 to 62 · score 0.69 · exploratory factor, genetic correlation matrix, psych, nFactors, parallel, latent · block
oscr:b:ADGG5Y9S7MEAG-F· Report a mismatch - [5] § Methods › Polygenic risk scores ↔ ldscore/jackknife.py, lines 172 to 261 · score 0.59 · linear regression, independent variable, squared, Covariates · block
oscr:b:0678Q46KK1RE3-3· Report a mismatch - [6] § Results › Causal relationships between bone and brain disorders ↔ Mendelian Randomization/Bone2Brain.R, lines 14 to 21 · score 0.58 · weak instrument bias, Mendelian randomization, brain · block
oscr:b:WJQBG1A7ACGA4-R· Report a mismatch - [7] § Methods › Genomic SEM ↔ R/simLDSC.R, lines 61 to 120 · score 0.52 · MHC region, Genomic SEM, LDSC, score, modeling, matrix · block
oscr:b:RT18X248PGNTH-V· Report a mismatch - [8] § Methods › Mendelian randomization ↔ Mendelian Randomization/Bone2Brain.R, lines 23 to 98 · score 0.51 · Mendelian randomization, IVs, exposure, r2, MR, GWAS · block
oscr:b:9Y5BKCP3QJKAQ-U· 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
R · 130 lines · 4.7 KB · no license · 4 matches
- library(data.table)
- library(dplyr)
- library(stringr)
- library(TwoSampleMR)
- library(RadialMR)
- library(mr.raps)
- library(ieugwasr)
- library(plinkbinr)
- ####Define Function####
- source("/mr_modified.R") # The mr-raps cannot not be conducted in the original function; derived from https://github.com/linjf15/MR_tricks
- source("/MRFindEAF.R") # Find effect allele frequency; derived from https://github.com/linjf15/MR_tricks
- Prepro <- function(data, threshold_GWAS) {
- if ("pval.exposure" %in% names(data)) {
- data <- data[data$MAF >= 0.01 & (data$beta.exposure^2 / data$se.exposure^2) > 10, ] # Reduce weak instrument bias
- } else if ("pval.outcome" %in% names(data)) {
- data <- data[data$pval.outcome > threshold_GWAS, ] # remove the variants strongly associated with outcomes, reducing false positive
- }
- return(data)
- }
- Plink <- get_plink_exe() # Get LD matrix using local plink binary and reference dataset
- ####Define path####
- Exposure_Dir <- "path to Exposure files"
- Outcome_Dir <- "path to Outcome files"
- Output_Dir <- 'path to save MR estimate results'
- ScalePara <- readRDS('Path to Scale files') # Scale beta and SE of bone measures based on phenotypes'SD
- #### Define Parameter####
- threshold_GWAS <- 5e-8 # Threshold for IVs
- ####Run####
- filenamesBone <- list.files(path = Exposure_Dir, pattern = "*.txt")
- filenamesBrainTraits <- list.files(path = Outcome_Dir, pattern = "*.txt")
- epoch = 1
- for (exposure_index in filenamesBone) {
- exposure <- fread(str_c(Exposure_Dir,exposure_index))
- setnames(exposure, new = c('pval'), old = c('P_value'))
- exposure <- exposure[which(exposure$pval < threshold_GWAS),]
- exposure$rsid <- exposure$ID
- ## Scale Beta and SE of bone measures
- Scale_SD <- subset(ScalePara,ScalePara==str_extract(exposure_index,"\\d+"))$SD
- exposure$BETA <- exposure$BETA/Scale_SD; exposure$SE = exposure$SE/Scale_SD;
- ## Clumping
- exposure <- ld_clump(
- exposure,
- clump_kb = 1000,
- clump_r2 = 0.001,
- plink_bin = Plink,
- bfile = "/1kgClump/EUR" #use local file in case of network block
- )
- exposure <- as.data.frame(exposure)
- exposure <- format_data(
- dat= exposure,
- type= "exposure",
- header = TRUE,
- snp_col = "rsid",
- beta_col = "BETA",
- se_col = "SE",
- pval_col = "pval",
- effect_allele_col = "ALLELE1",
- other_allele_col = "ALLELE0",
- eaf_col = "A1FREQ",
- chr_col = "CHROM",
- pos_col = "GENPOS"
- )
- exposure$MAF <- ifelse(exposure$eaf.exposure > .5, 1-exposure$eaf.exposure, exposure$eaf.exposure)
- exposure <- Prepro(exposure,threshold_GWAS)
- for (outcome_index in filenamesBrainTraits) {
- Outcome <- fread(str_c(Outcome_Dir,outcome_index),fill = TRUE)
- Outcome <- Outcome[Outcome$snpid %in% exposure$SNP,]
- Outcome$pval <- as.numeric(Outcome$pval)
- Outcome <- as.data.frame(Outcome)
- Outcome <- format_data(
- dat= Outcome,
- type= "outcome",
- header = TRUE,
- snp_col = "snpid",
- beta_col = "beta",
- se_col = "se",
- pval_col = "pval",
- effect_allele_col = "A1",
- other_allele_col = "A2",
- eaf_col = "A1fre"
- )
- if (any(is.na(Outcome$eaf.outcome))){Outcome = snp_add_eaf(Outcome)}
- Outcome <- Prepro(Outcome,threshold_GWAS)
- ## Harmonise
- mydata <- harmonise_data(
- exposure_dat= exposure,
- outcome_dat= Outcome,
- action= 2)
- ## Remove outliers using RadialMR
- outliers <- ivw_radial(r_input = mydata, alpha = 0.05, weights = 1, tol = 0.0001, summary = TRUE)
- mydata <- mydata[!(mydata$SNP %in% outliers[["outliers"]][["SNP"]]),]
- outliers <- egger_radial(r_input = mydata, alpha = 0.05, weights = 1, summary = TRUE)
- mydata <- mydata[!(mydata$SNP %in% outliers[["outliers"]][["SNP"]]),]
- ## IVW-random effect when IVs more than 3, otherwise -fix effect
- if (nrow(mydata)>3){ res <- mr_modified(mydata,method_list = c("mr_ivw_mre","mr_egger_regression", "mr_raps",
- "mr_simple_median","mr_weighted_median","mr_penalised_weighted_median",
- "mr_simple_mode","mr_weighted_mode","mr_simple_mode_nome","mr_weighted_mode_nome") )
- } else if (nrow(mydata)>1) {
- res <- mr_modified(mydata,method_list = c("mr_ivw_fe","mr_egger_regression", "mr_raps",
- "mr_simple_median","mr_weighted_median","mr_penalised_weighted_median",
- "mr_simple_mode","mr_weighted_mode","mr_simple_mode_nome","mr_weighted_mode_nome"))
- } else {
- res <- mr_modified(mydata,method_list = c("mr_wald_ratio"))} # note: MR estimate with only 1 IV will not be considered
- epoch <- epoch+1
- }
- }
Bone2Brain.R at commit bb3e75c, no license · at the source
Overview
- State Key Laboratory of Cognitive Science and Mental Health, Institute of Psychology, Chinese Academy of Sciences,Beijing, China
- Department of Psychology, University of Chinese Academy of Sciences,Beijing, China
- Leonard Davis School of Gerontology, University of Southern California,Los Angeles, CA USA
- Psychiatric and Neurodevelopmental Genetics Unit, Center for Genomic Medicine, Massachusetts General Hospital,Boston, MA USA
- Center for Precision Psychiatry, Department of Psychiatry, Massachusetts General Hospital,Boston, MA USA
- Stanley Center for Psychiatric Research, Broad Institute of MIT and Harvard,Cambridge, MA USA
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
2fdeeb3b44379408794154993dbd6101b8946b7e, 16 January 2026Availability: 2 checks, the latest on 26 October 2026: the link answers
- 26 October 2026: the link answers
- 26 September 2026: the link answers
27 files
- ContinuousAnnotations/
quantile_M.pl , Perl, 241 lines - ContinuousAnnotations/
quantile_h2g.r , R, 76 lines - ldsc.py, Python, 660 lines
- ldscore/
__init__.py , Python, 1 line - ldscore/
irwls.py , Python, 196 lines - ldscore/
jackknife.py , Python, 514 lines, 1 match - ldscore/
ldscore.py , Python, 415 lines - ldscore/
parse.py , Python, 292 lines - ldscore/
regressions.py , Python, 743 lines - ldscore/
sumstats.py , Python, 581 lines - make_annot.py, Python, 56 lines
- munge_sumstats.py, Python, 745 lines
- setup.py, Python, 20 lines
- test/
parse_test/ , MATLAB, 1 linetest.l2.M - test/
parse_test/ , MATLAB, 1 linetest1.l2.M - test/
parse_test/ , MATLAB, 1 linetest2.l2.M - test/
parse_test/ , MATLAB, 1 linetest_bad.l2.M - test/
simulate.py , Python, 81 lines - test/
test_irwls.py , Python, 69 lines - test/
test_jackknife.py , Python, 267 lines - test/
test_ldscore.py , Python, 111 lines - test/
test_munge_sumstats.py , Python, 358 lines - test/
test_parse.py , Python, 129 lines - test/
test_regressions.py , Python, 342 lines - test/
test_sumstats.py , Python, 487 lines - LICENSE, License, 675 lines
- README.md, Text, 122 lines
GenomicSEM/GenomicSEM
da95d431a4709693d07eae55e172ade55526948b, 28 September 2026Availability: 2 checks, the latest on 4 November 2026: the link answers
- 4 November 2026: the link answers
- 27 September 2026: the link answers
34 files
- R/
addGenes.R , R, 143 lines - R/
addSNPs.R , R, 267 lines - R/
commonfactor.R , R, 403 lines - R/
commonfactorGWAS.R , R, 276 lines - R/
commonfactorGWAS_main.R , R, 216 lines - R/
enrich.R , R, 611 lines - R/
hdl.R , R, 524 lines - R/
indexS.R , R, 51 lines - R/
ldsc.R , R, 583 lines - R/
localSRMD.R , R, 22 lines - R/
multiGene.R , R, 349 lines - R/
multiSNP.R , R, 364 lines - R/
munge.R , R, 109 lines - R/
munge_main.R , R, 138 lines - R/
paLDSC.R , R, 380 lines, 1 match - R/
qtrait.r , R, 738 lines - R/
read_fusion.R , R, 99 lines - R/
rgmodel.R , R, 1,063 lines, 1 match - R/
s_ldsc.R , R, 851 lines - R/
simLDSC.R , R, 225 lines, 1 match - R/
subSV.R , R, 77 lines - R/
summaryGLS.R , R, 57 lines - R/
summaryGLSbands.R , R, 271 lines - R/
sumstats.R , R, 142 lines - R/
sumstats_main.R , R, 226 lines - R/
userGWAS.R , R, 490 lines - R/
userGWAS_main.R , R, 405 lines - R/
userGWASa.r , R, 388 lines - R/
usermodel.R , R, 685 lines - R/
utils.R , R, 226 lines - R/
utils_sanitychecks.R , R, 67 lines - R/
write.model.R , R, 108 lines - LICENSE, License, 621 lines
- README.md, Text, 99 lines
tulab-brain/Bone-Brain-connections
bb3e75ce1e3069324131703714eb09e2320639c2, 27 May 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
6 files
- Genetic Correlation/
gc_Bone_BoneTrait.sh , Shell, 29 lines - GenomicSEM/
GenomicSEMcode.R , R, 43 lines - Heritability/
GCTA_batch_full.sh , Shell, 17 lines - Mendelian Randomization/
Bone2Brain.R , R, 130 lines, 4 matches - Phenotypic Correlation/
Pheno_assoc.R , R, 41 lines - README.md, Text, 16 lines
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: tulab-brain/
Bone-Brain-connections
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
- zenodo:17966320, at Zenodo; found in “Data availability”
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:
- it points to a dataset: Zenodo 17966320
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://
BibTeX
@article{zhao2026regiona
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/
url = {https://
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/
VL - 17
IS - 1
SP - 6789
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"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":
"volume": "17",
"issue": "1",
"page": "6789",
"DOI": "10.1038/
"PMID": "42185266",
"PMCID": "PMC13385815",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"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/s41562-025-02145-1 [code]
- Genome-wide association meta-analysis of age at onset of walking in over 70,000 infants of European ancestry.Journal: Nature human behaviourIn common: lavaan, psych, ggpubr, 6 other tools, genetics / omics, 14 references
- [2] doi:10.1038/s41467-026-72164-7 [code]
- Multivariate genetic analysis reveals three distinct pathological dimensions in musculoskeletal disorders.Journal: Nature communicationsIn common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, 9 references
- [3] doi:10.1002/hbm.25712 [code]
- Shared genetic influences on resting-state functional networks of the brain.Journal: Human brain mappingIn common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, 8 references
- [4] doi:10.1038/s41588-024-01933-1 [code]
- Multivariate genomic analysis of 5 million people elucidates the genetic architecture of shared components of the metabolic syndrome.Journal: Nature geneticsIn common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, 8 references
- [5] doi:10.1038/s41467-023-36605-x [code]
- Multivariate genomic architecture of cortical thickness and surface area at multiple levels of analysis.Journal: Nature communicationsIn common: lavaan, psych, ggpubr, 3 other tools, 8 references, author Tian Ge
- [6] doi:10.1038/s41588-025-02189-z [code]
- Genome-wide analyses identify 30 loci associated with obsessive-compulsive disorder.Journal: Nature geneticsIn common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, cellular / molecular, 7 references
- [7] doi:10.1038/s41588-023-01475-y [code]
- Genetic insights into human cortical organization and development through genome-wide analyses of 2,347 neuroimaging phenotypes.Journal: Nature geneticsIn common: data.table, tidyverse, NumPy, genetics / omics, 15 references
- [8] doi:10.1523/eneuro.0242-22.2023 [code]
- The Genetic Architectures of Functional and Structural Connectivity Properties within Cerebral Resting-State Networks.Journal: eNeuroIn common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, 7 references
- [9] doi:10.1038/s41598-024-59699-9 [code]
- Insights into the genetic architecture of cerebellar lobules derived from the UK Biobank.Journal: Scientific reportsIn common: lavaan, BEDTools, psych, 6 other tools, genetics / omics, 8 references
- [10] doi:10.1038/s41588-025-02485-8 [code]
- Genome-wide association study of major anxiety disorders in 122,341 European-ancestry cases identifies 58 loci and highlights GABAergic signaling.Journal: Nature geneticsIn common: lavaan, BEDTools, psych, 7 other tools, genetics / omics, cellular / molecular, 7 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: 3 repositories of the authors' code, each at its verified commit and with its license, 62 scripts, and 8 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:c9a0dd9d6ae5fcd5…
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/s41467-026-73428-y)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-73428-y.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-73428-y
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-73428-y"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-73428-y.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".
- bulik/ldsc: README.md on GitHub
- GenomicSEM/GenomicSEM: README.md on GitHub
- tulab-brain/Bone-Brain-connections: 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.
