Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife.
One block of code here has 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 1 match
- [1] § Methods › Cognitive assessments and risk factors › The PREVENT cohort › Cognitive assessment ↔ risk_on_segregation_PREVENT.R, lines 1 to 42 · score 0.53 · cognitive domain, ratio, rotated, component, baseline · block
oscr:b:HC46DZFDXNNFQ-C· 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 · 349 lines · 18 KB · no license · 1 match
- library(readxl)
- library(dplyr)
- library(psych)
- library(ggplot2)
- library(corrplot)
- library(Rmisc)
- library(lme4)
- library(lmerTest)
- library(effectsize)
- library(car)
- library(rstatix)
- library(tidyr)
- library(gghalves)
- ## Load cognition data
- Cog_t1 <- read_excel("Demo_risk_cog_t1_t2.xlsx", sheet = "baseline")
- Cog_t2 <- read_excel("Demo_risk_cog_t1_t2.xlsx", sheet = "follow_up")
- # recode data
- Cog_t1$FH1 <- factor(Cog_t1$FH1, levels=c(0,1), labels = c("FH-","FH+"))
- Cog_t2$FH2 <- factor(Cog_t2$FH2, levels=c(0,1), labels = c("FH-","FH+"))
- Cog_t1$apoe4 <- factor(Cog_t1$apoe4, levels=c(0,1), labels = c("non-carriers","carriers"))
- Cog_t2$apoe4 <- factor(Cog_t2$apoe4, levels=c(0,1), labels = c("non-carriers","carriers"))
- Cog_t1$Sex <- factor(Cog_t1$Sex, levels=c(1,2), labels = c("Male","Female"))
- Cog_t2$Sex <- factor(Cog_t2$Sex, levels=c(1,2), labels = c("Male","Female"))
- # Rotated PCA to extract main cognitive domains
- # parrallel analysis and scree plot to decide the number of components
- ParaAna_t1<-fa.parallel(Cog_t1[,9:21], fa="pc", n.iter = 500)
- ParaAna_t2<-fa.parallel(Cog_t2[,9:21], fa="pc", n.iter = 500)
- # rotated PCA
- PCs_t1<-principal(Cog_t1[,9:21], nfactors = 3, rotate="Varimax", eps=1e-7)
- PCs_t2<-principal(Cog_t2[,9:21], nfactors = 3, rotate="Varimax", eps=1e-7)
- # Visualise
- fa.diagram(PCs_t1)
- fa.diagram(PCs_t2)
- corrplot(PCs_t1$loadings,cl.ratio = 0.6,number.cex=0.8,number.digits=2, addCoef.col="black")
- corrplot(PCs_t2$loadings,cl.ratio = 0.6,number.cex=0.8,number.digits=2, addCoef.col="black")
- # Factor similarity
- fa.congruence(PCs_t1,PCs_t2)
- Cog_t1 <- cbind(Cog_t1,PCs_t1$scores)
- Cog_t2 <- cbind(Cog_t2,PCs_t2$scores) %>% rename(RC3=RC2,RC2=RC3)
- rm(ParaAna_t1,ParaAna_t2,PCs_t1,PCs_t2)
- Cog_t1$RC3_inv<-Cog_t1$RC3*(-1)
- Cog_t2$RC3_inv<-Cog_t2$RC3*(-1)
- # load functional data
- Seg_t1 <- read_excel("Segregation_Power214_noGSR.xlsx", sheet = "aucParameters_T1")
- Seg_t2 <- read_excel("Segregation_Power214_noGSR.xlsx", sheet = "aucParameters_T2")
- Seg_t1 <- inner_join(Seg_t1,Cog_t1,by="SubjID")
- Seg_t2 <- inner_join(Seg_t2,Cog_t2,by="SubjID")
- rm(Cog_t1,Cog_t2)
- # exclude participants with nodes less than
- Seg_t1<-Seg_t1[!(Seg_t1$No_Nodes_retained<214*0.8),]
- Seg_t2<-Seg_t2[!(Seg_t2$No_Nodes_retained<214*0.8),]
- # exclude participants with headmovement larger than
- Seg_t1<-Seg_t1[!(Seg_t1$meanFD>0.4),]
- Seg_t2<-Seg_t2[!(Seg_t2$meanFD>0.4),]
- # load brain struct data
- BrainStruc_t1 <- read_excel("BrainStruc_t1_t2.xlsx", sheet = "T1")
- BrainStruc_t2 <- read_excel("BrainStruc_t1_t2.xlsx", sheet = "T2")
- Seg_t1 <- inner_join(Seg_t1,BrainStruc_t1,by="SubjID")
- Seg_t2 <- inner_join(Seg_t2,BrainStruc_t2,by="SubjID")
- rm(BrainStruc_t1,BrainStruc_t2)
- Seg_t1<-Seg_t1%>%rename(TICV=EstimatedTotalIntraCranialVol)
- Seg_t2<-Seg_t2%>%rename(TICV=EstimatedTotalIntraCranialVol)
- # load number of retained brain nodes per network
- No_Nodes_Net_t1 <-read_excel("No_Nodes_Net.xlsx", sheet = "baseline")
- No_Nodes_Net_t2 <-read_excel("No_Nodes_Net.xlsx", sheet = "followup")
- Seg_t1 <- inner_join(Seg_t1,No_Nodes_Net_t1,by="SubjID")
- Seg_t2 <- inner_join(Seg_t2,No_Nodes_Net_t2,by="SubjID")
- rm(No_Nodes_Net_t1,No_Nodes_Net_t2)
- # code some data
- Seg_t1[Seg_t1$Sex == 'Male','SexC'] = -1
- Seg_t1[Seg_t1$Sex == 'Female','SexC'] = 1
- Seg_t1[Seg_t1$FH == 'FH-','FHC'] = -1
- Seg_t1[Seg_t1$FH == 'FH+','FHC'] = 1
- Seg_t1_clean <- Seg_t1 %>% filter(!is.na(apoe4))
- Seg_t1_clean[Seg_t1_clean$apoe4 == 'non-carriers','apoe4C'] = -1
- Seg_t1_clean[Seg_t1_clean$apoe4 == 'carriers','apoe4C'] = 1
- # risk effect on global segregation
- lm_model_apoe4_1 <- lm(scale(Pc_Global) ~ apoe4C + scale(Age) + SexC + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1_clean)
- summary(lm_model_apoe4_1)
- round(confint(lm_model_apoe4_1), 2)
- lm_model_apoe4_2 <- lm(scale(Pc_Global) ~ apoe4C + scale(Age) + SexC + scale(TotalGrayVol) + scale(TICV) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1_clean)
- round(confint(lm_model_apoe4_2), 2)
- lm_model_FH <- lm(scale(Pc_Global) ~ FHC + scale(Age) + SexC + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1)
- summary(lm_model_FH)
- round(confint(lm_model_FH), 2)
- lm_model_CAIDE <- lm(scale(Pc_Global) ~ scale(CAIDE) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1_clean)
- summary(lm_model_CAIDE)
- round(confint(lm_model_CAIDE), 2)
- # risk effect on network segregation
- lm_Pc5<-lm(scale(Pc_5) ~ apoe4C + scale(Age) + SexC + scale(meanFD) + scale(Network5), data=Seg_t1_clean) # DMN
- lm_Pc7<-lm(scale(Pc_7) ~ apoe4C + scale(Age) + SexC + scale(meanFD) + scale(Network7), data=Seg_t1_clean) # FPN
- lm_Pc8<-lm(scale(Pc_8) ~ apoe4C + scale(Age) + SexC + scale(meanFD) + scale(Network8), data=Seg_t1_clean) # SN
- models <- list(lm_Pc5, lm_Pc7, lm_Pc8)
- results <- lapply(models, function(model) {
- tidy(model, conf.int = TRUE) %>%
- filter(term == "apoe4C") %>%
- select(term, estimate, conf.low, conf.high)
- })
- results_df <- do.call(rbind, results) %>%
- mutate(Network = rep(c("DMN", "FPN", "SN"), each = 1)) %>%
- mutate(term = "apoe4C")
- results_df$Network<-factor(results_df$Network,levels = c("SN","DMN","FPN"))
- # PLOT baseline results
- Seg_t1_clean$resid_Pc <- resid(lm(Pc_Global ~ scale(Age) + SexC + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1_clean))
- Seg_t1_clean$resid_Pc_5 <- resid(lm(Pc_5 ~ scale(Age) + SexC + scale(meanFD) + scale(Network5), data = Seg_t1_clean))
- Seg_t1_clean$apoe4n<-as.numeric(Seg_t1_clean$apoe4) #noncarriers=1; carriers=2
- set.seed(123)
- Seg_t1_clean$apoe4nj<-jitter(Seg_t1_clean$apoe4n,amount=0.09)
- GPc_apoe4_SE <- summarySE(Seg_t1_clean, measurevar="resid_Pc", groupvars="apoe4n")
- Pc5_apoe4_SE <- summarySE(Seg_t1_clean, measurevar="resid_Pc_5", groupvars="apoe4n")
- ggplot(data=filter(Seg_t1_clean, !is.na(apoe4n)), aes(y = resid_Pc))+
- geom_point(data=Seg_t1_clean %>% filter(apoe4n=="1"),aes(x = apoe4nj),color = "cornflowerblue", size=2,alpha=.4)+
- geom_point(data=Seg_t1_clean %>% filter(apoe4n=="2"),aes(x = apoe4nj),color = "salmon",size=2, alpha=.6)+
- geom_errorbar(data=filter(GPc_apoe4_SE,!is.na(apoe4n)), aes(x=apoe4n, ymin=resid_Pc-ci, ymax=resid_Pc+ci), width=.1) +
- geom_point(data=filter(GPc_apoe4_SE,!is.na(apoe4n)) %>% filter(apoe4n=="1"),aes(x = apoe4n,y=resid_Pc),shape=21, color="black", fill="cornflowerblue", size=2, stroke=1)+
- geom_point(data=filter(GPc_apoe4_SE,!is.na(apoe4n)) %>% filter(apoe4n=="2"),aes(x = apoe4n,y=resid_Pc),shape=21, color="black", fill="salmon", size=2, stroke=1)+
- geom_half_violin(data=filter(Seg_t1_clean, !is.na(apoe4n)) %>% filter(apoe4n=="1"), aes(x = apoe4n, y = resid_Pc), #CHANGE
- position=position_nudge(x=-.2),side="l",width=.5, fill="cornflowerblue",alpha=.4)+
- geom_half_violin(data=filter(Seg_t1_clean, !is.na(apoe4n)) %>% filter(apoe4n=="2"), aes(x = apoe4n, y = resid_Pc), #CHANGE
- position=position_nudge(x=.2),side="r",width=.5, fill="salmon",alpha=.6)+
- scale_x_continuous(breaks = c(1, 2),labels=c("non-carriers","carriers"))+ #limits = c(0,3)
- ylab("Global Pc")+
- scale_y_continuous(labels = scales::number_format(accuracy = 0.01))+#,limits = c(-2,2),limits = c(-0.35,-0.25)
- theme(axis.text=element_text(size=12,colour = "black"),
- axis.title=element_text(size=12,colour = "black"),
- panel.border = element_blank(),
- panel.grid.major = element_blank(),
- panel.grid.minor = element_blank(),
- panel.background = element_blank(),
- axis.line = element_line(colour = "black",linewidth = 0.5),
- legend.position = "none",
- axis.title.x=element_blank())
- rm(GPc_apoe4_SE,Pc5_apoe4_SE)
- # segregation - cognition relationships at baseline
- lm_model_RC1_G <- lm(RC1 ~ scale(Pc_Global) + scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1)
- lm_model_RC2_G <- lm(RC2 ~ scale(Pc_Global) + scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1)
- lm_model_RC3_G <- lm(RC3_inv ~ scale(Pc_Global) + scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1)
- summary(lm_model_RC1_G)
- summary(lm_model_RC2_G)
- summary(lm_model_RC3_G)
- lm_model_RC1_DMN <- lm(RC1 ~ scale(Pc_5) + scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(Network5), data = Seg_t1)
- lm_model_RC2_DMN <- lm(RC2 ~ scale(Pc_5) + scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(Network5), data = Seg_t1)
- lm_model_RC3_DMN <- lm(RC3_inv ~ scale(Pc_5) + scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(Network5), data = Seg_t1)
- summary(lm_model_RC1_DMN)
- summary(lm_model_RC2_DMN)
- summary(lm_model_RC3_DMN)
- # plot Pc~Cog relationship
- Seg_t1 = Seg_t1[complete.cases(Seg_t1$RC1), ]
- Seg_t1$RC1_resids <- resid(lm(RC1 ~ scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1))
- Seg_t1$Pc_Global_resids <- resid(lm(Pc_Global ~ scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(No_Nodes_retained), data = Seg_t1))
- Seg_t1$RC1_resids2 <- resid(lm(RC1 ~ scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(Network5), data = Seg_t1))
- Seg_t1$Pc5_resids <- resid(lm(Pc_5 ~ scale(Age) + SexC + scale(YeaoEdu) + scale(meanFD) + scale(Network5), data = Seg_t1))
- ggplot(data=Seg_t1,#filter(Seg_t1, !is.na(apoe4.x)
- aes(x=Pc5_resids, y = RC1_resids2))+ #, color=apoe4.x
- geom_smooth(method=lm)+
- geom_jitter(size = 2, alpha=.6)+
- xlab("DMN Pc")+
- ylab("Episodic and relational memory")+ #∆ Response time in working memory
- scale_x_continuous(labels = scales::number_format(accuracy = 0.01))+#,limits=c(0.10,0.35)
- scale_y_continuous(labels = scales::number_format(accuracy = 0.01))+ #,limits=c(-12,16)
- theme(axis.text=element_text(size=12,colour = "black"),
- axis.title=element_text(size=12,colour = "black"),
- panel.border = element_blank(),
- panel.grid.major = element_blank(),
- panel.grid.minor = element_blank(),
- panel.background = element_blank(),
- axis.line = element_line(colour = "grey",linewidth = 1),
- legend.position = "right")
- # risk impact on longitudinal change of segregation
- Seg_all<-inner_join(Seg_t1_clean,Seg_t2,by="SubjID")
- Pc_Global<-gather(Seg_all[,c("SubjID","apoe4C","Age.x","SexC","Pc_Global.x","Pc_Global.y")], Time, Pc_Global, c("Pc_Global.x","Pc_Global.y"))
- Pc_Global$Time<-factor(Pc_Global$Time)
- levels(Pc_Global$Time)[levels(Pc_Global$Time)=="Pc_Global.x"] <- "Baseline"
- levels(Pc_Global$Time)[levels(Pc_Global$Time)=="Pc_Global.y"] <- "Follow_up"
- Pc_5<-gather(Seg_all[,c("SubjID","Pc_5.x","Pc_5.y")], Time, Pc_5, c("Pc_5.x","Pc_5.y"))
- Pc_5$Time<-factor(Pc_5$Time)
- levels(Pc_5$Time)[levels(Pc_5$Time)=="Pc_5.x"] <- "Baseline"
- levels(Pc_5$Time)[levels(Pc_5$Time)=="Pc_5.y"] <- "Follow_up"
- meanFD<-gather(Seg_all[,c("SubjID","meanFD.x","meanFD.y")], Time, meanFD, c("meanFD.x","meanFD.y"))
- meanFD$Time<-factor(meanFD$Time)
- levels(meanFD$Time)[levels(meanFD$Time)=="meanFD.x"] <- "Baseline"
- levels(meanFD$Time)[levels(meanFD$Time)=="meanFD.y"] <- "Follow_up"
- No_Nodes_retained<-gather(Seg_all[,c("SubjID","No_Nodes_retained.x","No_Nodes_retained.y")], Time, No_Nodes_retained, c("No_Nodes_retained.x","No_Nodes_retained.y"))
- No_Nodes_retained$Time<-factor(No_Nodes_retained$Time)
- levels(No_Nodes_retained$Time)[levels(No_Nodes_retained$Time)=="No_Nodes_retained.x"] <- "Baseline"
- levels(No_Nodes_retained$Time)[levels(No_Nodes_retained$Time)=="No_Nodes_retained.y"] <- "Follow_up"
- Network5<-gather(Seg_all[,c("SubjID","Network5.x","Network5.y")], Time, Network5, c("Network5.x","Network5.y"))
- Network5$Time<-factor(Network5$Time)
- levels(Network5$Time)[levels(Network5$Time)=="Network5.x"] <- "Baseline"
- levels(Network5$Time)[levels(Network5$Time)=="Network5.y"] <- "Follow_up"
- RC1<-gather(Seg_all[,c("SubjID","RC1.x","RC1.y")], Time, RC1, c("RC1.x","RC1.y"))
- RC1$Time<-factor(RC1$Time)
- levels(RC1$Time)[levels(RC1$Time)=="RC1.x"] <- "Baseline"
- levels(RC1$Time)[levels(RC1$Time)=="RC1.y"] <- "Follow_up"
- TotalGrayVol<-gather(Seg_all[,c("SubjID","TotalGrayVol.x","TotalGrayVol.y")], Time, TotalGrayVol, c("TotalGrayVol.x","TotalGrayVol.y"))
- TotalGrayVol$Time<-factor(TotalGrayVol$Time)
- levels(TotalGrayVol$Time)[levels(TotalGrayVol$Time)=="TotalGrayVol.x"] <- "Baseline"
- levels(TotalGrayVol$Time)[levels(TotalGrayVol$Time)=="TotalGrayVol.y"] <- "Follow_up"
- TICV<-gather(Seg_all[,c("SubjID","TICV.x","TICV.y")], Time, TICV, c("TICV.x","TICV.y"))
- TICV$Time<-factor(TICV$Time)
- levels(TICV$Time)[levels(TICV$Time)=="TICV.x"] <- "Baseline"
- levels(TICV$Time)[levels(TICV$Time)=="TICV.y"] <- "Follow_up"
- Pc<-left_join(Pc_Global,Pc_5)
- Pc<-left_join(Pc,meanFD)
- Pc<-left_join(Pc,No_Nodes_retained)
- Pc<-left_join(Pc,Network5)
- Pc<-left_join(Pc,RC1)
- Pc<-left_join(Pc,TotalGrayVol)
- Pc<-left_join(Pc,TICV)
- Pc[Pc$Time == 'Baseline','TimeC'] = -1
- Pc[Pc$Time == 'Follow_up','TimeC'] = 1
- model <- lmer(scale(Pc_Global) ~ TimeC*apoe4C + scale(Age.x) + SexC + scale(meanFD) + scale(No_Nodes_retained) + (1 | SubjID), data = Pc)
- model_5 <- lmer(scale(Pc_5) ~ TimeC*apoe4C+ scale(Age.x) + SexC + scale(meanFD) + scale(Network5) + (1 | SubjID), data = Pc)
- summary(model)
- round(confint(model), 2)
- summary(model_5)
- round(confint(model_5), 2)
- model_cog <- lmer(RC1 ~ TimeC*scale(Pc_Global) + scale(Age.x) + SexC + scale(meanFD) + scale(No_Nodes_retained) + (1 | SubjID), data = Pc)
- model_cog_5 <- lmer(RC1 ~ TimeC*scale(Pc_5)+ scale(Age.x) + SexC + scale(meanFD) + scale(Network5) + (1 | SubjID), data = Pc)
- summary(model_cog)
- summary(model_cog_5)
- # simple effects testing
- noncarriers<-filter(Seg_all,apoe4.x=="non-carriers")
- carriers<-filter(Seg_all,apoe4.x=="carriers")
- t.test(carriers$Pc_5.x,carriers$Pc_5.y,paired = T)#p=0.007
- t.test(noncarriers$Pc_5.x,noncarriers$Pc_5.y,paired = T)#p=0.49
- # plot longitudinal results
- Pc$resid_Pc <- resid(lmer(Pc_Global ~ scale(Age.x) + SexC + scale(meanFD) + scale(No_Nodes_retained) + (1 | SubjID), data = Pc))
- Pc$resid_Pc_5 <- resid(lmer(Pc_5 ~ scale(Age.x) + SexC + scale(meanFD) + scale(Network5) + (1 | SubjID), data = Pc))
- Pc$Timen<-as.numeric(Pc$Time)
- set.seed(123)
- Pc$Timenj<-jitter(Pc$Timen,amount=0.09)
- noncarriers<-filter(Pc,apoe4C==-1)
- carriers<-filter(Pc,apoe4C==1)
- library(Rmisc)
- noncarriers_SE <- summarySE(noncarriers, measurevar="resid_Pc", groupvars="Timen")
- carriers_SE <- summarySE(carriers, measurevar="resid_Pc", groupvars="Timen")
- ggplot(data=carriers, aes(y = resid_Pc))+ #CHANGE
- geom_point(data=carriers%>%filter(Timen=="1"), aes(x = Timenj), color = "salmon", size=2, alpha=.6)+
- geom_point(data=carriers%>%filter(Timen=="2"), aes(x = Timenj), color = "salmon", size=2, alpha=.6)+
- geom_line(data=carriers, aes(x=Timenj, group=SubjID), color='gray', alpha=.5)+
- geom_errorbar(data=carriers_SE, aes(x=Timen, ymin=resid_Pc-ci, ymax=resid_Pc+ci), width=.1) +
- geom_point(data=carriers_SE, aes(x=Timen, y=resid_Pc), shape=21, color="black", fill="salmon", size=2, stroke=1) +
- geom_line(data=carriers_SE, aes(x=Timen), color='salmon', linewidth=1, alpha=.5) +
- geom_half_violin(data=carriers %>% filter(Timen=="1"), aes(x = Timen, y = resid_Pc), #CHANGE
- position=position_nudge(x=1.3),side="r",width=.5, fill="salmon",alpha=.6)+
- geom_half_violin(data=carriers %>% filter(Timen=="2"), aes(x = Timen, y = resid_Pc), #CHANGE
- position=position_nudge(x=.3),side="r",width=.5, fill="salmon",alpha=.6)+
- scale_x_continuous(breaks = c(1,2),labels=c("Baseline","Follow-up"),limits = c(0,3))+ #,limits = c(0.5,3)
- scale_y_continuous(labels = scales::number_format(accuracy = 0.01),limits=c(-0.035,0.035))+ #,,limits=c(-0.35,-0.25)
- labs(title = "APOE ɛ4 carriers", y="Global Pc")+
- theme(axis.text=element_text(size=12,colour = "black"),
- axis.title=element_text(size=12,colour = "black"),
- panel.border = element_blank(),
- panel.grid.major = element_blank(),
- panel.grid.minor = element_blank(),
- panel.background = element_blank(),
- axis.line = element_line(colour = "black",linewidth = 0.5),
- legend.position = "none",
- axis.title.x=element_blank())
- ggplot(data=noncarriers, aes(y = resid_Pc))+ #CHANGE
- geom_point(data=noncarriers%>%filter(Timen=="1"), aes(x = Timenj), color = "cornflowerblue", size=2, alpha=.4)+
- geom_point(data=noncarriers%>%filter(Timen=="2"), aes(x = Timenj), color = "cornflowerblue", size=2, alpha=.4)+
- geom_line(data=noncarriers, aes(x=Timenj, group=SubjID), color='gray', alpha=.5)+
- geom_errorbar(data=noncarriers_SE, aes(x=Timen, ymin=resid_Pc-ci, ymax=resid_Pc+ci), width=.1) +
- geom_point(data=noncarriers_SE, aes(x=Timen, y=resid_Pc), shape=21, color="black", fill="cornflowerblue", size=2, stroke=1) +
- geom_line(data=noncarriers_SE, aes(x=Timen), color='cornflowerblue', linewidth=1, alpha=.5) +
- geom_half_violin(data=noncarriers %>% filter(Timen=="1"), aes(x = Timen, y = resid_Pc), #CHANGE
- position=position_nudge(x=-.3),side="l",width=.5, fill="cornflowerblue",alpha=.4)+
- geom_half_violin(data=noncarriers %>% filter(Timen=="2"), aes(x = Timen, y = resid_Pc), #CHANGE
- position=position_nudge(x=-1.3),side="l",width=.5, fill="cornflowerblue",alpha=.4)+
- scale_x_continuous(breaks = c(1,2),labels=c("Baseline","Follow-up"),limits = c(0,3))+ #,limits = c(0.5,3)
- scale_y_continuous(labels = scales::number_format(accuracy = 0.01),limits=c(-0.035,0.035))+ #,,limits=c(-0.35,-0.25) c(-0.35, -0.10)
- labs(title = "APOE ɛ4 non-carriers", y="Global Pc")+
- theme(axis.text=element_text(size=12,colour = "black"),
- axis.title=element_text(size=12,colour = "black"),
- panel.border = element_blank(),
- panel.grid.major = element_blank(),
- panel.grid.minor = element_blank(),
- panel.background = element_blank(),
- axis.line = element_line(colour = "black",linewidth = 0.5),
- legend.position = "none",
- axis.title.x=element_blank())
risk_on_segregation_PREVENT.R at commit 868dbc2, no license · at the source
Overview
- School of Psychology, Shenzhen University,Shenzhen, China
- Medical Research Council Cognition and Brain Sciences Unit, University of Cambridge,Cambridge, UK
- Department of Psychiatry, School of Clinical Medicine, University of Cambridge,Cambridge, UK
- Edinburgh Dementia Prevention, University of Edinburgh,Edinburgh, UK
- Department of Social Medicine, Ohio University, Ohio,Athens, OH USA
- Department of Brain Science, Imperial College London,London, UK
- UK Dementia Research Institute Care Research and Technology Centre, Imperial College London and the University of Surrey,London, UK
- Cambridgeshire and Peterborough NHS Foundation Trust,Cambridge, UK
- Scottish Brain Sciences, Edinburgh, UK
- Trinity College Institute of Neuroscience, School of Psychology, Trinity College Dublin,Dublin, Ireland
- Global Brain Health Institute, Trinity College Dublin,Dublin, Ireland
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.
Repository
Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.
fengdeng315/Segregation_risk_age
868dbc2431e114e03bbc09f7ab4ec2e21724b920, 1 April 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
3 files
- age_on_segregation_CamCA
N.R , R, 148 lines - risk_on_segregation_PREV
ENT.R , R, 349 lines, 1 match - README.md, Text, 1 line
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: fengdeng315/
Segregation_risk_age
Read it in the paper: doi.org/10.1038/s42003-026-10282-0.
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;
- 2 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
No dataset and no data link were found in the paper.
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:
- no repository, dataset or request procedure was recognized in it
Read it in the paper: doi.org/10.1038/s42003-026-10282-0.
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, 4 keywords, 18 MeSH terms, 2 funders, 102 references.
Cite
This paper
Deng, F., Henson, R. N., Muniz-Terrera, G., Malhotra, P., O’Brien, J. T., Ritchie, C. W., Lawlor, B., & Naci, L. (2026). Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife. Communications biology, 9(1), 1067. https://
BibTeX
@article{deng2026genetic
author = {Deng, Feng and Henson, Richard N. and Muniz-Terrera, Graciela and Malhotra, Paresh and O’Brien, John T. and Ritchie, Craig W. and Lawlor, Brian and Naci, Lorina},
title = {{Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife}},
journal = {Communications biology},
year = {2026},
month = may,
volume = {9},
number = {1},
pages = {1067},
publisher = {Nature Portfolio},
issn = {2399-3642},
doi = {10.1038/
url = {https://
pmid = {42157001},
pmcid = {PMC13454165}
}
RIS
TY - JOUR
AU - Deng, Feng
AU - Henson, Richard N.
AU - Muniz-Terrera, Graciela
AU - Malhotra, Paresh
AU - O’Brien, John T.
AU - Ritchie, Craig W.
AU - Lawlor, Brian
AU - Naci, Lorina
TI - Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/
VL - 9
IS - 1
SP - 1067
SN - 2399-3642
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife",
"container-title": "Communications biology",
"author": [
{
"family": "Deng",
"given": "Feng"
},
{
"family": "Henson",
"given": "Richard N."
},
{
"family": "Muniz-Terrera",
"given": "Graciela"
},
{
"family": "Malhotra",
"given": "Paresh"
},
{
"family": "O’Brien",
"given": "John T."
},
{
"family": "Ritchie",
"given": "Craig W."
},
{
"family": "Lawlor",
"given": "Brian"
},
{
"family": "Naci",
"given": "Lorina"
}
],
"container-title-short":
"volume": "9",
"issue": "1",
"page": "1067",
"DOI": "10.1038/
"PMID": "42157001",
"PMCID": "PMC13454165",
"ISSN": "2399-3642",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
19
]
]
}
}
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.1523/jneurosci.0579-23.2023 [code]
- Dissociable Effects of Alzheimer's Disease-Related Cognitive Dysfunction and Aging on Functional Brain Network Segregation.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: Alzheimer's / dementia, 20 references
- [2] doi:10.1093/cercor/bhad506
- Measures of resting-state brain network segregation and integration vary in relation to data quantity: implications for within and between subject comparisons of functional brain network organization.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: 19 references
- [3] doi:10.1093/cercor/bhac387 [code]
- Age-related reorganization of functional network architecture in semantic cognition.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: easystats, rstatix, psych, 2 other tools, 13 references
- [4] doi:10.1016/j.neurobiolaging.2023.11.009 [code]
- Does functional system segregation mediate the effects of lifestyle on cognition in older adults?Journal: Neurobiology of agingIn common: broom, easystats, psych, 2 other tools, 12 references
- [5] doi:10.1038/s43587-021-00125-4 [code]
- Long-term prognosis and educational determinants of brain network decline in older adult individuals.Journal: Nature agingIn common: Alzheimer's / dementia, clinical / translational, 16 references
- [6] doi:10.1002/hbm.26650 [code]
- Modeling the neurocognitive dynamics of language across the lifespan.Journal: Human brain mappingIn common: easystats, rstatix, car, 2 other tools, 12 references
- [7] doi:10.1002/alz.13733 [code]
- Entorhinal-based path integration selectively predicts midlife risk of Alzheimer's disease.Journal: Alzheimer's & dementia : the journal of the Alzheimer's AssociationIn common: Alzheimer's / dementia, 5 references, 2 authors
- [8] doi:10.1038/s41467-021-25492-9 [code]
- Accelerated functional brain aging in pre-clinical familial Alzheimer's disease.Journal: Nature communicationsIn common: easystats, lmerTest, lme4, 1 other tool, Alzheimer's / dementia, clinical / translational, 10 references
- [9] doi:10.1186/s40337-026-01671-1 [code]
- Aberrant large- and mesoscale network segregation and integration in bulimia nervosa.Journal: Journal of eating disordersIn common: broom, easystats, car, 2 other tools, 9 references
- [10] doi:10.64898/2026.03.20.713139 [code]
- Dissociable contributions of cortical thickness and surface area to cognitive ageing: evidence from multiple longitudinal cohortsJournal: bioRxiv (preprint)In common: broom, easystats, psych, 5 other tools, 1 reference, author Richard N Henson
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, 2 scripts, and 1 match 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:7c1483ac21a14aad…
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/s42003-026-10282-0)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s42003-026-10282-0.svg
:target: https://openscicode.org/badge/doi/10.1038/s42003-026-10282-0
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s42003-026-10282-0"><img src="https://openscicode.org/badge/doi/10.1038/s42003-026-10282-0.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.
