OSCR

Acute and longitudinal magnetic resonance imaging abnormalities in antibody-mediated encephalitis.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 885 lines · 41 KB · no license

  1. # MRI Ab-mediated encephalitis data code
  2. library(tidyverse)
  3. library(lubridate)
  4. library(dplyr)
  5. MRI1 <- MRI1 |>
  6. mutate(date_first_immunotherapy = pmin(
  7. pulsesteroids1,
  8. ivig1,
  9. plasma_exchange1,
  10. na.rm = TRUE
  11. ))
  12. MRI1$first_line_received <- ifelse(!is.na(MRI1$date_first_immunotherapy), 1, 0)
  13. # time to first
  14. MRI1$time_to_firstline <- difftime(MRI1$date_first_immunotherapy, MRI1$date_symptoms, "days")
  15. # limit time to first to maximum of 365 days from admission_date
  16. MRI1 <- MRI1 %>%
  17. mutate(time_to_firstline = pmin(time_to_firstline, as.numeric(first_admission_date + 365 - date_symptoms)))
  18. # replace "0" with NA in incomplete MRI's - ask Paul for a way to do this along columns in one go #
  19. MRI1$T1 <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T1)
  20. MRI1$T2 <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2)
  21. MRI1$CEL <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL)
  22. MRI1$DWI <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI)
  23. MRI1$T2_left_frontal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_frontal)
  24. MRI1$T2_left_parietal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_parietal)
  25. MRI1$T2_left_occipital <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_occipital)
  26. MRI1$T2_left_brainstem <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_brainstem)
  27. MRI1$T2_left_cerebellum <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_cerebellum)
  28. MRI1$T2_left_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_temporal)
  29. MRI1$T2_left_mesial_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_mesial_temporal)
  30. MRI1$T2_left_insular <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_left_insular)
  31. MRI1$T2_right_frontal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_frontal)
  32. MRI1$T2_right_parietal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_parietal)
  33. MRI1$T2_right_occipital <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_occipital)
  34. MRI1$T2_right_brainstem <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_brainstem)
  35. MRI1$T2_right_cerebellum <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_cerebellum)
  36. MRI1$T2_right_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_temporal)
  37. MRI1$T2_right_mesial_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_mesial_temporal)
  38. MRI1$T2_right_insular <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$T2_right_insular)
  39. MRI1$CEL_left_frontal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_frontal)
  40. MRI1$CEL_left_parietal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_parietal)
  41. MRI1$CEL_left_occipital <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_occipital)
  42. MRI1$CEL_left_brainstem <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_brainstem)
  43. MRI1$CEL_left_cerebellum <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_cerebellum)
  44. MRI1$CEL_left_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_temporal)
  45. MRI1$CEL_left_mesial_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_mesial_temporal)
  46. MRI1$CEL_left_insular <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_left_insular)
  47. MRI1$CEL_right_frontal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_frontal)
  48. MRI1$CEL_right_parietal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_parietal)
  49. MRI1$CEL_right_occipital <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_occipital)
  50. MRI1$CEL_right_brainstem <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_brainstem)
  51. MRI1$CEL_right_cerebellum <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_cerebellum)
  52. MRI1$CEL_right_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_temporal)
  53. MRI1$CEL_right_mesial_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_mesial_temporal)
  54. MRI1$CEL_right_insular <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$CEL_right_insular)
  55. MRI1$DWI_left_frontal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_frontal)
  56. MRI1$DWI_left_parietal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_parietal)
  57. MRI1$DWI_left_occipital <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_occipital)
  58. MRI1$DWI_left_brainstem <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_brainstem)
  59. MRI1$DWI_left_cerebellum <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_cerebellum)
  60. MRI1$DWI_left_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_temporal)
  61. MRI1$DWI_left_mesial_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_mesial_temporal)
  62. MRI1$DWI_left_insular <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_left_insular)
  63. MRI1$DWI_right_frontal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_frontal)
  64. MRI1$DWI_right_parietal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_parietal)
  65. MRI1$DWI_right_occipital <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_occipital)
  66. MRI1$DWI_right_brainstem <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_brainstem)
  67. MRI1$DWI_right_cerebellum <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_cerebellum)
  68. MRI1$DWI_right_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_temporal)
  69. MRI1$DWI_right_mesial_temporal <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_mesial_temporal)
  70. MRI1$DWI_right_insular <- ifelse(is.na(MRI1$mri_abnormal), MRI1$mri_abnormal, MRI1$DWI_right_insular)
  71. # create regions #
  72. MRI1$T2_mesial_temporal <- MRI1$T2_left_mesial_temporal + MRI1$T2_right_mesial_temporal
  73. MRI1$T2_mesial_temporal_bilateral <- car::recode(MRI1$T2_mesial_temporal, "2=1; 0=0; 1=0")
  74. MRI1$T2_mesial_temporal <- car::recode(MRI1$T2_mesial_temporal, "2=1; 1=1; 0=0")
  75. MRI1$T2_temporal <- MRI1$T2_left_temporal + MRI1$T2_right_temporal
  76. MRI1$T2_temporal <- car::recode(MRI1$T2_temporal, "2=1; 1=1; 0=0")
  77. MRI1$T2_extratemporal <- MRI1$T2_left_basal_ganglia + MRI1$T2_left_brainstem + MRI1$T2_left_cerebellum + MRI1$T2_left_frontal + MRI1$T2_left_insular + MRI1$T2_left_occipital + MRI1$T2_right_occipital + MRI1$T2_right_basal_ganglia + MRI1$T2_right_brainstem + MRI1$T2_right_cerebellum + MRI1$T2_right_frontal+MRI1$T2_right_parietal+MRI1$T2_right_insular+MRI1$T2_right_occipital
  78. MRI1$T2_extratemporal <- car::recode(MRI1$T2_extratemporal, "1:7=1; 0=0")
  79. MRI1$DWI_coded <- MRI1$DWI_left_brainstem + MRI1$DWI_left_cerebellum + MRI1$DWI_left_frontal + MRI1$DWI_left_parietal + MRI1$DWI_left_insular + MRI1$DWI_left_temporal + MRI1$DWI_left_basal_ganglia + MRI1$DWI_left_mesial_temporal + MRI1$DWI_right_brainstem + MRI1$DWI_right_cerebellum + MRI1$DWI_right_frontal + MRI1$DWI_right_parietal + MRI1$DWI_right_insular + MRI1$DWI_right_basal_ganglia + MRI1$DWI_right_mesial_temporal + MRI1$DWI_right_occipital + MRI1$DWI_right_parietal + MRI1$DWI_right_temporal
  80. MRI1$DWI_coded <- car::recode(MRI1$DWI_coded, "1:2=1; 0=0")
  81. MRI1$CEL_coded <- MRI1$CEL_left_brainstem + MRI1$CEL_left_cerebellum + MRI1$CEL_left_frontal + MRI1$CEL_left_insular + MRI1$CEL_left_basal_ganglia + MRI1$CEL_left_mesial_temporal + MRI1$CEL_left_mesial_temporal + MRI1$CEL_left_occipital + MRI1$CEL_left_parietal + MRI1$CEL_left_temporal + MRI1$CEL_right_brainstem + MRI1$CEL_right_cerebellum + MRI1$CEL_right_frontal + MRI1$CEL_right_insular + MRI1$CEL_right_basal_ganglia + MRI1$CEL_right_mesial_temporal + MRI1$CEL_right_occipital + MRI1$CEL_right_parietal+ MRI1$CEL_right_temporal
  82. MRI1$CEL_coded <- car::recode(MRI1$CEL_coded, "1:3=1; 0=0")
  83. MRI1$hippocampi_swelling_any <- ifelse((MRI1$size_hippo_l == 2 | MRI1$size_hippo_r == 2), 1, 0)
  84. MRI1$hippocampi_swelling_bilat <- ifelse((MRI1$size_hippo_l == 2 & MRI1$size_hippo_r == 2), 1, 0)
  85. MRI1$T2_extra_mesial_temporal <- MRI1$T2_temporal + MRI1$T2_extratemporal
  86. MRI1$T2_extra_mesial_temporal <- car::recode(MRI1$T2_extra_mesial_temporal, "1:2=1; 0=0")
  87. MRI1$focal_atrophy <- ifelse(MRI1$atrophy == 1 | MRI1$atrophy == 3, 1, 0)
  88. MRI1$time_to_MRI <- difftime(MRI1$date_of_mri, MRI1$date_symptoms, "days")
  89. dat2 <- MRI1 |>
  90. filter(final_diag == 5)
  91. dat2$m_mrs_good <- ifelse(dat2$m_mrs < 3, 1, 0)
  92. dat2$CASE_12 <- factor(dat2$CASE_12, ordered = TRUE)
  93. dat2$time_to_firstline <- ifelse(dat2$participant_id == "9057-81", difftime(dat2$date_visit_3, dat2$date_symptoms, units = "days"), dat2$time_to_firstline)
  94. # adjust time to first line to be a maximum of time to visit_3
  95. dat2 <- dat2 %>%
  96. mutate(
  97. time_to_firstline = as.numeric(time_to_firstline),
  98. time_to_firstline = if_else(
  99. !is.na(date_visit_3) & as.numeric(date_visit_3 - date_symptoms) < time_to_firstline,
  100. as.numeric(date_visit_3 - date_symptoms),
  101. time_to_firstline
  102. )
  103. )
  104. dat2$time_to_firstline <- ifelse(dat2$participant_id == "9057-81", dat2$date_visit_3 - dat2$date_symptoms, dat2$time_to_firstline)
  105. dat2$twelve_good <- ifelse(dat2$m_mrs_good == 1 & dat2$seizures_12 < 2 & dat2$memory_12 < 2, 1, 0)
  106. model1 <- glm(m_mrs_good ~ hippocampi_swelling_any, family = "binomial", data = dat2)
  107. exp(cbind(OR=coef(model1), confint.default(model1)))
  108. summary(model1)
  109. model2 <- glm(m_mrs_good ~ time_to_firstline, family = "binomial", data = dat2)
  110. exp(cbind(OR=coef(model2), confint.default(model2)))
  111. summary(model2)
  112. model3 <- glm(m_mrs_good ~ hippocampi_swelling_any + time_to_firstline + nadir_mrs+age_symptom_onset, family = "binomial", data = dat2)
  113. exp(cbind(OR=coef(model3), confint.default(model3)))
  114. summary(model3)
  115. model4 <- glm(m_mrs_good ~ T2 + time_to_firstline + nadir_mrs+age_symptom_onset, family = "binomial", data = dat2)
  116. exp(cbind(OR=coef(model4), confint.default(model4)))
  117. summary(model4)
  118. model5 <- glm(twelve_good ~ hippocampi_swelling_any + time_to_firstline, family = "binomial", data = dat2)
  119. exp(cbind(OR=coef(model5), confint.default(model5)))
  120. summary(model5)
  121. # NMDAR
  122. dat4 <- MRI1 |>
  123. filter(final_diag == 4)
  124. dat4$m_mrs_good <- ifelse(dat4$m_mrs < 3, 1, 0)
  125. dat4$CASE_12 <- factor(dat4$CASE_12, ordered = TRUE)
  126. dat4$time_to_firstline <- as.numeric(dat4$time_to_firstline)
  127. dat4 <- dat4 %>%
  128. mutate(
  129. time_to_firstline = as.numeric(time_to_firstline),
  130. time_to_firstline = if_else(
  131. !is.na(date_visit_3) & as.numeric(date_visit_3 - date_symptoms) < time_to_firstline,
  132. as.numeric(date_visit_3 - date_symptoms),
  133. time_to_firstline
  134. )
  135. )
  136. model6 <- glm(m_mrs_good ~ T2, family = "binomial", data = dat4)
  137. exp(cbind(OR=coef(model6), confint.default(model6)))
  138. summary(model6)
  139. model7 <- glm(m_mrs_good ~ age_symptom_onset, family = "binomial", data = dat4)
  140. exp(cbind(OR=coef(model7), confint.default(model7)))
  141. summary(model7)
  142. model8 <- glm(m_mrs_good ~ sex, family = "binomial", data = dat4)
  143. exp(cbind(OR=coef(model8), confint.default(model8)))
  144. summary(model8)
  145. model9 <- glm(m_mrs_good ~ nadir_mrs, family = "binomial", data = dat4)
  146. exp(cbind(OR=coef(model9), confint.default(model9)))
  147. summary(model9)
  148. model10 <- glm(m_mrs_good ~ time_to_firstline, family = "binomial", data = dat4)
  149. exp(cbind(OR=coef(model10), confint.default(model10)))
  150. summary(model10)
  151. model11 <- glm(m_mrs_good ~ T2 + time_to_firstline + nadir_mrs+age_symptom_onset+sex, family = "binomial", data = dat4)
  152. exp(cbind(OR=coef(model11), confint.default(model11)))
  153. summary(model11)
  154. # sensitivity analyses
  155. # Time to MRI, VIF, NMDAR
  156. library(car)
  157. model12 <- glm(
  158. m_mrs_good ~ age_symptom_onset +
  159. nadir_mrs +
  160. time_to_firstline +
  161. time_to_MRI +
  162. T2,
  163. family = binomial,
  164. data = dat2
  165. )
  166. vif(model12)
  167. exp(cbind(OR=coef(model12), confint.default(model12)))
  168. summary(model12)
  169. model13 <- glm(
  170. m_mrs_good ~ age_symptom_onset +
  171. nadir_mrs +
  172. time_to_firstline +
  173. time_to_MRI +
  174. T2,
  175. family = binomial,
  176. data = dat4
  177. )
  178. vif(model13)
  179. model14 <- glm(
  180. m_mrs_good ~ age_symptom_onset +
  181. nadir_mrs +
  182. time_to_firstline +
  183. time_to_MRI +
  184. T2,
  185. family = binomial,
  186. data = dat4a
  187. )
  188. vif(model14)
  189. # VIF here breached including both times
  190. model15 <- glm(m_mrs_good ~ T2 + time_to_MRI + nadir_mrs+age_symptom_onset+sex, family = "binomial", data = dat4)
  191. exp(cbind(OR=coef(model15), confint.default(model15)))
  192. summary(model15)
  193. # Time to MRI, VIF, LGI1
  194. # VIF
  195. model16 <- glm(
  196. m_mrs_good ~ hippocampi_swelling_any +
  197. age_symptom_onset +
  198. nadir_mrs +
  199. time_to_firstline +
  200. time_to_MRI,
  201. family = binomial,
  202. data = dat2
  203. )
  204. vif(model16)
  205. exp(cbind(OR=coef(model16), confint.default(model16)))
  206. summary(model16)
  207. # Table 1
  208. library(gtsummary)
  209. MRI1 <- MRI1 |>
  210. filter(!is.na(date_of_mri))
  211. MRI1$MRI_before_first <- ifelse(MRI1$date_of_mri < MRI1$date_first_immunotherapy | MRI1$date_of_mri == MRI1$date_first_immunotherapy, 1, 0)
  212. MRI1 <- MRI1 |>
  213. filter(final_diag == 4 | final_diag == 5 | final_diag == 6 | final_diag == 7 | final_diag == 8)
  214. MRI1 <- MRI1 |>
  215. ungroup()
  216. MRI1 <- MRI1 |>
  217. filter(!is.na(mri_abnormal))
  218. MRI1$final_diag_new <- factor(MRI1$final_diag,
  219. levels = c("4","5","6","7","8"),
  220. labels = c(
  221. "NMDAR",
  222. "LGI1",
  223. "CASPR2",
  224. "GABAB",
  225. "AMPAR"))
  226. tbl3 <- MRI1 |>
  227. select(final_diag_new, time_to_MRI, MRI_before_first, T2, T2_mesial_temporal, T2_mesial_temporal_bilateral, T2_temporal, T2_extratemporal, DWI_coded, CEL_coded, hippocampi_swelling_any, hippocampi_swelling_bilat, focal_atrophy, hippo_sclerosis) |>
  228. tbl_summary(
  229. by = final_diag_new,
  230. statistic = list(
  231. all_continuous() ~ "{median} ({p25},{p75})", # Median and IQR for continuous
  232. all_categorical() ~ "{n} ({p}%)" # Count and percentage for categorical
  233. ),
  234. digits = list(
  235. all_continuous() ~ 0, # No decimal places for continuous variables
  236. all_categorical() ~ c(0, 0) # No decimal places for categorical percentages
  237. ),
  238. missing_text = "(Missing)",
  239. label = c(
  240. time_to_MRI ~ "Time to MRI",
  241. MRI_before_first ~ "MRI before 1st line immunotherapy",
  242. T2 ~ "T2/FLAIR hyperintensity",
  243. T2_mesial_temporal ~ "T2/FLAIR mesial temporal",
  244. T2_mesial_temporal_bilateral ~ "Bilateral T2/FLAIR mesial temporal",
  245. T2_temporal ~ "T2/FLAIR temporal",
  246. T2_extratemporal ~ "T2/FLAIR extratemporal",
  247. DWI_coded ~ "DWI",
  248. CEL_coded ~ "CEL",
  249. hippocampi_swelling_any ~ "any hippocampi swelling",
  250. hippocampi_swelling_bilat ~ "bilateral hippocampi swelling",
  251. focal_atrophy ~ "focal atrophy",
  252. hippo_sclerosis ~ "Hippocampal sclerosis"
  253. )
  254. ) |>
  255. add_overall() # Add overall summary column
  256. # follow up evaluations
  257. # remove additional dates
  258. dat1 <- dat |>
  259. filter(final_diag == 4 | final_diag == 5 | final_diag == 6 | final_diag == 7 | final_diag == 8)
  260. # populate treatment variables further
  261. dat1 <- dat1 |>
  262. group_by(participant_id) |>
  263. fill(pulsesteroids1, .direction = "down")
  264. dat1 <- dat1 |>
  265. group_by(participant_id) |>
  266. fill(ivig1, .direction = "down")
  267. dat1 <- dat1 |>
  268. group_by(participant_id) |>
  269. fill(plasma_exchange1, .direction = "down")
  270. dat1 <- dat1 |>
  271. group_by(participant_id) |>
  272. fill(rituximab1, .direction = "down")
  273. dat1$hippocampi_swelling_any <- ifelse((dat1$size_hippo_l == 2 | dat1$size_hippo_r == 2), 1, 0)
  274. dat1$hippocampi_swelling_bilat <- ifelse((dat1$size_hippo_l == 2 & dat1$size_hippo_r == 2), 1, 0)
  275. dat1 <- dat1 |>
  276. group_by(participant_id) |>
  277. fill(nadir_mrs, .direction = "down")
  278. dat1 <- dat1 |>
  279. filter(!is.na(date_of_mri))
  280. dat1$date_visit_12m <- as.Date(ifelse(dat1$row_num == 1, dat1$date_visit_3, NA))
  281. dat1 <- dat1 |>
  282. group_by(participant_id) |>
  283. fill(date_visit_12m, .direction = "down")
  284. # remove duplicates of first row/date:
  285. dat1_cleaned <- dat1 %>%
  286. group_by(participant_id) %>%
  287. mutate(first_mri_date = first(date_of_mri)) %>%
  288. filter(!(date_of_mri == first_mri_date & row_number() < max(row_number()[date_of_mri == first_mri_date]))) %>%
  289. ungroup()
  290. # Create a new dat1_cleaned with only patients who have more than one MRI date
  291. dat1_follow_up <- dat1_cleaned %>%
  292. group_by(participant_id) %>% # Group by patient ID
  293. filter(n() > 1) %>% # Filter patients with more than one MRI date
  294. ungroup() # Ungroup the data
  295. # create variable depicting date of first MRI:
  296. dat1_follow_up <- dat1_follow_up %>%
  297. group_by(participant_id) %>%
  298. mutate(date_of_first_MRI = min(date_of_mri, na.rm = TRUE)) %>%
  299. ungroup()
  300. # create atrophy
  301. # create mesial temporal atrophy
  302. dat1_follow_up$mesial_temporal_atrophy <- ifelse(dat1_follow_up$atrophy_left_mesial_temporal == 1 | dat1_follow_up$atrophy_right_mesial_temporal == 1, 1, 0)
  303. # frontal atrophy
  304. dat1_follow_up$frontal_atrophy <- ifelse(dat1_follow_up$atrophy_left_frontal == 1 | dat1_follow_up$atrophy_right_frontal == 1, 1, 0)
  305. # parietal atrophy
  306. dat1_follow_up$parietal_atrophy <- ifelse(dat1_follow_up$atrophy_left_parietal == 1 | dat1_follow_up$atrophy_right_parietal == 1, 1, 0)
  307. # temporal atrophy
  308. dat1_follow_up$temporal_atrophy <- ifelse(dat1_follow_up$atrophy_left_temporal == 1 | dat1_follow_up$atrophy_right_temporal == 1, 1, 0)
  309. # occipital atrophy
  310. dat1_follow_up$occipital_atrophy <- ifelse(dat1_follow_up$atrophy_left_occipital == 1 | dat1_follow_up$atrophy_right_occipital == 1, 1, 0)
  311. # cerebellar atrophy
  312. dat1_follow_up$cerebellar_atrophy <- ifelse(dat1_follow_up$atrophy_left_cerebellum == 1 | dat1_follow_up$atrophy_right_cerebellum == 1, 1, 0)
  313. # 'dat1_follow_up' will have patients with more than one MRI date
  314. dat1_follow_up2 <- dat1_follow_up |>
  315. select(participant_id, final_diag, age_symptom_onset, sex, nadir_mrs, first_admission_date, date_symptoms, date_of_mri, date_of_first_MRI, mri_abnormal, T2, atrophy, atrophy_left_mesial_temporal, atrophy_right_mesial_temporal, hippo_sclerosis, T2_right_mesial_temporal, T2_left_mesial_temporal, pulsesteroids1, ivig1, plasma_exchange1, rituximab1, hippocampi_swelling_any, hippocampi_swelling_bilat, final_visit_date, final_visit_mrs, final_visit_CASE, date_final_CASE, final_visit_memory, final_visit_seizures, dre, mesial_temporal_atrophy, frontal_atrophy, parietal_atrophy, temporal_atrophy, occipital_atrophy, cerebellar_atrophy, date_symptoms, date_visit_3, m_mrs, CASE_12, memory_12, date_visit_3, date_visit_12m)
  316. dat1_follow_up2$focal_atrophy <- ifelse(dat1_follow_up2$atrophy == 1 | dat1_follow_up2$atrophy == 3, 1, 0)
  317. dat1_follow_up2 <- dat1_follow_up2 |>
  318. group_by(participant_id) |>
  319. fill(date_symptoms, .direction = "down")
  320. # (below for T2 persistence)
  321. dat1_follow_up2$time_symptoms_to_MRI <- difftime(dat1_follow_up2$date_of_mri, dat1_follow_up2$date_symptoms, units = "days")
  322. dat1_follow_up2 <- dat1_follow_up2 |>
  323. group_by(participant_id) |>
  324. mutate(row_num = row_number()) |> # sequence row within each person
  325. mutate(max_num = n()) # total number rows per person
  326. dat1_follow_up2$time_MRI_to_MRI <- difftime(dat1_follow_up2$date_of_mri, dat1_follow_up2$date_of_first_MRI, units = "days")
  327. dat1_follow_up2 <- dat1_follow_up2 |>
  328. group_by(participant_id) |>
  329. mutate(row_num = row_number()) |> # sequence row within each person
  330. mutate(max_num = n()) # total number rows per person
  331. dat1_follow_up2 <- dat1_follow_up2 %>%
  332. group_by(participant_id) %>%
  333. mutate(hippocampi_swelling_initial = hippocampi_swelling_any[row_num == 1]) %>%
  334. ungroup()
  335. # flag last MRI, or if there is focal atrophy, the first MRI with focal atrophy
  336. dat1_follow_up2$flag_last_MR <- ifelse(dat1_follow_up2$row_num == dat1_follow_up2$max_num & dat1_follow_up2$focal_atrophy == 0, 1, 0)
  337. dat1_follow_up2$flag_last_MR <- ifelse((!is.na(dat1_follow_up2$focal_atrophy) & dat1_follow_up2$focal_atrophy == 1), 1, dat1_follow_up2$flag_last_MR)
  338. dat1_follow_up2$T2_initial <- ifelse((dat1_follow_up2$row_num == 1 & dat1_follow_up2$T2 == 1), 1, 0)
  339. dat1_follow_up2$T2_initial <- ifelse(dat1_follow_up2$T2_initial == 0, NA, dat1_follow_up2$T2_initial)
  340. dat1_follow_up2 <- dat1_follow_up2 |>
  341. group_by(participant_id) |>
  342. fill(T2_initial, .direction = "down")
  343. dat1_follow_up2$T2_initial <- ifelse(is.na(dat1_follow_up2$T2_initial), 0, dat1_follow_up2$T2_initial)
  344. dat1_follow_up2$T2_right_mesial_temporal_initial <- ifelse((dat1_follow_up2$row_num == 1 & dat1_follow_up2$T2_right_mesial_temporal == 1), 1, 0)
  345. dat1_follow_up2$T2_right_mesial_temporal_initial <- ifelse(dat1_follow_up2$T2_right_mesial_temporal_initial == 0, NA, dat1_follow_up2$T2_right_mesial_temporal_initial)
  346. dat1_follow_up2 <- dat1_follow_up2 |>
  347. group_by(participant_id) |>
  348. fill(T2_right_mesial_temporal_initial, .direction = "down")
  349. dat1_follow_up2$T2_right_mesial_temporal_initial <- ifelse(is.na(dat1_follow_up2$T2_right_mesial_temporal_initial), 0, dat1_follow_up2$T2_right_mesial_temporal_initial)
  350. dat1_follow_up2$T2_left_mesial_temporal_initial <- ifelse((dat1_follow_up2$row_num == 1 & dat1_follow_up2$T2_left_mesial_temporal == 1), 1, 0)
  351. dat1_follow_up2$T2_left_mesial_temporal_initial <- ifelse(dat1_follow_up2$T2_left_mesial_temporal_initial == 0, NA, dat1_follow_up2$T2_left_mesial_temporal_initial)
  352. dat1_follow_up2 <- dat1_follow_up2 |>
  353. group_by(participant_id) |>
  354. fill(T2_left_mesial_temporal_initial, .direction = "down")
  355. dat1_follow_up2$T2_left_mesial_temporal_initial <- ifelse(is.na(dat1_follow_up2$T2_left_mesial_temporal_initial), 0, dat1_follow_up2$T2_left_mesial_temporal_initial)
  356. dat1_follow_up2$T2_mesial_temporal_initial <- ifelse(dat1_follow_up2$T2_left_mesial_temporal_initial == 1 | dat1_follow_up2$T2_right_mesial_temporal_initial == 1, 1, 0)
  357. dat1_filtered <- dat1_follow_up2 %>%
  358. group_by(participant_id) %>% # Group by participant
  359. arrange(participant_id, date_of_mri) %>% # Arrange by participant and MRI date
  360. filter(row_number() == 1 | date_of_mri >= first(date_of_mri) + months(3)) %>% # Keep the first MRI and those >= 3 months later
  361. ungroup() # Ungroup the data
  362. dat1_filtered <- dat1_filtered |>
  363. group_by(participant_id) |>
  364. mutate(row_num = row_number()) |> # sequence row within each person
  365. mutate(max_num = n()) # total number rows per person
  366. dat1_filtered2 <- dat1_filtered |>
  367. filter(!(max_num ==1))
  368. # flag last MR if no atrophy, first MR that shows atrophy
  369. dat1_filtered2$flag_last_MR <- NA
  370. dat1_filtered2$flag_last_MR <- ifelse(dat1_filtered2$row_num == dat1_filtered2$max_num, 1, 0)
  371. dat1_filtered2$flag_last_MR <- ifelse(!is.na(dat1_filtered2$focal_atrophy) & dat1_filtered2$focal_atrophy == 1, 1, dat1_filtered2$flag_last_MR)
  372. dat1_flagged <- dat1_filtered2 %>%
  373. group_by(participant_id) %>% # Group by participant
  374. mutate(first_flag_last_MR = ifelse(row_number() == which.max(flag_last_MR == 1), 1, 0)) %>% # Flag the first occurrence of "1"
  375. ungroup() # Ungroup the data
  376. # 'dat1_flagged' will contain the flagged data
  377. dat1_flagged <- dat1_flagged |>
  378. filter(first_flag_last_MR == 1)
  379. # create first immunotherapy
  380. dat1_flagged <- dat1_flagged |>
  381. mutate(date_first_immunotherapy = pmin(
  382. pulsesteroids1,
  383. ivig1,
  384. plasma_exchange1,
  385. na.rm = TRUE
  386. ))
  387. # create Cox time variable
  388. dat1_flagged$time <- difftime(dat1_flagged$date_of_mri, dat1_flagged$first_admission_date, "days")
  389. # time to first
  390. dat1_flagged$time_to_firstline <- difftime(dat1_flagged$date_first_immunotherapy, dat1_flagged$date_symptoms, "days")
  391. # limit time to first to maximum date of MRI
  392. dat1_flagged <- dat1_flagged %>%
  393. mutate(
  394. time_to_firstline = as.numeric(time_to_firstline), # Ensure numeric
  395. time_to_firstline = if_else(
  396. !is.na(date_of_mri) & (as.numeric(date_of_mri - date_symptoms) < time_to_firstline),
  397. as.numeric(date_of_mri - date_symptoms), # Replace with the new value if condition is met
  398. time_to_firstline # Otherwise, retain the old value
  399. )
  400. )
  401. dat1_flagged$time_to_firstline <- ifelse(dat1_flagged$participant_id == "9057-81", (dat1_flagged$date_of_mri - dat1_flagged$date_symptoms), dat1_flagged$time_to_firstline)
  402. # dat1_flagged <- dat1_flagged %>%
  403. # mutate(time_to_firstline = pmin(time_to_firstline, as.numeric(first_admission_date + 365 - date_symptoms)))
  404. dat1_flagged$IT30 <- ifelse(dat1_flagged$time_to_firstline < 30, 1, 0) # only a few LGI1
  405. dat1_flagged$LGI1 <- ifelse(dat1_flagged$final_diag == 5, 1, 0)
  406. dat5 <- dat1_flagged |>
  407. filter(final_diag == 5)
  408. dat5$memory_12bad <- ifelse(dat5$memory_12 > 1, 1, 0)
  409. dat5$m_mrs_good <- ifelse(dat5$m_mrs < 3, 1, 0)
  410. dat5$sex <- ifelse(dat5$participant_id == "9061-16", 1, dat5$sex)
  411. model17 <- glm(focal_atrophy ~ hippocampi_swelling_initial, family = "binomial", data = dat5)
  412. exp(cbind(OR=coef(model17), confint.default(model17)))
  413. summary(model17)
  414. model18 <- glm(focal_atrophy ~ age_symptom_onset, family = "binomial", data = dat5)
  415. exp(cbind(OR=coef(model18), confint.default(model18)))
  416. summary(model18)
  417. model19 <- glm(focal_atrophy ~ sex, family = "binomial", data = dat5)
  418. exp(cbind(OR=coef(model19), confint.default(model19)))
  419. summary(model19)
  420. model20 <- glm(focal_atrophy ~ time_to_firstline, family = "binomial", data = dat5)
  421. exp(cbind(OR=coef(model20), confint.default(model20)))
  422. summary(model20)
  423. model21 <- glm(focal_atrophy ~ nadir_mrs, family = "binomial", data = dat5)
  424. exp(cbind(OR=coef(model21), confint.default(model21)))
  425. summary(model21)
  426. model22 <- glm(focal_atrophy ~ T2_initial, family = "binomial", data = dat5)
  427. exp(cbind(OR=coef(model22), confint.default(model22)))
  428. summary(model22)
  429. model23 <- glm(focal_atrophy ~ T2_mesial_temporal_initial, family = "binomial", data = dat5)
  430. exp(cbind(OR=coef(model23), confint.default(model23)))
  431. summary(model23)
  432. model24 <- glm(focal_atrophy ~ hippocampi_swelling_initial + time_to_firstline, family = "binomial", data = dat5)
  433. exp(cbind(OR=coef(model24), confint.default(model24)))
  434. summary(model24)
  435. model25 <- glm(focal_atrophy ~ T2_initial + time_to_firstline, family = "binomial", data = dat5)
  436. exp(cbind(OR=coef(model25), confint.default(model25)))
  437. summary(model25)
  438. model26 <- glm(focal_atrophy ~ T2_mesial_temporal_initial + time_to_firstline, family = "binomial", data = dat5)
  439. exp(cbind(OR=coef(model26), confint.default(model26)))
  440. summary(model26)
  441. model27 <- glm(memory_12bad ~ focal_atrophy, family = "binomial", data = dat5)
  442. exp(cbind(OR=coef(model27), confint.default(model27)))
  443. summary(model27)
  444. model28 <- glm(memory_12bad ~ mesial_temporal_atrophy + age_symptom_onset, family = "binomial", data = dat5)
  445. exp(cbind(OR=coef(model28), confint.default(model28)))
  446. summary(model28)
  447. # HS
  448. dat1_filtered3 <- dat1_filtered |>
  449. filter(!(max_num ==1))
  450. # flag last MR if no atrophy, first MR that shows atrophy
  451. dat1_filtered3$flag_last_MR <- NA
  452. dat1_filtered3$flag_last_MR <- ifelse(dat1_filtered3$row_num == dat1_filtered3$max_num, 1, 0)
  453. dat1_filtered3$flag_last_MR <- ifelse(!is.na(dat1_filtered3$hippo_sclerosis) & dat1_filtered3$hippo_sclerosis == 1, 1, dat1_filtered3$flag_last_MR)
  454. dat1_flagged2 <- dat1_filtered3 %>%
  455. group_by(participant_id) %>% # Group by participant
  456. mutate(first_flag_last_MR = ifelse(row_number() == which.max(flag_last_MR == 1), 1, 0)) %>% # Flag the first occurrence of "1"
  457. ungroup() # Ungroup the data
  458. # 'dat1_flagged2' will contain the flagged data
  459. dat1_flagged2 <- dat1_flagged2 |>
  460. filter(first_flag_last_MR == 1)
  461. # create first immunotherapy
  462. dat1_flagged2 <- dat1_flagged2 |>
  463. mutate(date_first_immunotherapy = pmin(
  464. pulsesteroids1,
  465. ivig1,
  466. plasma_exchange1,
  467. na.rm = TRUE
  468. ))
  469. # create Cox time variable
  470. dat1_flagged2$time <- difftime(dat1_flagged2$date_of_mri, dat1_flagged2$first_admission_date, "days")
  471. # time to first
  472. dat1_flagged2$time_to_firstline <- difftime(dat1_flagged2$date_first_immunotherapy, dat1_flagged2$date_symptoms, "days")
  473. dat1_flagged2 <- dat1_flagged2 %>%
  474. mutate(
  475. time_to_firstline = as.numeric(time_to_firstline), # Ensure numeric
  476. time_to_firstline = if_else(
  477. !is.na(date_of_mri) & (as.numeric(date_of_mri - date_symptoms) < time_to_firstline),
  478. as.numeric(date_of_mri - date_symptoms), # Replace with the new value if condition is met
  479. time_to_firstline # Otherwise, retain the old value
  480. )
  481. )
  482. dat1_flagged2$time_to_firstline <- ifelse(dat1_flagged2$participant_id == "9057-81", dat1_flagged2$date_visit_3 - dat1_flagged2$date_symptoms, dat1_flagged2$time_to_firstline)
  483. dat5a <- dat1_flagged2 |>
  484. filter(final_diag == 5)
  485. dat5a$memory_12bad <- ifelse(dat5a$memory_12 > 1, 1, 0)
  486. dat5a$sex <- ifelse(dat5a$participant_id == "9061-16", 1, dat5a$sex)
  487. model29 <- glm(hippo_sclerosis ~ hippocampi_swelling_initial, family = "binomial", data = dat5a)
  488. exp(cbind(OR=coef(model29), confint.default(model29)))
  489. summary(model29)
  490. model30 <- glm(hippo_sclerosis ~ age_symptom_onset, family = "binomial", data = dat5a)
  491. exp(cbind(OR=coef(model30), confint.default(model30)))
  492. summary(model30)
  493. model31 <- glm(hippo_sclerosis ~ sex, family = "binomial", data = dat5a)
  494. exp(cbind(OR=coef(model31), confint.default(model31)))
  495. summary(model31)
  496. model32 <- glm(hippo_sclerosis ~ nadir_mrs, family = "binomial", data = dat5a)
  497. exp(cbind(OR=coef(model32), confint.default(model32)))
  498. summary(model32)
  499. model33 <- glm(hippo_sclerosis ~ time_to_firstline, family = "binomial", data = dat5a)
  500. exp(cbind(OR=coef(model33), confint.default(model33)))
  501. summary(model33)
  502. model34 <- glm(hippo_sclerosis ~ T2_initial, family = "binomial", data = dat5a)
  503. exp(cbind(OR=coef(model34), confint.default(model34)))
  504. summary(model34)
  505. model35 <- glm(hippo_sclerosis ~ T2_mesial_temporal_initial, family = "binomial", data = dat5a)
  506. exp(cbind(OR=coef(model35), confint.default(model35)))
  507. summary(model35)
  508. model36 <- glm(hippo_sclerosis ~ hippocampi_swelling_initial+time_to_firstline, family = "binomial", data = dat5a)
  509. exp(cbind(OR=coef(model36), confint.default(model36)))
  510. summary(model36)
  511. model37 <- glm(hippo_sclerosis ~ T2_mesial_temporal_initial+time_to_firstline, family = "binomial", data = dat5a)
  512. exp(cbind(OR=coef(model37), confint.default(model37)))
  513. summary(model37)
  514. model38 <- glm(hippo_sclerosis ~ T2_initial+time_to_firstline, family = "binomial", data = dat5a)
  515. exp(cbind(OR=coef(model38), confint.default(model38)))
  516. summary(model38)
  517. model39 <- glm(memory_12bad ~ hippo_sclerosis+age_symptom_onset, family = "binomial", data = dat5a)
  518. exp(cbind(OR=coef(model39), confint.default(model39)))
  519. summary(model39)
  520. # sensitivity analyses 1 & 2 for atrophy/HS analyses
  521. # 1 time symptoms to initial MRI (in relation to hippo swelling)
  522. dat5$time_to_MRI <- difftime(dat5$date_of_first_MRI, dat5$date_symptoms, "days")
  523. dat5$time_to_MRI <- as.numeric(dat5$time_to_MRI)
  524. model40 <- glm(focal_atrophy ~ hippocampi_swelling_initial + time_to_firstline + time_to_MRI, family = "binomial", data = dat5)
  525. library(car)
  526. vif(model40)
  527. exp(cbind(OR=coef(model40), confint.default(model40)))
  528. summary(model40)
  529. model41 <- glm(focal_atrophy ~ T2_initial + time_to_firstline + time_to_MRI, family = "binomial", data = dat5)
  530. vif(model41)
  531. exp(cbind(OR=coef(model41), confint.default(model41)))
  532. summary(model41)
  533. model42 <- glm(focal_atrophy ~ T2_mesial_temporal_initial + time_to_firstline + time_to_MRI, family = "binomial", data = dat5)
  534. vif(model42)
  535. exp(cbind(OR=coef(model42), confint.default(model42)))
  536. summary(model42)
  537. # 2 time MRI to MRI
  538. # given for this analysis time from one MR to the other was extremely skewed - e.g. over 2000 days for some - log used
  539. dat5$time_MRI_to_MRI <- as.numeric(dat5$time_MRI_to_MRI)
  540. model43 <- glm(focal_atrophy ~ hippocampi_swelling_initial + time_to_firstline + log(time_MRI_to_MRI), family = "binomial", data = dat5)
  541. vif(model43)
  542. exp(cbind(OR=coef(model43), confint.default(model43)))
  543. summary(model43)
  544. model44 <- glm(focal_atrophy ~ T2_initial + time_to_firstline + log(time_MRI_to_MRI), family = "binomial", data = dat5)
  545. vif(model44)
  546. exp(cbind(OR=coef(model44), confint.default(model44)))
  547. summary(model44)
  548. model45 <- glm(focal_atrophy ~ T2_mesial_temporal_initial + time_to_firstline + log(time_MRI_to_MRI), family = "binomial", data = dat5)
  549. vif(model45)
  550. exp(cbind(OR=coef(model45), confint.default(model45)))
  551. summary(model45)
  552. # HS sensitivity analysis
  553. dat5a$time_to_MRI <- difftime(dat5a$date_of_first_MRI, dat5a$date_symptoms, "days")
  554. dat5a$time_to_MRI <- as.numeric(dat5a$time_to_MRI)
  555. dat5a$time_MRI_to_MRI <- as.numeric(dat5a$time_MRI_to_MRI)
  556. # 1
  557. model46 <- glm(hippo_sclerosis ~ hippocampi_swelling_initial+time_to_firstline + time_to_MRI, family = "binomial", data = dat5a)
  558. vif(model46)
  559. exp(cbind(OR=coef(model46), confint.default(model46)))
  560. summary(model46)
  561. model47 <- glm(hippo_sclerosis ~ T2_mesial_temporal_initial+time_to_firstline + time_to_MRI, family = "binomial", data = dat5a)
  562. vif(model47)
  563. exp(cbind(OR=coef(model47), confint.default(model47)))
  564. summary(model47)
  565. model48 <- glm(hippo_sclerosis ~ T2_initial+time_to_firstline+ time_to_MRI, family = "binomial", data = dat5a)
  566. vif(model48)
  567. exp(cbind(OR=coef(model48), confint.default(model48)))
  568. summary(model48)
  569. # 2
  570. model49 <- glm(hippo_sclerosis ~ hippocampi_swelling_initial+time_to_firstline + log(time_MRI_to_MRI), family = "binomial", data = dat5a)
  571. vif(model49)
  572. exp(cbind(OR=coef(model49), confint.default(model49)))
  573. summary(model49)
  574. model50 <- glm(hippo_sclerosis ~ T2_mesial_temporal_initial+time_to_firstline + log(time_MRI_to_MRI), family = "binomial", data = dat5a)
  575. vif(model50)
  576. exp(cbind(OR=coef(model50), confint.default(model50)))
  577. summary(model50)
  578. model51 <- glm(hippo_sclerosis ~ T2_initial+time_to_firstline+ log(time_MRI_to_MRI), family = "binomial", data = dat5a)
  579. vif(model51)
  580. exp(cbind(OR=coef(model51), confint.default(model51)))
  581. summary(model51)
  582. # Atrophy table
  583. dat1_flagged <- dat1_flagged |>
  584. filter(final_diag == 4 | final_diag == 5 | final_diag == 6 | final_diag == 7 | final_diag == 8)
  585. # If dat1_flagged was not grouped before, you can remove the ungroup() line
  586. dat1_flagged <- dat1_flagged |>
  587. ungroup()
  588. dat1_flagged$final_diag_new <- factor(dat1_flagged$final_diag,
  589. levels = c(4, 5, 6, 7, 8),
  590. labels = c(
  591. "NMDAR",
  592. "LGI1",
  593. "CASPR2",
  594. "GABAB",
  595. "AMPAR"))
  596. tbl4 <- dat1_flagged |>
  597. select(final_diag_new, time_symptoms_to_MRI, time_MRI_to_MRI, focal_atrophy, mesial_temporal_atrophy, temporal_atrophy, frontal_atrophy, parietal_atrophy, occipital_atrophy, cerebellar_atrophy) |>
  598. tbl_summary(
  599. by = final_diag_new,
  600. statistic = list(
  601. all_continuous() ~ "{median} ({p25},{p75})", # Display median and IQR
  602. all_categorical() ~ "{n} ({p}%)" # Display counts and percentages
  603. ),
  604. digits = all_continuous() ~ 0, # No decimal points for continuous variables
  605. missing_text = "(Missing)",
  606. label = c(
  607. time_symptoms_to_MRI ~ "Time symptoms to MRI",
  608. time_MRI_to_MRI ~ "Time MRI from initial MRI",
  609. focal_atrophy ~ "Focal atrophy",
  610. mesial_temporal_atrophy ~ "Mesial temporal atrophy",
  611. temporal_atrophy ~ "Temporal atrophy",
  612. frontal_atrophy ~ "Frontal atrophy",
  613. parietal_atrophy ~ "Parietal atrophy",
  614. occipital_atrophy ~ "Occipital atrophy",
  615. cerebellar_atrophy ~ "Cerebellar atrophy"
  616. )
  617. ) |>
  618. add_overall() # Add overall summary column
  619. # HS table
  620. # Atrophy table
  621. dat1_flagged2 <- dat1_flagged2 |>
  622. filter(final_diag == 4 | final_diag == 5 | final_diag == 6 | final_diag == 7 | final_diag == 8)
  623. # If dat1_flagged was not grouped before, you can remove the ungroup() line
  624. dat1_flagged2 <- dat1_flagged2 |>
  625. ungroup()
  626. dat1_flagged2$final_diag_new <- factor(dat1_flagged2$final_diag,
  627. levels = c(4, 5, 6, 7, 8),
  628. labels = c(
  629. "NMDAR",
  630. "LGI1",
  631. "CASPR2",
  632. "GABAB",
  633. "AMPAR"))
  634. tbl5 <- dat1_flagged2 |>
  635. select(final_diag_new, time_symptoms_to_MRI, time_MRI_to_MRI, hippo_sclerosis) |>
  636. tbl_summary(
  637. by = final_diag_new,
  638. statistic = list(all_continuous() ~ "{median} ({p25},{p75})",
  639. all_categorical() ~ "{n} ({p}%)"),
  640. digits = all_continuous() ~ 0,
  641. missing_text = "(Missing)",
  642. label = c(time_symptoms_to_MRI ~ "Time symptoms to MRI",
  643. time_MRI_to_MRI ~ "Time MRI from initial MRI",
  644. hippo_sclerosis ~ "Hippocampal sclerosis")) |>
  645. add_overall()
  646. # T2 persistence
  647. dat1_filtered3 <- dat1_follow_up2 %>%
  648. group_by(participant_id) %>% # Group by participant
  649. arrange(participant_id, date_of_mri) %>% # Arrange by participant and MRI date
  650. filter(row_number() == 1 | date_of_mri >= first(date_of_mri) + months(1)) %>% # Keep the first MRI and those >= 1 months later
  651. ungroup() # Ungroup the data
  652. dat1_filtered3 <- dat1_filtered3 |>
  653. group_by(participant_id) |>
  654. mutate(row_num = row_number()) |> # sequence row within each person
  655. mutate(max_num = n()) # total number rows per person
  656. dat1_filtered3 <- dat1_filtered3 |>
  657. filter(!(max_num ==1))
  658. dat1 <- dat1_filtered3 |>
  659. select(participant_id, final_diag, date_of_mri, time_symptoms_to_MRI, T2, hippo_sclerosis, focal_atrophy, T2_mesial_temporal_initial, T2_left_mesial_temporal, T2_right_mesial_temporal, atrophy_left_mesial_temporal, atrophy_right_mesial_temporal)
  660. ## dat3 <- dat1 |>
  661. ## filter(final_diag == 5)
  662. dat3 <- dat1
  663. dat3 <- dat3 |>
  664. group_by(participant_id) |>
  665. mutate(row_num = row_number()) |>
  666. mutate(max_num = n())
  667. # create T2 initial MRI variable
  668. dat3$T2_initial <- ifelse(dat3$row_num == 1, dat3$T2, NA)
  669. dat3 <- dat3 |>
  670. group_by(participant_id) |>
  671. fill(T2_initial, .direction = "down")
  672. # Ensure that dat3 is sorted by participant_id and date_of_MRI
  673. dat3 <- dat3 |>
  674. arrange(participant_id, date_of_mri)
  675. # Calculate the time between MRIs relative to the first MRI for each participant
  676. dat3 <- dat3 |>
  677. group_by(participant_id) |>
  678. mutate(time_between_MRIs = time_symptoms_to_MRI - first(time_symptoms_to_MRI)) |>
  679. ungroup()
  680. dat3b <- dat3 |>
  681. group_by(participant_id) |>
  682. mutate(row_num = row_number()) |>
  683. mutate(max_num = n())
  684. dat3b <- dat3b |>
  685. filter(max_num > 1)
  686. # remove initial MRI row
  687. dat3bb <- dat3b |>
  688. filter(!(time_between_MRIs == 0))
  689. dat3bb <- dat3bb |>
  690. group_by(participant_id) |>
  691. mutate(row_num = row_number()) |>
  692. mutate(max_num = n())
  693. # filter first f/u MRI
  694. dat3bc <- dat3bb |>
  695. filter(row_num == 1)
  696. dat3bc$T2_no_left_mesial_atrophy <- ifelse(dat3bc$T2_left_mesial_temporal == 1 & dat3bc$atrophy_left_mesial_temporal == 0, 1, 0)
  697. dat3bc$T2_no_right_mesial_atrophy <- ifelse(dat3bc$T2_right_mesial_temporal == 1 & dat3bc$atrophy_right_mesial_temporal == 0, 1, 0)
  698. dat3bc$T2_no_mesial_atrophy <- ifelse(dat3bc$T2_no_left_mesial_atrophy == 1 | dat3bc$T2_no_right_mesial_atrophy == 1, 1, 0)
  699. dat3bc$T2_mesial_temporal <- ifelse(dat3bc$T2_left_mesial_temporal == 1 | dat3bc$T2_right_mesial_temporal == 1, 1, 0)
  700. dat3bc$time_symptoms_to_MRI <- as.numeric(dat3bc$time_symptoms_to_MRI)
  701. dat3bc$time_between_MRIs <- as.numeric(dat3bc$time_between_MRIs)
  702. dat3bc <- dat3bc |>
  703. ungroup()
  704. dat3bc$final_diag_new <- factor(dat3bc$final_diag,
  705. levels = c(4, 5, 6, 7, 8),
  706. labels = c(
  707. "NMDAR",
  708. "LGI1",
  709. "CASPR2",
  710. "GABAB",
  711. "AMPAR"))
  712. tbl5 <- dat3bc |>
  713. select(final_diag_new, time_symptoms_to_MRI, time_between_MRIs, T2_initial, T2, T2_mesial_temporal, T2_no_mesial_atrophy) |>
  714. tbl_summary(
  715. by = final_diag_new,
  716. statistic = list(
  717. all_continuous() ~ "{median} ({p25},{p75})", # Display median and IQR
  718. all_categorical() ~ "{n} ({p}%)" # Display counts and percentages
  719. ),
  720. digits = all_continuous() ~ 0, # No decimal points for continuous variables
  721. missing_text = "(Missing)",
  722. label = c(
  723. time_symptoms_to_MRI ~ "Time symptoms to MRI",
  724. time_between_MRIs ~ "Time MRI from initial MRI",
  725. T2_initial ~ "T2/FLAIR hyperintensity initial MRI",
  726. T2 ~ "T2/FLAIR hyperintensity follow-up MRI",
  727. T2_mesial_temporal ~ "Mesial temporal T2/FLAIR hyperintensity follow-up MRI",
  728. T2_no_mesial_atrophy ~ "Mesial temporal T2/FLAIR hyperintensity follow-up MRI, no HS"
  729. )
  730. ) |>
  731. add_overall() # Add overall summary column

Data_code_R.R at commit 7baaa12, no license · at the source

Overview

Authors: Nabil Seery1,2, Paul Beech3,4, Robb Wesselingh1,2, Mark Schoenwaelder3, James Broadley1,2, Laurie McLaughlin5,6, Tiffany Rushen1,2, Liora ter Horst5,6, Andrew Duncan7, Tracie Tan1,2, Christina Kazzi1,2, Genevieve Skinner5,6, Cassie Nesbitt2,8, Katherine Buzzard9, Wendyl J D’Souza7, Yang Tran7,10, Anneke van der Walt1,2, Amy Halliday7, Mirasol Forcadela11, Bruce Taylor12
and 17 other authorsAndrew Swayne5,6, Amy Brodtmann1,9,13, David Gillis14, Ernest G Butler15, Tomas Kalincik13,16,17, Udaya Seneviratne1,11,18, Richard A Macdonell11, Sudarshini Ramanathan19,20, Stefan Blum5,6, Charles B Malpas1,21,22, Stephen W Reddel19,23, Todd A Hardy19,23, Terence J O’Brien1,2, Paul Sanfilippo1, Helmut Butzkueven1,2, Mastura Monif1,2, Australian Autoimmune Encephalitis Consortium
23 affiliations
  1. Department of Neuroscience, School of Translational Medicine, Monash University, Melbourne, Victoria 3004, Australia
  2. Department of Neurology, Alfred Health, Melbourne, Victoria 3004, Australia
  3. Department of Radiology, Alfred Health, Melbourne, Victoria 3004, Australia
  4. Department of Radiology, Monash Health, Clayton, Victoria 3168, Australia
  5. Department of Neurology, Princess Alexandra Hospital, Woolloongabba, Queensland 4102, Australia
  6. School of Medicine, The University of Queensland, UQ, Herston, Queensland 4006, Australia
  7. Department of Medicine, St Vincent’s Hospital, University of Melbourne, Fitzroy, Victoria 3065, Australia
  8. Department of Neuroscience, Barwon Health, Geelong, Victoria 3220, Australia
  9. Department of Neurosciences, Eastern Health, Box Hill, Victoria 3128, Australia
  10. Department of Pathology, St Vincent’s Hospital, Fitzroy, Victoria 3065, Australia
  11. Department of Neurology, Austin Health, Heidelberg, Victoria 3084, Australia
  12. Department of Neurology, Royal Hobart Hospital, Hobart, Tasmania 7000, Australia
  13. Department of Neurology, Royal Melbourne Hospital, Parkville, Victoria 3052, Australia
  14. Division of Immunology, Pathology Queensland Central Laboratory, Herston, Queensland 4006, Australia
  15. Department of Neurology, Peninsula Health, Frankston, Victoria 3199, Australia
  16. Department of Medicine, CORE, The University of Melbourne, Parkville, Victoria 3010, Australia
  17. Department of Neurology, Neuroimmunology Centre, Royal Melbourne Hospital, Melbourne, Victoria 3000, Australia
  18. Department of Neuroscience, Monash Health, Clayton, Victoria 3168, Australia
  19. Department of Neurology and Concord Clinical School, Concord Hospital, Concord, New South Wales 2139, Australia
  20. Translational Neuroimmunology Group, Kids Neuroscience Centre and Brain and Mind Centre, Faculty of Medicine and Health, University of Sydney, Westmead, New South Wales 2145, Australia
  21. Department of Medicine (Royal Melbourne Hospital), University of Melbourne, Parkville, Victoria 3052, Australia
  22. Melbourne School of Psychological Sciences, University of Melbourne, Parkville, Victoria 3052, Australia
  23. Brain and Mind Centre, University of Sydney, Camperdown, New South Wales 2050, Australia
Institutions: The Alfred Hospital (Australia); Alfred Health (Australia); Monash University (Australia); Monash Medical Centre (Australia); Monash Health (Australia); The University of Queensland (Australia); Princess Alexandra Hospital (Australia); The University of Melbourne (Australia); St Vincent's Hospital Melbourne (Australia); Barwon Health (Australia); Eastern Health (Australia); Austin Hospital (Australia); Austin Health (Australia); Royal Hobart Hospital (Australia); The Royal Melbourne Hospital (Australia); Peninsula Health (Australia); The University of Sydney (Australia); Concord Hospital (United States); Concord Repatriation General Hospital (Australia)
Journal: Brain communications, volume 8, issue 3, article fcag193
Dates: received 1 October 2025; accepted 31 May 2026; published online 17 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/braincomms/fcag193 · PMID 42318510 · PMCID PMC13273915 · OpenAlex W4415496120
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), other condition (population), clinical / translational (subfield)
Methods: Machine learning
Keywords: MRI, LGI1, NMDAR, hippocampal swelling
Topic: Autoimmune Neurological Disorders and Treatments (Neurology, Medicine), according to OpenAlex
Funding: National Health and Medical Research Council (APP1201062); Western Australian Future Health and Innovation Fund, Government of Western Australia
Citations: not cited yet (Europe PMC); 40 references in the paper

Abstract

Brain magnetic resonance imaging (MRI) abnormalities are an important finding in the evaluation of patients with suspected autoimmune encephalitis (AE). There have been few studies evaluating the frequency and prognostic significance of MRI abnormalities, especially hippocampal swelling, in anti-N-methyl-D-aspartate receptor (NMDAR) and anti-leucine-rich glioma-inactivated 1 (LGI1) Ab-mediated encephalitides. We conducted a multi-centre, retrospective study involving adult patients with confirmed antibody-mediated encephalitis and at least one MRI scan from 10 Australian hospitals (n = 139). MRI scans were evaluated by a neuroradiologist blinded to the specific autoimmune encephalitis diagnosis. We evaluated associations between acute MRI abnormalities (e.g. hippocampal swelling) with 12-month function (modified Rankin scale, mRS ≥2 = worse outcome) and radiological findings. In patients with anti-LGI1 Ab-mediated encephalitis, we identified hippocampal swelling on initial MRI to be associated with worse function at 12 months (OR 0.03; 95% CI 0.003, 0.34; P = 0.005). We found initial AE-associated T2/fluid attenuated inversion recovery (FLAIR) hyperintensities were not associated with 12-month mRS in either the anti-NMDAR (OR 0.39; 95% CI 0.04, 3.97; P = 0.42) or anti-LGI1 Ab-mediated encephalitis groups (OR 0.34; 95% CI 0.07, 1.57; P = 0.17). In anti-LGI1 Ab-mediated encephalitis, both hippocampal swelling (OR 5.76; 95% CI 1.14, 29.02; P = 0.03) and T2/FLAIR hyperintensity (OR 6.81; 95% CI 1.28, 36.22; P = 0.03) were related to the development of mesial temporal atrophy and hippocampal sclerosis. Acute hippocampal swelling is associated with worse outcomes in anti-LGI1 Ab-mediated encephalitis and, alongside initial T2/FLAIR hyperintensity, is associated with the development of both mesial temporal atrophy and hippocampal sclerosis.

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

Repository

Its files are read in the Code ↔ Paper reader above.

nabilseery/Antibody-mediated-encephalitis-MRI-analysis-code

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 7baaa126afb2a5ca3c0d2c5cbed3b0624eb77ae9, 31 January 2026
Languages: R (1)
Size: 3 files, 1 script
Software Heritage: not archived
Found in: “Data availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: car (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
2 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:

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

Anonymized data is available to any qualified investigator by the corresponding author upon reasonable request and after approval from the relevant HREC. The R code used for statistical analysis and table generation is available at: https://github.com/nabilseery/Antibody-mediated-encephalitis-MRI-analysis-code.

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 2, 28 September 2026

  • Funding: added National Health and Medical Research Council: APP1201062; Western Australian Future Health and Innovation Fund, Government of Western Australia

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 37 authors, 4 keywords, 40 references.

Cite

This paper

Seery, N., Beech, P., Wesselingh, R., Schoenwaelder, M., Broadley, J., McLaughlin, L., Rushen, T., ter Horst, L., Duncan, A., Tan, T., Kazzi, C., Skinner, G., Nesbitt, C., Buzzard, K., D’Souza, W. J., Tran, Y., van der Walt, A., Halliday, A., Forcadela, M., . . . Australian Autoimmune Encephalitis Consortium. (2026). Acute and longitudinal magnetic resonance imaging abnormalities in antibody-mediated encephalitis. Brain communications, 8(3), fcag193. https://doi.org/10.1093/braincomms/fcag193

BibTeX

@article{seery2026acute,
author = {Seery, Nabil and Beech, Paul and Wesselingh, Robb and Schoenwaelder, Mark and Broadley, James and McLaughlin, Laurie and Rushen, Tiffany and ter Horst, Liora and Duncan, Andrew and Tan, Tracie and Kazzi, Christina and Skinner, Genevieve and Nesbitt, Cassie and Buzzard, Katherine and D’Souza, Wendyl J and Tran, Yang and van der Walt, Anneke and Halliday, Amy and Forcadela, Mirasol and Taylor, Bruce and Swayne, Andrew and Brodtmann, Amy and Gillis, David and Butler, Ernest G and Kalincik, Tomas and Seneviratne, Udaya and Macdonell, Richard A and Ramanathan, Sudarshini and Blum, Stefan and Malpas, Charles B and Reddel, Stephen W and Hardy, Todd A and O’Brien, Terence J and Sanfilippo, Paul and Butzkueven, Helmut and Monif, Mastura and {Australian Autoimmune Encephalitis Consortium}},
title = {{Acute and longitudinal magnetic resonance imaging abnormalities in antibody-mediated encephalitis}},
journal = {Brain communications},
year = {2026},
month = jun,
volume = {8},
number = {3},
pages = {fcag193},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/braincomms/fcag193},
url = {https://doi.org/10.1093/braincomms/fcag193},
pmid = {42318510},
pmcid = {PMC13273915}
}

RIS

TY - JOUR
AU - Seery, Nabil
AU - Beech, Paul
AU - Wesselingh, Robb
AU - Schoenwaelder, Mark
AU - Broadley, James
AU - McLaughlin, Laurie
AU - Rushen, Tiffany
AU - ter Horst, Liora
AU - Duncan, Andrew
AU - Tan, Tracie
AU - Kazzi, Christina
AU - Skinner, Genevieve
AU - Nesbitt, Cassie
AU - Buzzard, Katherine
AU - D’Souza, Wendyl J
AU - Tran, Yang
AU - van der Walt, Anneke
AU - Halliday, Amy
AU - Forcadela, Mirasol
AU - Taylor, Bruce
AU - Swayne, Andrew
AU - Brodtmann, Amy
AU - Gillis, David
AU - Butler, Ernest G
AU - Kalincik, Tomas
AU - Seneviratne, Udaya
AU - Macdonell, Richard A
AU - Ramanathan, Sudarshini
AU - Blum, Stefan
AU - Malpas, Charles B
AU - Reddel, Stephen W
AU - Hardy, Todd A
AU - O’Brien, Terence J
AU - Sanfilippo, Paul
AU - Butzkueven, Helmut
AU - Monif, Mastura
AU - Australian Autoimmune Encephalitis Consortium
TI - Acute and longitudinal magnetic resonance imaging abnormalities in antibody-mediated encephalitis
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/06/17
VL - 8
IS - 3
SP - fcag193
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/braincomms/fcag193
UR - https://doi.org/10.1093/braincomms/fcag193
LA - en
ER -

CSL-JSON

{
"id": "10.1093/braincomms/fcag193",
"type": "article-journal",
"title": "Acute and longitudinal magnetic resonance imaging abnormalities in antibody-mediated encephalitis",
"container-title": "Brain communications",
"author": [
{
"family": "Seery",
"given": "Nabil"
},
{
"family": "Beech",
"given": "Paul"
},
{
"family": "Wesselingh",
"given": "Robb"
},
{
"family": "Schoenwaelder",
"given": "Mark"
},
{
"family": "Broadley",
"given": "James"
},
{
"family": "McLaughlin",
"given": "Laurie"
},
{
"family": "Rushen",
"given": "Tiffany"
},
{
"family": "ter Horst",
"given": "Liora"
},
{
"family": "Duncan",
"given": "Andrew"
},
{
"family": "Tan",
"given": "Tracie"
},
{
"family": "Kazzi",
"given": "Christina"
},
{
"family": "Skinner",
"given": "Genevieve"
},
{
"family": "Nesbitt",
"given": "Cassie"
},
{
"family": "Buzzard",
"given": "Katherine"
},
{
"family": "D’Souza",
"given": "Wendyl J"
},
{
"family": "Tran",
"given": "Yang"
},
{
"family": "van der Walt",
"given": "Anneke"
},
{
"family": "Halliday",
"given": "Amy"
},
{
"family": "Forcadela",
"given": "Mirasol"
},
{
"family": "Taylor",
"given": "Bruce"
},
{
"family": "Swayne",
"given": "Andrew"
},
{
"family": "Brodtmann",
"given": "Amy"
},
{
"family": "Gillis",
"given": "David"
},
{
"family": "Butler",
"given": "Ernest G"
},
{
"family": "Kalincik",
"given": "Tomas"
},
{
"family": "Seneviratne",
"given": "Udaya"
},
{
"family": "Macdonell",
"given": "Richard A"
},
{
"family": "Ramanathan",
"given": "Sudarshini"
},
{
"family": "Blum",
"given": "Stefan"
},
{
"family": "Malpas",
"given": "Charles B"
},
{
"family": "Reddel",
"given": "Stephen W"
},
{
"family": "Hardy",
"given": "Todd A"
},
{
"family": "O’Brien",
"given": "Terence J"
},
{
"family": "Sanfilippo",
"given": "Paul"
},
{
"family": "Butzkueven",
"given": "Helmut"
},
{
"family": "Monif",
"given": "Mastura"
},
{
"literal": "Australian Autoimmune Encephalitis Consortium"
}
],
"container-title-short": "Brain Commun",
"volume": "8",
"issue": "3",
"page": "fcag193",
"DOI": "10.1093/braincomms/fcag193",
"PMID": "42318510",
"PMCID": "PMC13273915",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/braincomms/fcag193",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
17
]
]
}
}

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.1093/braincomms/fcag255 [code]
Impaired consolidation of spatial memory during sleep in patients with leucine-rich glioma-inactivated 1-associated limbic encephalitis.
Journal: Brain communications
In common: tidyverse, other condition, 5 references
[2] doi:10.1093/cercor/bhag069
Diencephalic integrity explains aspects of hippocampal amnesia.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: structural MRI / diffusion, other condition, 5 references
[3] doi:10.1186/s12883-026-05085-z
The use of routinely collected structural neuroimaging to identify cognitive impairment in multiple sclerosis.
Journal: BMC neurology
In common: structural MRI / diffusion, clinical / translational, author Tomas Kalinicik
[4] doi:
AMPAR immunization induces progressive autoimmune encephalitis with autoreactive B cells in the brain
Journal: bioRxiv : the preprint server for biology
In common: other condition, 3 references
[5] doi:10.1126/sciadv.aec9291 [code]
Computational mechanisms of perception in autism revealed using games inspired by rodent operant tasks.
Journal: Science advances
In common: car, tidyverse, 1 reference
[6] doi:10.1038/s41398-026-04131-1 [code]
Multimodal phenotypic classification of generalized anxiety and panic using structural MRI data and psychosocial factors: machine learning results from the German National Cohort (NAKO) study.
Journal: Translational psychiatry
In common: car, tidyverse, structural MRI / diffusion, clinical / translational, other condition
[7] doi:10.1016/j.dcn.2026.101769 [code]
Differential adolescent neurodevelopment of emotion processing across internalizing psychopathology and childhood adversity.
Journal: Developmental cognitive neuroscience
In common: tidyverse, 2 references
[8] doi:10.1016/j.xcrm.2026.102822
Synaptophysin autoantibodies mediate synaptic dysfunction in cerebellar ataxia.
Journal: Cell reports. Medicine
In common: other condition, 2 references
[9] doi:10.1016/j.xcrm.2026.102700
Checkpoint blockade-related CNS adverse events are characterized by neurotoxic T helper cells with sustained neuroantigen reactivity.
Journal: Cell reports. Medicine
In common: clinical / translational, 2 references
[10] doi:10.1186/s12974-026-03951-8
Forkhead box versus NF-κB hippocampal snRNA-seq profiles distinguish anti-Drebrin- and anti-GAD65-positive encephalitis.
Journal: Journal of neuroinflammation
In common: other condition, 2 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.