Robust but independent sex differences in human brain function, structure, and behavior.
The 22 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › Participants and data preparation › Participants ↔ scripts/Script13_readUKBsMRIdata.R, lines 1–59 · score 0.93 · healthy UK Biobank, UK Biobank participant, youngest subset, closely match, 44–50, age range
- [2] § Methods › Participants and data preparation › Participants ↔ scripts/Script14_SexAnatomyUKB.R, lines 1–32 · score 0.81 · healthy UK Biobank, youngest subset, UK Biobank participant, 44–50, mm, anatomy
- [3] § Methods › Cross-validation of anatomical sex differences and sex prediction in the UK Biobank dataset ↔ scripts/Script14_SexAnatomyUKB.R, lines 1–32 · score 0.72 · UK Biobank, FreeSurfer, cortical thickness, surface area, Euler, GMV
- [4] § Methods › Cross-validation of anatomical sex differences and sex prediction in the UK Biobank dataset ↔ scripts/Script13_readUKBsMRIdata.R, lines 1–59 · score 0.72 · UK Biobank, FreeSurfer, cortical thickness, surface area, Euler, GMV
- [5] § Methods › Predicting sex using fMRI, structural MRI, and behavioral data ↔ scripts/Script16_PredictSexActivation_TaskSpecificRegion.R, the whole file · a weak match · score 0.72 · fold cross validation, predicted sex, prediction models, PLS, ROC, tuning
- [6] § Results › Males and females show broadly similar brain-wide association study signals with a few isolated exceptions ↔ scripts/Script44_BWAS_SexComparison.R, lines 152–207 · score 0.70 · topographic divergence score, sex shuffled, Bonferroni correction, TDSs, behavioral scale, Pperm
- [7] § Results › Brain-wide association studies link behavior and task-induced brain activation within each sex ↔ scripts/Script44_BWAS_SexComparison.R, lines 152–207 · score 0.69 · topographical divergence scores, sex shuffling, Bonferroni corrected, TDSs, Scatter, density
- [8] § Methods › Predicting sex using fMRI, structural MRI, and behavioral data ↔ scripts/Script29_PredictSexBehavior_Permutation.R, lines 1–87 · score 0.68 · predicted sex, prediction models, MICE, imputed, behavioral scale, caret
- [9] § Methods › Clustering task-specific sex differences in brain activation ↔ scripts/Script6_ClusteringTaskSpecificRegions.R, lines 1–40 · score 0.68 · iter.max, kmeans clustering, scree, nstart, matrix, activation
- [10] § Methods › Testing inter-domain correlations of sex typicality across individuals ↔ scripts/Script37_PredictSex_STS.R, lines 411–461 · score 0.67 · sex probability scores, sex typicality, misclassified, STSs, sex prediction, volume
- [11] § Methods › Clustering task-specific sex differences in brain activation › Testing for alignment of task-specific and task-general sex differences in activation with functional anatomy of the human brai ↔ scripts/Script7_TaskSpecificGeneral_Enrichment.R, lines 271–323 · score 0.65 · markello_spatialnulls, topic map, Yeo, Neurosynth, network, Spin
- [12] § Methods › Participants and data preparation › Structural MRI data ↔ scripts/Script10_readHCPsMRIdata.R, lines 1–54 · score 0.65 · FreeSurfer, cortical thickness, surface area, recon, Euler, parcellate
- [13] § Methods › Brain-wide association studies (BWASs) between activation and behavior › Comparing the topography of brain-behavior associations between sexes ↔ scripts/Script44_BWAS_SexComparison.R, lines 1–26 · score 0.63 · topographical divergence, activation behavior associations, dissimilar, TDS, score, males
- [14] § Methods › Participants and data preparation › Structural MRI data ↔ scripts/Script11_SexAnatomyHCP.R, lines 1–32 · score 0.62 · FreeSurfer, cortical thickness, surface area, vertex, anatomy, volume
- [15] § Methods › Participants and data preparation › Behavioral data ↔ scripts/Script46_BWAS_SexModulation_OmnibusDesnityPlot_RankedDotPlot.R, lines 58–142 · score 0.62 · scanner tasks, alertness, personality, psychiatric, sensory, behavioral scales
- [16] § Methods › Participants and data preparation › Behavioral data ↔ scripts/Script15_SexBehavior.R, lines 145–232 · score 0.61 · scanner tasks, alertness, personality, psychiatric, sensory, behavioral scales
- [17] § Methods › Brain-wide association studies (BWASs) between activation and behavior › Sex stratified BWAS ↔ scripts/Script42_BWAS_MaleFemale_SplitHalf.R, lines 1–17 · score 0.57 · repeating BWAS, randomly splitting, behavioral scale, fMRI, Pperm, brain activation
- [18] § Methods › Analysis of fMRI data › Testing for task-specific and task-general SDA ↔ scripts/Script5_SexAcrossTasks.R, lines 1–47 · score 0.54 · linear mixed, lme4, lmer, fMRI, parcellation, models
- [19] § Methods › Participants and data preparation › Task fMRI data ↔ scripts/Script4_SexPerTask_Covary.R, lines 42–127 · score 0.52 · working memory, linear model, filtering, emotion, language
- [20] § Results › Multivariate patterns of brain activation, brain anatomy, and behavior are all highly but orthogonally predictive of participant sex ↔ scripts/Script16_PredictSexActivation_TaskSpecificRegion.R, the whole file · a weak match · score 0.52 · fold cross validation, sex prediction accuracy, MRI, GMV, maps, model
- [21] § Methods › Analysis of structural MRI data ↔ scripts/Script14_SexAnatomyUKB.R, lines 167–224 · score 0.51 · cortical thickness, FDR correction, effectsize, Cohen, anatomy, GMV
- [22] § Results › Humans show both task-specific and task-general sex differences in brain activation ↔ scripts/Script4_SexPerTask_Covary.R, lines 42–127 · score 0.51 · eta squared, language task, median, emotion, FDR, maps
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 · 304 lines · 12 KB · no license · 3 matches
- ####################################################
- ### Script 14: Calculate Sex differences in
- ### FreeSurfer volume (FSV or Gray Matter Volume), Surface Area (SA), Cortical Thickness (CT) in Glasser
- ### from the youngest subset of healthy UK Biobank participants (44-50 years; 529 males and 637 females)
- ### with euler greater than -217 (GMV,CT,SA: Fig. S12a-b, Source Data)
- ####################################################
- ### SET UP ###
- library(lme4)
- library(tidyverse)
- library(lmerTest)
- library(furrr)
- library(tictoc)
- library(limma)
- library(genio)
- library(ciftiTools)
- ciftiTools.setOption("wb_path", "/usr/local/apps/connectome-workbench/1.5.0/wb_command")
- library(freesurfer)
- library(ggplot2)
- library(patchwork)
- library(GetoptLong)
- library(lsr) #eta-Squared
- library(effectsize)
- ####Function to write cifti in Glasser parcellation
- # function to assign value of each parcel in HCP/MMP/Glasser parcellation to vertices in that parcel in CIFTI
- # MMP parcellation (download from HCP S1200 group results)P
- MMP <- read_cifti("../data/HCP_S1200_GroupAvg_v1/Q1-Q6_RelatedValidation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors.32k_fs_LR.dlabel.nii")
- # adjust each atlas into vector of assignments and dataframe for meta
- MMPleft <- as.vector(MMP$data$cortex_left)
- MMPright <- as.vector(MMP$data$cortex_right)
- MMPmeta <- as.data.frame(MMP$meta$cifti$labels$INDEXMAX)
- adata <- c(MMPleft,MMPright)
- mdata <- MMPmeta
- assign_value <- function(data) {
- arange <- c(181:360,1:180)#make sure left first (181:360), right second(1:180)
- res <- matrix(rep(0, length(adata)*1), ncol=1)
- temp <- adata
- for (m in 1:length(arange))
- {
- # find avg beta (by region)
- res[which(adata==arange[m])] <- data[m]
- }
- return(res)
- }
- # need to load one cifti dscalar file downloaded from HCP S1200 as a cfiti structure holder,
- # e.g., one file from xxxxx(one particpant)/MNINonLinear/Results/tfMRI_MOTOR/tfMRI_MOTOR_hp200_s4_level2.feat/motor_contrast.dscalar.nii
- test <- read_cifti("../data/motor_contrast.dscalar.nii", brainstructures = "all")
- # function to write Glasser Parcellated results to cifti
- write_glasser_cifti <- function(gdata,gname,ciftiname){
- tstats_vis <- test # initialize structure
- if (is.null(dim(gdata))) {
- cifti_data <- as.vector(assign_value(gdata))
- tstats_vis$data$cortex_left <- as.matrix(cifti_data[1:29696])
- tstats_vis$data$cortex_right <- as.matrix(cifti_data[29697:59412])
- tstats_vis$data$subcort <- matrix(rep(0,31870),ncol = 1)
- } else {
- cifti_data <- matrix(rep(0,59412*ncol(gdata)),ncol = ncol(gdata))
- for (m in 1:ncol(gdata)) {
- cifti_data[,m] <- as.vector(assign_value(gdata[,m]))
- }
- tstats_vis$data$cortex_left <- as.matrix(cifti_data[1:29696,])
- tstats_vis$data$cortex_right <- as.matrix(cifti_data[29697:59412,])
- tstats_vis$data$subcort <- matrix(rep(0,31870*ncol(gdata)),ncol = ncol(gdata))
- }
- # names
- tstats_vis$meta$cifti$names <- gname
- write_cifti(tstats_vis, ciftiname)
- }
- # Function: Spin tests of Pearson correlation between A and B data
- # across regions in Glasser (with the 10000 spin index created in fsaverage)
- spintest <- function(dataA,dataB,Alab,Blab,fname,fname2) {
- # use cortical MMP/Glasser atlas
- dfcor <-data.frame(A=dataA, B=dataB)
- # calculate the observed correlation
- cor_obs <- cor(dfcor$A,dfcor$B)
- # load indexes of spin 1000 generated by markello_spatialnulls
- sIndex <- read_matrix("../data/Glasser_fsa5_spin10000.txt") +1 #index starts from 0 instead of 1
- # build null using spin index
- permn <- ncol(sIndex)
- cor_null <- rep(NaN, permn)
- for (n in 1:permn)
- {
- Anull <- dfcor$A[sIndex[,n]]# rotate A
- cor_null[n] <- cor(dfcor$B,Anull)
- }
- #using abs to calculate p perm for a two-sided test
- p_perm <- length(which(abs(cor_null)>abs(cor_obs)))/permn
- # plot A (on y axis) vs. B (on x axis)
- ti=paste0("Correlation of ",Alab," and ",Blab, " across Glasser regions:")
- fit <- lm(A ~ B, data = dfcor)
- p <- ggplot(dfcor, aes(y = A, x = B)) +
- geom_point(color='black') +
- stat_smooth(size=2,method = "lm", se=FALSE,color="grey",show.legend = TRUE)+
- labs(y= Alab,
- x=Blab,
- title = paste(ti,"r =",signif(cor_obs,2)," p_spin =",signif(p_perm, 4))) +
- theme_classic() +
- theme(legend.position = c(.95, .9),
- legend.justification = c("right", "top"),
- legend.box.just = "right",
- legend.margin = margin(6, 6, 6, 6))
- print(p)
- ggsave(fname,height=6, width=6)
- #write source data
- colnames(dfcor)[1:2] <- c("CohenDinHCP","CohenDinUKB")
- write.csv(dfcor,row.names = FALSE,
- file = fname2)
- return(p)
- }
- ####################################################
- #Run lm model to identify sex effect in GMV
- # load data
- load(file = "../data/UKB_GMV_Glasser.RData")
- participant_id <- as.factor(FSV_wide_UKB$participant_id)
- sex <- as.factor(FSV_wide_UKB$sex)
- age <- FSV_wide_UKB$age
- tgmv <- FSV_wide_UKB$tgmv_FS741 # using tgmv from FS741 done by myslef
- inputs <- map(as.list(FSV_wide_UKB[,-c(1:6)]), function(x){
- d <- data.frame(participant_id = participant_id,
- age = age,
- sex=sex,
- tgmv=tgmv,
- voxel = x)
- return(d)
- })
- # lm model to identify sex effects while covarying total GMV
- results_list_sum <- map(inputs, function(d){
- res <- lm(formula = voxel ~ age + sex + tgmv, data = d)
- sum <- summary(res)
- etaS <- eta_squared(car::Anova(res,type = 2)) #type 2 partial eta-squared for effect size
- sum$etaS <- etaS
- return(sum)
- })
- # build data frame to hold sex effects
- sex_t <- map_dfr(results_list_sum, function(x){
- df <- data.frame(t_stat = x$coefficients[3,"t value"],
- p_val = x$coefficients[3,"Pr(>|t|)"],
- etaS = x$etaS$Eta2_partial[2]*sign(x$coefficients[3,"t value"])) #add sign to effect size
- return(df)
- })
- rownames(sex_t) <- names(results_list_sum)
- # calculate FDR-corrected p-values
- sex_t <- sex_t %>%
- mutate(fdr_p = p.adjust(p = p_val, method = "fdr"),
- BF_p = p.adjust(p = p_val, method = "bonferroni"),
- sig = ifelse(test = fdr_p < 0.05, yes = 1, no = 0),
- logFDR =-log10(fdr_p),
- t_thresholded = t_stat*sig,
- etaS_thresholded = etaS*sig)
- # calculate cohen's d using t_to_d from effectsize package
- tempcd <- t_to_d(t = sex_t$t_stat,df=1160)
- sex_t$cohend <- tempcd$d
- sex_t$cohend_thresholded <- sex_t$cohend*sex_t$sig
- # save results
- save(sex_t,file = "../data/SexGMV_UKBresults_Glasser.RData")
- write_glasser_cifti(as.matrix(sex_t),colnames(sex_t),
- "../outputs/SexGMV_UKBresults_Glasser.dscalar.nii")#use wb_view to load this cifit file: t_thresholded for Fig. 12a
- # compare effect size results from HCP and UKB for sex differences in sMRI
- sex_t_UKB <- sex_t
- load(file = "../data/SexGMV_HCPresults_Glasser.RData")
- tempcd <- t_to_d(t = sex_t$t_stat,df=959)
- cor(sex_t$cohend,sex_t_UKB$cohend)
- #Fig. S12b and source data
- spintest(sex_t$cohend,sex_t_UKB$cohend,'HCP_cohenD','UKB_cohenD',
- '../outputs/ROIbasedCorr_CohenD_MF_GMV_HCP_UKB_MMPatlas_SpinTest10000.pdf',
- '../outputs/ROIbasedCorr_CohenD_MF_GMV_HCP_UKB_MMPatlas_SpinTest10000.csv')
- ####################################################
- #Run lm model to identify sex effect in CT
- # load data
- load(file = "../data/UKB_CT_Glasser.RData")
- participant_id <- as.factor(FSthick_wide_UKB$participant_id)
- sex <- as.factor(FSthick_wide_UKB$sex)
- age <- FSthick_wide_UKB$age
- avgCT <- FSthick_wide_UKB$avgCT# average cortical thickness
- inputs <- map(as.list(FSthick_wide_UKB[,-c(1:6)]), function(x){
- d <- data.frame(participant_id = participant_id,
- age = age,
- sex=sex,
- avgCT=avgCT,
- voxel = x)
- return(d)
- })
- # lm model to identify sex effects while covarying avg CT
- results_list_sum <- map(inputs, function(d){
- res <- lm(formula = voxel ~ age + sex + avgCT, data = d)
- sum <- summary(res)
- etaS <- eta_squared(car::Anova(res,type = 2)) #type 2 partial eta-squared for effect size
- sum$etaS <- etaS
- return(sum)
- })
- # build data frame to hold sex effects
- sex_t <- map_dfr(results_list_sum, function(x){
- df <- data.frame(t_stat = x$coefficients[3,"t value"],
- p_val = x$coefficients[3,"Pr(>|t|)"],
- etaS = x$etaS$Eta2_partial[2]*sign(x$coefficients[3,"t value"])) #add sign to effect size
- return(df)
- })
- rownames(sex_t) <- names(results_list_sum)
- # calculate FDR-corrected p-values
- sex_t <- sex_t %>%
- mutate(fdr_p = p.adjust(p = p_val, method = "fdr"),
- BF_p = p.adjust(p = p_val, method = "bonferroni"),
- sig = ifelse(test = fdr_p < 0.05, yes = 1, no = 0),
- logFDR =-log10(fdr_p),
- t_thresholded = t_stat*sig,
- etaS_thresholded = etaS*sig)
- # calculate cohen's d using t_to_d from effectsize package
- tempcd <- t_to_d(t = sex_t$t_stat,df=1160)
- sex_t$cohend <- tempcd$d
- sex_t$cohend_thresholded <- sex_t$cohend*sex_t$sig
- # save results
- save(sex_t,file = "../data/SexCT_UKBresults_Glasser.RData")
- write_glasser_cifti(as.matrix(sex_t),colnames(sex_t),
- "../outputs/SexCT_UKBresults_Glasser.dscalar.nii")
- #use wb_view to load this cifit file: t_thresholded for Fig. S12a
- # compare effect size results from HCP and UKB for sex differences in sMRI
- sex_t_UKB <- sex_t
- load(file = "../data/SexCT_HCPresults_Glasser.RData")
- cor(sex_t$cohend,sex_t_UKB$cohend)
- #Fig. S12b and source data
- spintest(sex_t$cohend,sex_t_UKB$cohend,'HCP_cohenD','UKB_cohenD',
- '../outputs/ROIbasedCorr_CohenD_MF_CT_HCP_UKB_MMPatlas_SpinTest10000.pdf',
- '../outputs/ROIbasedCorr_CohenD_MF_CT_HCP_UKB_MMPatlas_SpinTest10000.cvf')
- ####################################################
- #Run lm model to identify sex effect in SA
- # load data
- load(file = "../data/UKB_SA_Glasser.RData")
- participant_id <- as.factor(FSsurfacearea_wide_UKB$participant_id)
- sex <- as.factor(FSsurfacearea_wide_UKB$sex)
- age <- FSsurfacearea_wide_UKB$age
- totalSA <- FSsurfacearea_wide_UKB$totalSA# total surface area
- inputs <- map(as.list(FSsurfacearea_wide_UKB[,-c(1:6)]), function(x){
- d <- data.frame(participant_id = participant_id,
- age = age,
- sex=sex,
- totalSA=totalSA,
- voxel = x)
- return(d)
- })
- # lm model to identify sex effects while covarying total SA
- results_list_sum <- map(inputs, function(d){
- res <- lm(formula = voxel ~ age + sex + totalSA, data = d)
- sum <- summary(res)
- etaS <- eta_squared(car::Anova(res,type = 2)) #type 2 partial eta-squared for effect size
- sum$etaS <- etaS
- return(sum)
- })
- # build data frame to hold sex effects
- sex_t <- map_dfr(results_list_sum, function(x){
- df <- data.frame(t_stat = x$coefficients[3,"t value"],
- p_val = x$coefficients[3,"Pr(>|t|)"],
- etaS = x$etaS$Eta2_partial[2]*sign(x$coefficients[3,"t value"])) #add sign to effect size
- return(df)
- })
- rownames(sex_t) <- names(results_list_sum)
- # calculate FDR-corrected p-values
- sex_t <- sex_t %>%
- mutate(fdr_p = p.adjust(p = p_val, method = "fdr"),
- BF_p = p.adjust(p = p_val, method = "bonferroni"),
- sig = ifelse(test = fdr_p < 0.05, yes = 1, no = 0),
- logFDR =-log10(fdr_p),
- t_thresholded = t_stat*sig,
- etaS_thresholded = etaS*sig)
- # calculate cohen's d using t_to_d from effectsize package
- tempcd <- t_to_d(t = sex_t$t_stat,df=1160)
- sex_t$cohend <- tempcd$d
- sex_t$cohend_thresholded <- sex_t$cohend*sex_t$sig
- # save results
- save(sex_t,file = "../data/SexSA_UKBresults_Glasser.RData")
- write_glasser_cifti(as.matrix(sex_t),colnames(sex_t),
- "../outputs/SexSA_UKBresults_Glasser.dscalar.nii")
- #use wb_view to load this cifit file: t_thresholded for Fig. S12a
- # compare effect size results from HCP and UKB for sex differences in sMRI
- sex_t_UKB <- sex_t
- load(file = "../data/SexSA_HCPresults_Glasser.RData")
- cor(sex_t$cohend,sex_t_UKB$cohend)
- # Fig S12b and source data
- spintest(sex_t$cohend,sex_t_UKB$cohend,'HCP_cohenD','UKB_cohenD',
- '../outputs/ROIbasedCorr_CohenD_MF_SA_HCP_UKB_MMPatlas_SpinTest10000.pdf',
- '../outputs/ROIbasedCorr_CohenD_MF_SA_HCP_UKB_MMPatlas_SpinTest10000.csv')
Script14_SexAnatomyUKB.R at commit 1788f03, no license · at the source
Overview
- Section on Developmental Neurogenomics, Human Genetics Branch, National Institute of Mental Health, Bethesda, MD USA
- Section on Cognitive Neuropsychology, Laboratory of Brain and Cognition, National Institute of Mental Health, Bethesda, MD USA
- Data Science and Sharing Team, National Institute of Mental Health, Bethesda, MD USA
Abstract
The neurobiological accompaniments of well-established sex differences in human behavior and disease remain unclear — in part due to a lack of large, diverse functional neuroimaging studies. We address this gap using over 700 h of fMRI data across seven tasks from 978 individuals with extensive structural and behavioral measures. We find that sex differences in task-activation are widespread (85% of cortex) and reproducible, largely task-specific, of small to moderate effect size, and unaligned with brain volume differences. While machine learning can classify sex from brain activation, volume, or behavior, these data types provide orthogonal information. Brain-wide association studies reveal that links between brain activation and behavior are highly conserved between sexes. The few subtle sex differences in brain-behavior linkage that do exist are not preferentially localized to sex-biased behaviors. Our findings clarify the nature of sex differences in human brain function and their links with neuroanatomy and behavior, providing a useful foundation for future research.
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 22 matches between paragraphs and lines of code.
siyuanliu8/HCPsexdifferences
1788f03b6b649187bca9bd9bdc0359edb56be6a9, 13 May 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
47 files
- scripts/
Script10_readHCPsMRIdata , R, 162 lines, 1 match.R - scripts/
Script11_SexAnatomyHCP.R , R, 226 lines, 1 match - scripts/
Script12_CompareSexActiv , R, 670 linesationAnatomy.R - scripts/
Script13_readUKBsMRIdata , R, 99 lines, 2 matches.R - scripts/
Script14_SexAnatomyUKB.R , R, 304 lines, 3 matches - scripts/
Script15_SexBehavior.R , R, 233 lines, 1 match - scripts/
Script16_PredictSexActiv , R, 62 lines, 2 matchesation_TaskSpecificRegion .R - scripts/
Script17_PredictSexActiv , R, 88 linesation_TaskSpecificRegion _permutation.R - scripts/
Script18_PredictSexActiv , R, 63 linesation_TaskGeneralRegion. R - scripts/
Script19_PredictSexActiv , R, 84 linesation_TaskGeneralRegion_ permutation.R - scripts/
Script1_readHCPfMRIdata. , R, 251 linesR - scripts/
Script20_PredictSexActiv , R, 68 linesation_PerTaskSexDifferen ceRegion.R - scripts/
Script21_PredictSexActiv , R, 88 linesation_PerTaskSexDifferen ceRegion_Permutation.R - scripts/
Script22_PredictSexVolum , R, 115 linese_HCPmask.R - scripts/
Script23_PredictSexVolum , R, 152 linese_HCPmask_Permutation.R - scripts/
Script24_PredictSexSA_HC , R, 114 linesPmask.R - scripts/
Script25_PredictSexSA_HC , R, 152 linesPmask_Permutation.R - scripts/
Script26_PredictSexCT_HC , R, 114 linesPmask.R - scripts/
Script27_PredictSexCT_HC , R, 152 linesPmask_Permutation.R - scripts/
Script28_PredictSexBehav , R, 124 linesior.R - scripts/
Script29_PredictSexBehav , R, 160 lines, 1 matchior_Permutation.R - scripts/
Script2_ActivationPerTas , R, 147 linesk.R - scripts/
Script30_PredictSexVolum , R, 113 linese_UKBmask.R - scripts/
Script31_PredictSexVolum , R, 152 linese_UKBmask_Permutation.R - scripts/
Script32_PredictSexSA_UK , R, 116 linesBmask.R - scripts/
Script33_PredictSexSA_UK , R, 152 linesBmask_Permutation.R - scripts/
Script34_PredictSexCT_UK , R, 114 linesBmask.R - scripts/
Script35_PredictSexCT_UK , R, 152 linesBmask_Permutation.R - scripts/
Script36_PredictSex_Accu , R, 409 linesracyPlot.R - scripts/
Script37_PredictSex_STS. , R, 864 lines, 1 matchR - scripts/
Script38_BWAS_MaleSpecif , R, 110 linesic_ShufflingSubject.R - scripts/
Script39_BWAS_MaleSpecif , R, 67 linesic_ShufflingSex.R - scripts/
Script3_SexPerTask.R , R, 147 lines - scripts/
Script40_BWAS_FemaleSpec , R, 110 linesific_ShufflingSubject.R - scripts/
Script41_BWAS_FemaleSpec , R, 69 linesific_ShufflingSex.R - scripts/
Script42_BWAS_MaleFemale , R, 155 lines, 1 match_SplitHalf.R - scripts/
Script43_BWAS_SexSpecifi , R, 116 linesc_SignificantAssociation s.R - scripts/
Script44_BWAS_SexCompari , R, 388 lines, 3 matchesson.R - scripts/
Script45_BWAS_SexModulat , R, 114 linesion.R - scripts/
Script46_BWAS_SexModulat , R, 142 lines, 1 matchion_OmnibusDesnityPlot_R ankedDotPlot.R - scripts/
Script4_SexPerTask_Covar , R, 157 lines, 2 matchesy.R - scripts/
Script5_SexAcrossTasks.R , R, 206 lines, 1 match - scripts/
Script6_ClusteringTaskSp , R, 337 lines, 1 matchecificRegions.R - scripts/
Script7_TaskSpecificGene , R, 601 lines, 1 matchral_Enrichment.R - scripts/
Script8_TaskSpecific_Spl , R, 141 linesitHalf.R - scripts/
Script9_TaskGeneral_Spli , R, 133 linestHalf.R - README.md, Text, 59 lines
Code availability
All custom code and scripts used for data processing and statistical analysis in this study are publicly available on GitHub at https://
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;
- 46 scripts, each with its path and the digest of its content;
- 22 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
- humanconnectome.org/
study/ , at Human Connectome Project; found in “Data availability”hcp-young-adult - ukbiobank.ac.uk/
enable-your-research/ , at UK Biobank; found in “Data availability”apply-for-access
Data availability
The primary HCP data are available by application at https://
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, 10 MeSH terms, 4 funders, 88 references.
Cite
This paper
Liu, S., Mahony, B. W., Whitman, E. T., Gotts, S. J., Moraczewski, D., Thomas, A., Martin, A., & Raznahan, A. (2026). Robust but independent sex differences in human brain function, structure, and behavior. Nature communications, 17(1), 6694. https://
BibTeX
@article{liu2026robust,
author = {Liu, Siyuan and Mahony, Bridget W and Whitman, Ethan T and Gotts, Stephen J and Moraczewski, Dustin and Thomas, Adam and Martin, Alex and Raznahan, Armin},
title = {{Robust but independent sex differences in human brain function, structure, and behavior}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {6694},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42168179},
pmcid = {PMC13385741}
}
RIS
TY - JOUR
AU - Liu, Siyuan
AU - Mahony, Bridget W
AU - Whitman, Ethan T
AU - Gotts, Stephen J
AU - Moraczewski, Dustin
AU - Thomas, Adam
AU - Martin, Alex
AU - Raznahan, Armin
TI - Robust but independent sex differences in human brain function, structure, and behavior
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 6694
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Robust but independent sex differences in human brain function, structure, and behavior",
"container-title": "Nature communications",
"author": [
{
"family": "Liu",
"given": "Siyuan"
},
{
"family": "Mahony",
"given": "Bridget W"
},
{
"family": "Whitman",
"given": "Ethan T"
},
{
"family": "Gotts",
"given": "Stephen J"
},
{
"family": "Moraczewski",
"given": "Dustin"
},
{
"family": "Thomas",
"given": "Adam"
},
{
"family": "Martin",
"given": "Alex"
},
{
"family": "Raznahan",
"given": "Armin"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "6694",
"DOI": "10.1038/
"PMID": "42168179",
"PMCID": "PMC13385741",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
21
]
]
}
}
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-74274-8 [code]
- Regional sex differences in human cortical anatomy vary in their morphometric bases and overlap with sex chromosomal and gonadal influences.Journal: Nature communicationsIn common: tidyverse, structural MRI / diffusion, 14 references, 2 authors
- [2] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: caret, reticulate, limma, 11 other tools
- [3] doi:10.1093/bioinformatics/btag592 [code]
- Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.Journal: Bioinformatics (Oxford, England)In common: reticulate, limma, car, 11 other tools
- [4] doi:10.1038/s41467-026-74753-y [code]
- A human-specific microRNA controls the timing of excitatory synaptogenesis.Journal: Nature communicationsIn common: reticulate, limma, easystats, 11 other tools
- [5] doi:10.3390/ijms27104466 [code]
- Uncovering the Key Circuit FOSL2/
FOS/ EGR3/ EGR1, Contributing to the Hyperexcitability of Excitatory Neurons in the Epileptic Temporal Cortex and Hippocampus. Journal: International journal of molecular sciencesIn common: caret, reticulate, limma, 10 other tools - [6] doi:10.1016/j.xcrm.2026.102766 [code]
- A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.Journal: Cell reports. MedicineIn common: limma, car, circlize, 10 other tools
- [7] doi:10.1002/hbm.70605 [code]
- BrainEnrich: Revealing Biological Insights for Imaging-Derived Phenotypes Through Transcriptomic Enrichment.Journal: Human brain mappingIn common: reticulate, easystats, broom, 7 other tools, 3 references
- [8] doi:10.1038/s41467-026-77170-3 [code]
- DNA methylation profiling identifies long-range epigenetic silencing of clustered protocadherins as a key determinant of meningioma progression.Journal: Nature communicationsIn common: caret, limma, broom, 8 other tools
- [9] doi:10.1038/s41514-026-00397-3 [code]
- Nasal administration of Protollin enhances monocyte phagocytosis and decreases CD8&
lt;sup& gt;+& lt;/ sup& gt; T cell cytotoxicity in subjects with early Alzheimer's disease: a Phase 1 clinical trial. Journal: npj agingIn common: reticulate, limma, car, 8 other tools - [10] doi:10.1038/s41586-026-10735-w [code]
- Distributed control circuits across a brain-and-cord connectome.Journal: NatureIn common: caret, reticulate, circlize, 8 other tools
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: 1 repository of the authors' code, each at its verified commit and with its license, 46 scripts, and 22 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:12375e958d091e4e…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
