OSCR

Genetic landscape of adult executive function reveals a cell-type-specific developmental origin.

Code ↔ Paper

1 match 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 1 match
  1. [1] § Results › Genetic correlations of TMA with cognitive traits and regional brain structures ↔ Phase1_Cognitive_Data_Clean/Aggregated_Cognitive_Data.Rmd, lines 35–77 · score 0.69 · Stroop Ink, Stroop box, symbol digit, reaction, cognitive

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 Markdown · 183 lines · 6.9 KB · no license · 1 match

  1. ---
  2. title: "Aggregated Cognitive Data"
  3. author: "Shafiq"
  4. date: "29/04/2022"
  5. output: html_document
  6. ---
  7. ```{r}
  8. library(data.table)
  9. library(dplyr)
  10. library(Hmisc) # plotting hist for data frame
  11. library(tidyr)
  12. library(tableone)
  13. library(corrplot)
  14. library(ggraph)
  15. library(ggplot2)
  16. library(ggcharts)
  17. library(car)
  18. library(semPlot)
  19. library(psych)
  20. library(knitr)
  21. library(kableExtra)
  22. library(MVN)
  23. library(magrittr)
  24. library(factoextra)
  25. library(FactoMineR)
  26. library(heatmaply)
  27. library(pca3d)
  28. library(rgl)
  29. library(scatterplot3d)
  30. library(ggplot2)
  31. ```
  32. # Reading all aggregated cognitive test data separately
  33. ## All times will be in mili-seconds
  34. ```{r Reading all CT data}
  35. # Reaction time
  36. rt <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Reaction_Time_Aggregated_Feb2022.txt")
  37. rt <- rt[,c(1:4)]
  38. names(rt) <- c("barcode","rt_correct_sum","rtMean_resp_time", "device_name2")
  39. # Quiz
  40. qz <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Quiz_Aggregated_Feb2022.txt")
  41. # Working memory:
  42. wm <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Working_memory_Aggregated_Feb2022.txt")
  43. # Pairing 7
  44. p7 <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Pairing7_Aggregated_Feb2022.txt")
  45. # Stroop Box
  46. sb <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Stroop_Box_Aggregated_Feb2022.txt")
  47. names(sb) <- c("barcode","sb_correct_sum","sbMean_resp_time", "device_name2", "sb_correct_length","sb_correct_prop")
  48. # Stroop Ink
  49. si <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Stroop_Ink_Aggregated_Feb2022.txt")
  50. names(si) <- c("barcode","si_correct_sum","siMean_resp_time", "device_name2", "si_correct_length","si_correct_prop")
  51. # Matrices
  52. mx <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Matrices_Aggregated_Feb2022.txt")
  53. # Vocabulary
  54. vy <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Vocabulary_Aggregated_Feb2022.txt")
  55. # Trails: Whole data
  56. ts <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Trails_Aggregated_Feb2022.txt")
  57. colnames(ts)
  58. ts <- ts[,c(1:4,7,8,11,12)]
  59. names(ts) <- c("barcode","ts_total_guesses","tsMean_resp_time", "device_name2",
  60. "ts_num_total_guesses","ts_num_Mean_resp_time","ts_alpha_total_guesses","ts_alpha_Mean_resp_time")
  61. # Symbol Digit
  62. sd <- fread("C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Symbol_Digit_Aggregated_Feb2022.txt")
  63. names(sd) <- c("barcode","sd_correct_sum","sdMean_resp_time", "device_name2", "sd_correct_length","sd_correct_prop")
  64. ```
  65. # Merging all data and save
  66. ```{r Merge all data}
  67. dfs <- Reduce(function(x,y) merge(x = x, y = y, by = c("barcode","device_name2"), all=TRUE),
  68. list(rt,qz,wm,p7,sb,si,mx,vy,ts,sd)) #21,169 participants
  69. dfs$barcode <- toupper(dfs$barcode)
  70. # one id is duplicated but missing information available in both rows; thereby aggregated
  71. duplicates <- dfs[(duplicated(dfs$barcode) | duplicated(dfs$barcode, fromLast=TRUE))]
  72. duplicates <- duplicates %>% replace(is.na(.), 0)
  73. duplicate_sample_merged <- duplicates %>% group_by(barcode, device_name2) %>% summarise_all(sum) #%>% relocate(ct_attempted, .after = last_col())
  74. dfs_without_duplicated_sample <- dfs[which(!dfs$barcode=="SP00300148173G",)] #21,167
  75. dfs <- merge(dfs_without_duplicated_sample,duplicate_sample_merged, all=TRUE) #21,168
  76. My_Theme = theme(
  77. axis.title.x = element_text(size = 14, color = "blue", face = "bold"),
  78. axis.text.x = element_text(size = 10,color = "black", face = "bold"),
  79. axis.title.y = element_text(size = 14, color = "blue", face = "bold"),
  80. axis.text.y = element_text(size = 10, color = "black", face = "bold"),
  81. axis.line = element_line(),
  82. panel.grid.major = element_blank(),
  83. panel.grid.minor = element_blank(),
  84. panel.border = element_blank(),
  85. panel.background = element_blank())
  86. ggplot(dfs, aes(x=device_name2)) +
  87. geom_bar(width=0.4, colour = "#1F3552", fill = "#4271AE")+
  88. ylab("Number of volunteers (n=21,168)") +
  89. xlab("Devices") + My_Theme
  90. fwrite(dfs, file="C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/All_Cogtests_Aggregated_Phase1.txt", col.names=TRUE, row.names = FALSE, sep="\t")
  91. ```
  92. # Main varriables from the tests
  93. ```{r}
  94. rel_vars <- dfs %>%
  95. select_if(grepl("barcode|correct_sum|Mean_resp|max_correct|guesses|vy_correct_prop", names(.)))
  96. rel_vars <- rel_vars[,c(1,3:5,8,10,12,13,14,19,21,22)]
  97. names(rel_vars) <- c("barcode","RT","QZ","WM",
  98. "PR","SB","SI","MX",
  99. "VY","TM_Num","TM_Alpha","SD")
  100. rel_vars <- rel_vars %>% mutate_if(is.integer,as.numeric)
  101. library(Hmisc)
  102. hist.data.frame(rel_vars[,-1])
  103. rel_vars$RT_l10 <- log10(rel_vars$RT)
  104. rel_vars$WM_l10 <- log10(rel_vars$WM)
  105. rel_vars$PR_l10 <- log10(rel_vars$PR)
  106. rel_vars$SB_l10 <- log10(rel_vars$SB)
  107. rel_vars$SI_l10 <- log10(rel_vars$SI)
  108. rel_vars$TM_Num_l10 <- log10(rel_vars$TM_Num)
  109. rel_vars$TM_Alpha_l10 <- log10(rel_vars$TM_Alpha)
  110. # Reversing scores for QZ, VY, WM, MX and SD tests to have same scoring
  111. rel_vars$QZ_rev <- max(rel_vars$QZ, na.rm = TRUE) - rel_vars$QZ
  112. rel_vars$VY_rev <- max(rel_vars$VY ,na.rm = TRUE) - rel_vars$VY
  113. rel_vars$WM_l10_rev <- max(rel_vars$WM_l10, na.rm = TRUE) - rel_vars$WM_l10
  114. rel_vars$MX_rev <- max(rel_vars$MX, na.rm = TRUE) - rel_vars$MX
  115. rel_vars$SD_rev <- max(rel_vars$SD, na.rm = TRUE) - rel_vars$SD
  116. cogt <- rel_vars[,c(1,20,22:24,21,13,15:19)]
  117. ```
  118. # This is for G-11 (combined all 11 tests)
  119. ```{r G-11}
  120. cogt_full <- na.omit(cogt)
  121. g11.pr <- prcomp(cogt_full[,-1], center = TRUE, scale = TRUE)
  122. g11_pcs <- as.data.frame(g11.pr$x)
  123. g11 <- as.data.frame(g11_pcs$PC1)
  124. names(g11) <- "g_11"
  125. get_eigenvalue(g11.pr)
  126. ```
  127. # G-6 including PR,TM tests, RT, SI, SB (6 tests)
  128. ```{r G-6, PR TM tests RT SI SB}
  129. g6.pr <- prcomp(cogt_full[,c(7:12)], center = TRUE, scale = TRUE)
  130. g6_pcs <- as.data.frame(g6.pr$x)
  131. g6 <- as.data.frame(g6_pcs$PC1)
  132. names(g6) <- "g_6"
  133. ```
  134. # G-4 including QZ, WM, MX and SD
  135. ```{r G-4, QZ WM MX SD}
  136. g4.pr <- prcomp(cogt_full[,c(2:5)], center = TRUE, scale = TRUE)
  137. g4_pcs <- as.data.frame(g4.pr$x)
  138. g4 <- as.data.frame(g4_pcs$PC1) # first PCs as general intelligence (explains 41.4% variance)
  139. names(g4) <- "g_4"
  140. ```
  141. # Combine PCs to CT tests data and make complete data frame
  142. ```{r, Combine all these PCs to dataset}
  143. cogt_full_pcs <- cbind(cogt_full,g11,g6,g4)
  144. main_cogs_pc <- merge(cogt, cogt_full_pcs, all = TRUE)
  145. fwrite(main_cogs_pc, file="C:/Gene_cognition_shafiq/02_Cleaning_Cognitive_data/Aggregated_Clean_Cognitive_Data/Main_cognitive_varriable_includingG.txt", col.names=TRUE, row.names = FALSE, sep="\t")
  146. ```

Aggregated_Cognitive_Data.Rmd at commit 9403d00, no license · at the source

Overview

Authors: Md Shafiqur Rahman1,2, Azra Frkatović-Hodžić3, Jelle van den Ameele1,4, Steven M. Hill2,5, Nathalie Kingston6,7, John R. Bradley6,8, Brian D. M. Tom2, Patrick F. Chinnery1,4,6
  1. Department of Clinical Neurosciences, University of Cambridge,Cambridge, UK
  2. MRC Biostatistics Unit, University of Cambridge,Cambridge, UK
  3. Genos Glycoscience Research Laboratory,Zagreb, Croatia
  4. MRC Mitochondrial Biology Unit, University of Cambridge,Cambridge, UK
  5. Present Address: Cancer Research UK National Biomarker Centre, University of Manchester,Manchester, UK
  6. National Institute for Health and Care Research BioResource,Cambridge, UK
  7. Dept of Haematology, Cambridge University,Cambridge, UK
  8. Department of Medicine, University of Cambridge,Cambridge, UK
Institutions: University of Cambridge (United Kingdom); Genos (Croatia) (Croatia); University of Manchester (United Kingdom); National Institute for Health and Care Research (United Kingdom)
Journal: Nature communications, volume 17, issue 1, article 5953
Dates: received 14 January 2025; accepted 24 March 2026; published online 2 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-71738-9 · PMID 42069759 · PMCID PMC13342582 · OpenAlex W7159944498
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), cognitive (subfield)
Methods: Statistics, Machine learning, Preprocessing
Keywords: Neurological disorders, Development
MeSH: Brain*, Executive Function*, Adult, Cognition, Female, Genome-Wide Association Study, Humans, Male, Middle Aged, Phenotype, Polymorphism, Single Nucleotide (* major topic)
Topic: Genetic Associations and Epidemiology (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: UK Medical Research Council (MC_UU_00028/7); LifeArc (10748)
Citations: not cited yet (Europe PMC); 73 references in the paper

Abstract

Executive function is an essential cognitive domain for typical human behavior which is disrupted in neurodevelopmental and neurodegenerative disorders, but little is known about its underlying molecular basis. To address this, we perform genome-wide association studies (GWAS) using three different measures of executive function in UK Biobank (N = 84,238) and NIHR BioResource’s Genes and Cognition (N = 9932) study participants, followed by a meta-analysis. The trail-making alphanumeric (TMA) measure is the most heritable phenotype (h²=7-26%), associated with 18 independent loci that exhibit a similar direction of effect in both cohorts. Across these loci, in-silico follow-up implicates 178 genes, of which NT5DC2 and RP11-579E24.2 are independently replicated prior to meta-analysis. TMA is linked to pan-cerebral differences in brain structure, with brain-enriched genes showing a biphasic expression profile from early development through to later life. Our data implicate specific cell types, histone modifications and butyrophilin immunoglobulin family proteins as potential targets for promoting cognitive resilience.

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

Repository

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

shafiqnoa/genes-and-cognition-phase-1

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 9403d008a29f7151fecbff398a89b4f15e38995a, 29 January 2024
Languages: R (11)
Size: 12 files, 11 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, 11 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: data.table (11 files), tidyverse (11 files), ggpubr (10 files), patchwork (10 files), ggplot2 (9 files), psych (2 files), car (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
12 files

Code availability

All software used in this study is publicly available. The codes used for cognitive data cleaning are available on GitHub (https://github.com/shafiqnoa/Genes-and-Cognition-Phase-1/tree/main/Phase1_Cognitive_Data_Clean).

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:

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

GWAS summary statistics generated in this study have been deposited in the Zenodo database (doi: 10.5281/zenodo.11066096).73 NIHR Bioresource holds individual-level genetic and phenotypic data for G&C study participants, which can be accessed through https://bioresource.nihr.ac.uk/using-our-bioresource/. Individual-level genetic and phenotypic data for UKB can be accessed through https://www.ukbiobank.ac.uk/enable-your-research/apply-for-access. Other data relevant to this study are provided in the article or included in the Supplementary Information.

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

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 2 keywords, 11 MeSH terms, 2 funders, 70 references.

Cite

This paper

Rahman, M. S., Frkatović-Hodžić, A., van den Ameele, J., Hill, S. M., Kingston, N., Bradley, J. R., Tom, B. D. M., & Chinnery, P. F. (2026). Genetic landscape of adult executive function reveals a cell-type-specific developmental origin. Nature communications, 17(1), 5953. https://doi.org/10.1038/s41467-026-71738-9

BibTeX

@article{rahman2026genetic,
author = {Rahman, Md Shafiqur and Frkatović-Hodžić, Azra and van den Ameele, Jelle and Hill, Steven M. and Kingston, Nathalie and Bradley, John R. and Tom, Brian D. M. and Chinnery, Patrick F.},
title = {{Genetic landscape of adult executive function reveals a cell-type-specific developmental origin}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {5953},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-71738-9},
url = {https://doi.org/10.1038/s41467-026-71738-9},
pmid = {42069759},
pmcid = {PMC13342582}
}

RIS

TY - JOUR
AU - Rahman, Md Shafiqur
AU - Frkatović-Hodžić, Azra
AU - van den Ameele, Jelle
AU - Hill, Steven M.
AU - Kingston, Nathalie
AU - Bradley, John R.
AU - Tom, Brian D. M.
AU - Chinnery, Patrick F.
TI - Genetic landscape of adult executive function reveals a cell-type-specific developmental origin
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/05/02
VL - 17
IS - 1
SP - 5953
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-71738-9
UR - https://doi.org/10.1038/s41467-026-71738-9
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-71738-9",
"type": "article-journal",
"title": "Genetic landscape of adult executive function reveals a cell-type-specific developmental origin",
"container-title": "Nature communications",
"author": [
{
"family": "Rahman",
"given": "Md Shafiqur"
},
{
"family": "Frkatović-Hodžić",
"given": "Azra"
},
{
"family": "van den Ameele",
"given": "Jelle"
},
{
"family": "Hill",
"given": "Steven M."
},
{
"family": "Kingston",
"given": "Nathalie"
},
{
"family": "Bradley",
"given": "John R."
},
{
"family": "Tom",
"given": "Brian D. M."
},
{
"family": "Chinnery",
"given": "Patrick F."
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "5953",
"DOI": "10.1038/s41467-026-71738-9",
"PMID": "42069759",
"PMCID": "PMC13342582",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-71738-9",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
2
]
]
}
}

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-73428-y [code]
Regional heterogeneity in phenotypic and genetic associations between bone and brain in humans.
Journal: Nature communications
In common: psych, ggpubr, data.table, 2 other tools, genetics / omics, 7 references
[2] 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, 1 other tool, genetics / omics, 8 references
[3] 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, patchwork, 2 other tools, ukbiobank.ac.uk/enable-your-research/apply-for-access, genetics / omics, 4 references
[4] 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, genetics / omics, 10 references
[5] doi:10.1038/s41467-026-72164-7 [code]
Multivariate genetic analysis reveals three distinct pathological dimensions in musculoskeletal disorders.
Journal: Nature communications
In common: psych, ggpubr, data.table, 2 other tools, genetics / omics, 5 references
[6] 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, 6 references
[7] 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: data.table, ggplot2, tidyverse, genetics / omics, 7 references
[8] doi:10.1371/journal.pgen.1012170 [code]
Genome wide association study meta-analysis of neuropathologic lesions of Alzheimer's disease and related dementias in a multi-site autopsy cohort.
Journal: PLoS genetics
In common: data.table, ggplot2, tidyverse, genetics / omics, 6 references
[9] 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: psych, data.table, tidyverse, genetics / omics, 6 references
[10] doi:10.1186/s40168-026-02342-8 [code]
Impacts of host genetics on gut microbiome composition in Alzheimer's disease.
Journal: Microbiome
In common: ggpubr, data.table, ggplot2, 1 other tool, genetics / omics, 4 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.