OSCR

Genetic architectures of brain-related traits are shaped by strong selective constraints.

Code ↔ Paper

10 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 10 matches · 3 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Materials and Methods › Thresholding and Downsampling Quantitative Traits. ↔ scripts/gwas_deflation/05_thresholding_downsampling.R, lines 1 to 12 · score 0.89 · diastolic blood pressure, systolic blood pressure, HbA1c, heel bone mineral, BMI, LDL · Report a mismatch
  2. [2] § Materials and Methods › Thresholding and Downsampling Quantitative Traits. ↔ scripts/gwas_deflation/01_field_names.ipynb, lines 37 to 78 · score 0.85 · heel bone mineral, diastolic blood pressure, systolic blood pressure, HbA1c, medically relevant, fields · Report a mismatch
  3. [3] § Results › The Distinct Genetic Architectures of Brain-Related Traits. ↔ scripts/plotting/sldsc_plots.R, lines 1 to 48 · score 0.70 · Bonferroni correction, selected traits, DFP, FIS, IMR, AFS · Report a mismatch
  4. [4] § Materials and Methods › Distinct Subsets of (Approximately Uncorrelated) Brain-Related and Non-Brain-Related Traits. ↔ scripts/gwas_analyses/get_independent_traits.R, lines 1 to 69 · score 0.68 · Neale Lab, Genetic correlation, CNS traits, meta · Report a mismatch
  5. [5] § Results › Brain-Related Traits Retain Distinct Architectures After Accounting for Differences in Study Design. ↔ scripts/gwas_deflation/05_thresholding_downsampling.R, lines 22 to 67 · score 0.67 · reach equivalent power, original phenotypic, normal transformation, Deflation, downsampling, inverse · Report a mismatch
  6. [6] § Materials and Methods › Using Stratified LD Score Regression (S-LDSC) to Define Brain-Related Traits. ↔ scripts/gwas_analyses/07_sldsc_metaanalysis_ACAT.R, the whole file · a weak match · score 0.67 · Cauchy variables, Cauchy distribution, ACAT, meta, transformed, cell · Report a mismatch
  7. [7] § Materials and Methods › Thresholding and Downsampling Quantitative Traits. ↔ scripts/gwas_deflation/06_gwas_deflated.sh, the whole file · a weak match · score 0.64 · binary traits, fallback, firth, covar, glm, hide · Report a mismatch
  8. [8] § Materials and Methods › Identifying Approximately Independent Hits Using GCTA-COJO. ↔ scripts/gwas_analyses/02_cojo.sh, the whole file · a weak match · score 0.62 · cojo slct, GCTA COJO, GWAS · Report a mismatch
  9. [9] § Materials and Methods › Using Stratified LD Score Regression (S-LDSC) to Define Brain-Related Traits. ↔ ldsc.py, lines 547 to 617 · score 0.59 · munge_sumstats.py, LD scores, regression coefficient · Report a mismatch
  10. [10] § Materials and Methods › Thresholding and Downsampling Quantitative Traits. ↔ scripts/gwas_deflation/05_thresholding_downsampling.R, lines 22 to 67 · score 0.56 · normal transformed, nest, downsampling, inverse, rank, binary · 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 · 67 lines · 2.6 KB · no license · 3 matches

  1. # Run this script on UKB-RAP
  2. set.seed(123)
  3. library(data.table)
  4. input<- fread('/mnt/project/Deflation/phenotypes_processed.tsv')
  5. data<- as.data.frame(input)
  6. trait_list<-setdiff(colnames(data), c("FID", "IID")) #List of traits to threhold on
  7. trait_names<- c("BMI","Creatinine in urine","HbA1c","LDL","Diastolic blood pressure","Systolic blood pressure","Heel bone mineral density T-score")
  8. k <- c(20,10,5,2,1) #Population prevalences
  9. calculate_N_prime <- function(K, omega, M) {
  10. # M: number of cases + number of controls included in case-control GWAS (M=N if omega=K)
  11. # K: population prevalence
  12. # omega: sample prevalence
  13. size <- M * omega * (1-omega) * (dnorm(qnorm(1-K)) **2) / ((K*(1-K))**2)
  14. return(round(size))
  15. }
  16. # x -- quantitative phenotypes
  17. # y -- binary phenotypes
  18. for (i in 1:length(trait_list)) {
  19. trait<-trait_list[i]
  20. trait_name<-trait_names[i]
  21. system(paste("dx mkdir -p /Deflation/",trait,"/plots", sep=""))
  22. filtered_data<-data[!is.na(data[[trait]]), c("FID", "IID", trait)] #Filter for non-NA entries
  23. my_data<-filtered_data[order(filtered_data[[trait]]),]
  24. N<-nrow(my_data) #Sample size
  25. setnames(my_data, old = trait, new = "x") #x: original phenotype, sorted in increasing order
  26. my_data$x_irnt<-qnorm((rank(my_data$x,na.last="keep")-0.5)/sum(!is.na(my_data$x))) #Inverse rank normal transformed phenotype
  27. previous_indices <- NULL
  28. for (prev in k){
  29. case_number <- round(N*prev/100,digits=0) # PLINK format: controls=1, controls=2
  30. # Left tail thresholding
  31. colname_left <- paste("y_left_k", prev, sep="")
  32. my_data[[colname_left]] <- rep(1,N)
  33. my_data[[colname_left]][1:case_number] <- rep(2, case_number)
  34. # Right tail thresholding
  35. colname_right <- paste("y_right_k", prev, sep="")
  36. my_data[[colname_right]] <- rep(1,N)
  37. my_data[[colname_right]][(N-(case_number-1)):N] <- rep(2, case_number)
  38. # Nested downsampling to reach equivalent power
  39. colname <- paste("x_irnt_k", prev, sep="")
  40. my_data[[colname]] <- rep(NaN,N)
  41. size<-calculate_N_prime(prev/100,prev/100,N) #Assuming omega=K and M=N
  42. if (is.null(previous_indices)) {
  43. indices <- sample(1:N, size)
  44. } else {
  45. indices <- sample(previous_indices, size)
  46. }
  47. new_x<- my_data$x[indices] #new sample
  48. my_data[[colname]][indices] <- qnorm((rank(new_x,na.last="keep")-0.5)/sum(!is.na(new_x))) #IRNT the new sample
  49. previous_indices<-indices
  50. }
  51. write.table(my_data, file = paste(trait,".txt", sep=""), sep = "\t", row.names = FALSE, quote = FALSE)
  52. system(paste("dx upload ", trait, ".txt --dest /Deflation/",trait, "/", sep=""))
  53. }

05_thresholding_downsampling.R at commit cff8309, no license · at the source

Overview

Authors: Huisheng Zhu1, Yuval B Simons2,3,4, Jeffrey P Spence2,5,6, Guy Sella7,8, Jonathan K Pritchard1,2
  1. Department of Biology, Stanford University, Stanford, CA 94305
  2. Department of Genetics, Stanford University, Stanford, CA 94305
  3. Section of Genetic Medicine, University of Chicago, Chicago, IL 60637
  4. Department of Human Genetics, University of Chicago, Chicago, IL 60637
  5. Institute for Human Genetics, University of California, San Francisco, CA 94158
  6. Department of Epidemiology and Biostatistics, University of California, San Francisco, CA 94158
  7. Department of Biological Sciences, Columbia University, New York City, NY 10027
  8. Program for Mathematical Genomics, Columbia University, New York City, NY 10032
Institutions: Stanford University (United States); University of Chicago (United States); Columbia University (United States)
Dates: received 26 March 2026; accepted 29 July 2026; published online 1 September 2026; in print 8 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1073/pnas.2609814123 · PMID 42679042 · PMCID PMC13552918 · OpenAlex W7140029235
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: genetics / omics (modality), human (organism), cellular / molecular (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Preprocessing, fMRI & imaging
Keywords: selection, GWAS, genetic architecture, brain-related traits, psychiatric disorders
MeSH: Brain*, Mental Disorders*, Selection, Genetic*, Gene Frequency, Genome-Wide Association Study, Humans, Models, Genetic, Phenotype, Polymorphism, Single Nucleotide, Quantitative Trait Loci (* major topic)
Topic: Genetic Associations and Epidemiology (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: HHS | National Institutes of Health (R01HL175076, R01GM115889, R01HG014005, R01HG008140); National Science Foundation (DMS-2235451); NHGRI NIH HHS (R01 HG014005, R01 HG008140); NHLBI NIH HHS (R01 HL175076); NIGMS NIH HHS (R01 GM115889); Simons Foundation (SF) (MPS-NITMB-00005320)
Citations: not cited yet (Europe PMC); 99 references in the paper

Abstract

Genome-wide association studies (GWAS) have identified hundreds of significant loci for psychiatric disorders, yet the strength of these associations remains modest compared to other human complex traits with similar numbers of hits. Whether this pattern reflects statistical artifacts or real biological differences—and, if the latter, what underlies it—remains unclear. In addition to psychiatric disorders, we find that other traits with functional enrichment in the central nervous system (CNS), whether binary or quantitative, also share similar genetic architectures, characterized by GWAS hits of limited statistical significance and generally higher allele frequencies. In comparing the architecture of binary and quantitative traits, we adjust for statistical power in their respective studies. After this adjustment, we fit an evolutionary model of architecture and show that CNS-enriched traits have large mutational target sizes, with contributing variants and genes experiencing stronger selection than those for other traits. Our findings reveal heterogeneity among complex traits and provide insights into traits that more effectively capture fitness-relevant processes. More broadly, our results suggest that the genetic architectures of complex traits are shaped by the tissues through which these traits are mediated.

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 10 matches between paragraphs and lines of code.

bulik/ldsc

License: GPL-3.0
State: the link answers, verified on 26 October 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, “Using Stratified LD Score Regression (S-LDSC) to”
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: 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
At the source: github.com/bulik/ldsc

huishengz/cns-selection

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: cff83096f0ca242980b30769973e0b3b222bd7eb, 20 March 2026
Languages: R (17), Shell (13), MATLAB (11), Jupyter (3)
Size: 46 files, 44 scripts
Software Heritage: not archived
Found in: “Data, Materials, and Software Availability”
Holds: README, 3 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (15 files), data.table (13 files), ggplot2 (13 files), Statistics and Machine Learning Toolbox (5 files), patchwork (4 files), NumPy (3 files), pandas (3 files), cowplot (1 file), Matplotlib (1 file), SciPy (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
45 files

The paper's code and data availability statement is in the Data section.

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;
  • 69 scripts, each with its path and the digest of its content;
  • 10 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, Materials, and Software Availability

Codes used for this article are available at https://github.com/huishengz/cns-selection. Data and results are available at https://doi.org/10.5281/zenodo.19154957. To access UK Biobank data, eligible researchers can apply at https://www.ukbiobank.ac.uk/use-our-data/apply-for-access/ (99).

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

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 5 keywords, 10 MeSH terms, 6 funders, 93 references.

Cite

This paper

Zhu, H., Simons, Y. B., Spence, J. P., Sella, G., & Pritchard, J. K. (2026). Genetic architectures of brain-related traits are shaped by strong selective constraints. Proceedings of the National Academy of Sciences of the United States of America, 123(36), e2609814123. https://doi.org/10.1073/pnas.2609814123

BibTeX

@article{zhu2026genetic,
author = {Zhu, Huisheng and Simons, Yuval B and Spence, Jeffrey P and Sella, Guy and Pritchard, Jonathan K},
title = {{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},
year = {2026},
month = sep,
volume = {123},
number = {36},
pages = {e2609814123},
publisher = {National Academy of Sciences},
issn = {0027-8424},
doi = {10.1073/pnas.2609814123},
url = {https://doi.org/10.1073/pnas.2609814123},
pmid = {42679042},
pmcid = {PMC13552918}
}

RIS

TY - JOUR
AU - Zhu, Huisheng
AU - Simons, Yuval B
AU - Spence, Jeffrey P
AU - Sella, Guy
AU - Pritchard, Jonathan K
TI - Genetic architectures of brain-related traits are shaped by strong selective constraints
T2 - Proceedings of the National Academy of Sciences of the United States of America
J2 - Proc Natl Acad Sci U S A
PY - 2026
DA - 2026/09/01
VL - 123
IS - 36
SP - e2609814123
SN - 0027-8424
PB - National Academy of Sciences
DO - 10.1073/pnas.2609814123
UR - https://doi.org/10.1073/pnas.2609814123
LA - en
ER -

CSL-JSON

{
"id": "10.1073/pnas.2609814123",
"type": "article-journal",
"title": "Genetic architectures of brain-related traits are shaped by strong selective constraints",
"container-title": "Proceedings of the National Academy of Sciences of the United States of America",
"author": [
{
"family": "Zhu",
"given": "Huisheng"
},
{
"family": "Simons",
"given": "Yuval B"
},
{
"family": "Spence",
"given": "Jeffrey P"
},
{
"family": "Sella",
"given": "Guy"
},
{
"family": "Pritchard",
"given": "Jonathan K"
}
],
"container-title-short": "Proc Natl Acad Sci U S A",
"volume": "123",
"issue": "36",
"page": "e2609814123",
"DOI": "10.1073/pnas.2609814123",
"PMID": "42679042",
"PMCID": "PMC13552918",
"ISSN": "0027-8424",
"publisher": "National Academy of Sciences",
"URL": "https://doi.org/10.1073/pnas.2609814123",
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
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.1038/s43587-025-00962-7 [code]
Genome-wide analysis of brain age identifies 59 associated loci and unveils relationships with mental and physical health.
Journal: Nature aging
In common: patchwork, cowplot, data.table, 6 other tools, genetics / omics, cellular / molecular, 9 references
[2] doi:10.1016/j.cell.2024.12.002 [code]
Trans-ancestry genome-wide study of depression identifies 697 associations implicating cell types and pharmacotherapies.
Journal: Cell
In common: patchwork, cowplot, data.table, 3 other tools, genetics / omics, cellular / molecular, 10 references
[3] 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 behaviour
In common: data.table, ggplot2, tidyverse, 4 other tools, genetics / omics, 11 references
[4] doi:10.1038/s41562-024-02051-y [code]
The shared genetic architecture and evolution of human language and musical rhythm.
Journal: Nature human behaviour
In common: BEDTools, cowplot, data.table, 5 other tools, genetics / omics, 8 references
[5] doi:10.1038/s41588-025-02189-z [code]
Genome-wide analyses identify 30 loci associated with obsessive-compulsive disorder.
Journal: Nature genetics
In common: BEDTools, data.table, ggplot2, 4 other tools, genetics / omics, cellular / molecular, 9 references
[6] 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: patchwork, data.table, ggplot2, 5 other tools, genetics / omics, cellular / molecular, 7 references
[7] doi:10.1016/j.biopsych.2023.06.022 [code]
The Genetic Architecture of Amygdala Nuclei.
Journal: Biological psychiatry
In common: BEDTools, patchwork, data.table, 7 other tools, genetics / omics, 7 references
[8] doi:10.1186/s13073-023-01212-4 [code]
Shared genetic architecture between irritable bowel syndrome and psychiatric disorders reveals molecular pathways of the gut-brain axis.
Journal: Genome medicine
In common: data.table, Statistics and Machine Learning Toolbox, pandas, 3 other tools, genetics / omics, cellular / molecular, 10 references
[9] doi:10.1038/s41586-025-09820-3 [code]
Mapping the genetic landscape across 14 psychiatric disorders.
Journal: Nature
In common: data.table, ggplot2, tidyverse, 4 other tools, genetics / omics, 9 references
[10] doi:10.1038/s43856-026-01510-z [code]
Mapping genetic convergence across brain structure, mental health, and cardiometabolic disease.
Journal: Communications medicine
In common: BEDTools, data.table, ggplot2, 6 other tools, genetics / omics, 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1073/pnas.2609814123.svg)](https://openscicode.org/badge/doi/10.1073/pnas.2609814123)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1073/pnas.2609814123.svg
   :target: https://openscicode.org/badge/doi/10.1073/pnas.2609814123
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1073/pnas.2609814123"><img src="https://openscicode.org/badge/doi/10.1073/pnas.2609814123.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".

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.