OSCR

Investigation of stress hormones across multiday seizure cycles.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [1] § Materials and methods › Statistical analysis › Multiday seizure cycle and cortisol ↔ slopes_vs_features.R, lines 38–98 · score 0.72 · circadian seizure chronotype, circadian cycle strength, multiday cycle strength, slopes, fitted, morning
  2. [2] § Materials and methods › Statistical analysis › Linear mixed models ↔ cortisol_slopes.R, lines 47–91 · score 0.57 · Kenward Roger, lme4, ANOVA, model, Cortisol
  3. [3] § Materials and methods › Statistical analysis › Linear mixed models ↔ lmm_models.R, lines 84–154 · score 0.55 · Nelder Mead, allocated risk, PSS score, optimizers, predict, pre sample

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 · 98 lines · 3.8 KB · no license · 1 match

  1. library("tidyverse")
  2. library("lme4")
  3. library("lmerTest")
  4. library("broom.mixed")
  5. library("broom")
  6. library("patchwork")
  7. # Regresses per-patient cortisol-cycle slopes (from cortisol_slopes.R) against
  8. # patient-level features: multiday cycle strength, circadian cycle properties,
  9. # and within-patient hormone variability.
  10. #
  11. # Requires:
  12. # - tables/patient_slopes.csv (output of cortisol_slopes.R)
  13. # - patient_features.csv (one row per patient with cycle/circadian features)
  14. #
  15. # All paths are relative to the repository root directory.
  16. # Set your working directory to the repo root before running, e.g.:
  17. # setwd("/path/to/cortisol-study-brain-communications")
  18. patient_features <- read.csv("patient_features.csv")
  19. patient_slopes <- read_csv("tables/patient_slopes.csv")
  20. data <- patient_slopes %>%
  21. left_join(patient_features, by = "patient") %>%
  22. filter(!patient %in% c("P3", "P5", "P17"))
  23. # Define a function to fit model and extract tidy results
  24. fit_model <- function(data_subset, cortisol_type) {
  25. model <- lm(slope ~ cycle_strength_r + circadian_tod + circadian_rval +
  26. Var.of.cortisol_z + Var.of.dheas_,
  27. data = data_subset)
  28. tidy(model, conf.int = TRUE) %>%
  29. mutate(Cortisol_Type = cortisol_type)
  30. }
  31. # Fit models for Evening and Morning cortisol types
  32. evening_model <- fit_model(subset(data, cortisol_type == "Evening"), "Evening")
  33. morning_model <- fit_model(subset(data, cortisol_type == "Morning"), "Morning")
  34. # Print coefficients with confidence intervals and p-values
  35. evening_results <- evening_model %>% select(term, estimate, conf.low, conf.high, p.value)
  36. morning_results <- morning_model %>% select(term, estimate, conf.low, conf.high, p.value)
  37. print("Evening Model Coefficients:")
  38. print(evening_results)
  39. print("Morning Model Coefficients:")
  40. print(morning_results)
  41. # Save to CSV
  42. dir.create("tables", showWarnings = FALSE)
  43. write_csv(evening_results, "tables/evening_model_coefficients.csv")
  44. write_csv(morning_results, "tables/morning_model_coefficients.csv")
  45. # Build plotmath-safe labels from the raw term
  46. all_coefficients <- bind_rows(evening_model, morning_model) %>%
  47. filter(term != "(Intercept)") %>%
  48. mutate(term_raw = term) %>%
  49. mutate(term = case_when(
  50. term == "cycle_strength_r" ~ "Multiday Cycle Strength",
  51. term == "circadian_rval" ~ "Circadian Cycle Strength",
  52. term == "circadian_todMorning" ~ "Circadian Seizure Chronotype",
  53. TRUE ~ str_replace_all(term, "_", " ") %>% str_to_title()
  54. )) %>%
  55. mutate(term_plot = case_when(
  56. term_raw == "Var.of.dheas_" ~ "sigma^2(DHEAS)",
  57. term_raw == "Var.of.cortisol_z" ~ "sigma^2(Cortisol)",
  58. TRUE ~ paste0("'", term, "'")
  59. ))
  60. # Fixed order for the vertical axis
  61. custom <- c("sigma^2(Cortisol)", "sigma^2(DHEAS)",
  62. "'Multiday Cycle Strength'", "'Circadian Cycle Strength'",
  63. "'Circadian Seizure Chronotype'")
  64. other <- setdiff(unique(all_coefficients$term_plot), custom)
  65. all_coefficients <- all_coefficients %>%
  66. mutate(term_plot = factor(term_plot, levels = c(custom, other)))
  67. coefficient_plot <- all_coefficients %>%
  68. ggplot(aes(x = term_plot, y = estimate, ymin = conf.low, ymax = conf.high,
  69. color = Cortisol_Type)) +
  70. geom_hline(yintercept = 0, linetype = "dashed", color = "black") +
  71. geom_point(position = position_dodge(width = 0.5), size = 3) +
  72. geom_linerange(position = position_dodge(width = 0.5), size = 1) +
  73. coord_flip() +
  74. scale_x_discrete(labels = scales::label_parse()) +
  75. labs(title = "Coefficient Estimates with 95% CI",
  76. x = NULL, y = "Coefficient Estimate", color = "Slope model") +
  77. scale_color_manual(values = c("Evening" = "darkblue", "Morning" = "orange")) +
  78. theme_minimal(base_size = 14)
  79. dir.create("figures", showWarnings = FALSE)
  80. pdf("figures/coefficient_plot_cortisol_type.pdf", width = 7, height = 5)
  81. print(coefficient_plot)
  82. dev.off()

slopes_vs_features.R at commit dd1752a, no license · at the source

Overview

Authors: Rachel E Stirling1,2, Jodie Naim-Feil1,2, Ian Gordon3, David B Grayden1,2,4, Wendyl D’Souza4, Dean R Freestone1,2, Ewan S Nurse2,4, Mark J Cook1,2,4, Philippa J Karoly1,2,4
  1. Department of Biomedical Engineering, University of Melbourne, Melbourne, VIC 3010, Australia
  2. Graeme Clark Institute, University of Melbourne, Melbourne, VIC 3010, Australia
  3. Statistical Consulting Centre, The University of Melbourne, Melbourne, VIC 3010, Australia
  4. Department of Medicine, St. Vincent’s Hospital Melbourne, University of Melbourne, Melbourne, VIC 3010, Australia
Institutions: The University of Melbourne (Australia); St Vincent's Hospital Melbourne (Australia)
Journal: Brain communications, volume 8, issue 3, article fcag217
Dates: received 30 June 2025; accepted 6 June 2026; published online 8 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/braincomms/fcag217 · PMID 42311452 · PMCID PMC13270484 · OpenAlex W7163875154
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), epilepsy (population)
Methods: Statistics, Connectivity
Keywords: epilepsy, cortisol, multidien, infradian, epileptic rhythms
Topic: Epilepsy research and treatment (Psychiatry and Mental health, Medicine), according to OpenAlex
Citations: cited by 2 papers (Europe PMC); 57 references in the paper

Abstract

It is well established that most people with epilepsy experience cyclical fluctuations in seizure susceptibility. These seizure patterns have been associated with multiday oscillations in cortical excitability and autonomic changes, although the mechanistic drivers of these cycles are not well understood. In this study, we measured stress hormone levels at seizure cycle peaks and troughs (high and low risk, respectively) to investigate stress hormones as a possible co-oscillator with multiday cycles of seizure susceptibility. Thirteen participants with focal epilepsy were recruited for this longitudinal cohort study. Participants reported seizures in an electronic diary for at least 6 months prior to study commencement. Four 3-day salivary sampling periods were scheduled using a cycle forecasting algorithm trained on each participant’s historical seizure diary to prospectively identify high- and low-risk periods. Twenty-four saliva samples were collected per person across two predicted high-risk periods and two predicted low-risk periods (‘allocated risk’). Saliva samples were analysed for cortisol and dehydroepiandrosterone sulphate (DHEAS) levels. Linear mixed models were fitted to predict stress hormones with fixed effects: multiday seizure cycle (retrospective peak or trough), time of day, allocated risk, perceived stress scale score and pre- and post-sample seizure occurrence. Participants recorded an average of 47 (SD = 62) seizures between their first and final saliva collection (duration: 11.8 ± 8.0 months). Three hundred and twelve saliva samples were collected in total. Cortisol levels were significantly higher in the epilepsy cohort compared to the expected general population. On a group level, cortisol was significantly associated with fixed effects time of day, pre-sample seizure occurrence and multiday seizure cycle, with cortisol levels heightened at multiday cycle peaks compared to troughs, particularly evident in the morning saliva samples. These results provide new insights into cortisol as a possible mechanistic driver or co-oscillator of multiday seizure cycles in people with epilepsy. The novel methodology presented in this work may be used to explore interactions between other biomolecules of interest and multiday seizure cycles.

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

Repository

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

RiPLresearch/cortisol-study-brain-communications

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: dd1752a76733f3002b189fb7f31d0c06fd90646c, 26 May 2026
Languages: R (6)
Size: 7 files, 6 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (6 files), broom (5 files), ggplot2 (5 files), lme4 (4 files), patchwork (3 files), easystats (2 files), lmerTest (2 files), brms (1 file), data.table (1 file), ggpubr (1 file), glmmTMB (1 file), reshape2 (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
7 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;
  • 6 scripts, each with its path and the digest of its content;
  • 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

Requests for data can be made to the corresponding author. Deidentified data will be made available upon reasonable request. Code used for analysis (statistics and figure generation) is available at: https://github.com/RiPLresearch/cortisol-study-brain-communications.

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

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 9 authors, 5 keywords, 2 funders, 55 references.

Cite

This paper

Stirling, R. E., Naim-Feil, J., Gordon, I., Grayden, D. B., D’Souza, W., Freestone, D. R., Nurse, E. S., Cook, M. J., & Karoly, P. J. (2026). Investigation of stress hormones across multiday seizure cycles. Brain communications, 8(3), fcag217. https://doi.org/10.1093/braincomms/fcag217

BibTeX

@article{stirling2026investigation,
author = {Stirling, Rachel E and Naim-Feil, Jodie and Gordon, Ian and Grayden, David B and D’Souza, Wendyl and Freestone, Dean R and Nurse, Ewan S and Cook, Mark J and Karoly, Philippa J},
title = {{Investigation of stress hormones across multiday seizure cycles}},
journal = {Brain communications},
year = {2026},
month = jun,
volume = {8},
number = {3},
pages = {fcag217},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/braincomms/fcag217},
url = {https://doi.org/10.1093/braincomms/fcag217},
pmid = {42311452},
pmcid = {PMC13270484}
}

RIS

TY - JOUR
AU - Stirling, Rachel E
AU - Naim-Feil, Jodie
AU - Gordon, Ian
AU - Grayden, David B
AU - D’Souza, Wendyl
AU - Freestone, Dean R
AU - Nurse, Ewan S
AU - Cook, Mark J
AU - Karoly, Philippa J
TI - Investigation of stress hormones across multiday seizure cycles
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/06/08
VL - 8
IS - 3
SP - fcag217
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/braincomms/fcag217
UR - https://doi.org/10.1093/braincomms/fcag217
LA - en
ER -

CSL-JSON

{
"id": "10.1093/braincomms/fcag217",
"type": "article-journal",
"title": "Investigation of stress hormones across multiday seizure cycles",
"container-title": "Brain communications",
"author": [
{
"family": "Stirling",
"given": "Rachel E"
},
{
"family": "Naim-Feil",
"given": "Jodie"
},
{
"family": "Gordon",
"given": "Ian"
},
{
"family": "Grayden",
"given": "David B"
},
{
"family": "D’Souza",
"given": "Wendyl"
},
{
"family": "Freestone",
"given": "Dean R"
},
{
"family": "Nurse",
"given": "Ewan S"
},
{
"family": "Cook",
"given": "Mark J"
},
{
"family": "Karoly",
"given": "Philippa J"
}
],
"container-title-short": "Brain Commun",
"volume": "8",
"issue": "3",
"page": "fcag217",
"DOI": "10.1093/braincomms/fcag217",
"PMID": "42311452",
"PMCID": "PMC13270484",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/braincomms/fcag217",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
8
]
]
}
}

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.1016/j.celrep.2026.117505 [code]
Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.
Journal: Cell reports
In common: glmmTMB, brms, easystats, 7 other tools
[2] doi:10.1073/pnas.2606871123 [code]
Oxytocin modulates the neurocomputational mechanisms engaged in learning rank relationships in social networks.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: easystats, broom, lmerTest, 7 other tools
[3] doi:10.1038/s41467-026-73865-9 [code]
Histamine shapes the neurocomputational dynamics of human learning.
Journal: Nature communications
In common: brms, easystats, broom, 6 other tools
[4] doi:10.3390/ijms27135713 [code]
Chronic Administration of Marinobufagenin in Mice Causes Hyperlocomotion and Decrease in Anxiety by Altering Monoamine Turnover Unaccompanied by Motor Deficits or Oxidative Stress.
Journal: International journal of molecular sciences
In common: glmmTMB, broom, lmerTest, 6 other tools
[5] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: brms, broom, lme4, 6 other tools
[6] doi:10.1038/s41467-026-73262-2 [code]
Robust but independent sex differences in human brain function, structure, and behavior.
Journal: Nature communications
In common: easystats, broom, lmerTest, 6 other tools
[7] doi:10.1038/s41593-026-02363-4 [code]
Cortical thickness changes precede high levels of amyloid by at least 7 years.
Journal: Nature neuroscience
In common: easystats, broom, lmerTest, 6 other tools
[8] doi:10.1038/s41398-026-04010-9 [code]
Bullying victimization and brain development: a longitudinal structural magnetic resonance imaging study from adolescence to early adulthood.
Journal: Translational psychiatry
In common: easystats, broom, lmerTest, 6 other tools
[9] 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: easystats, broom, lme4, 6 other tools
[10] doi:10.1038/s41467-026-74753-y [code]
A human-specific microRNA controls the timing of excitatory synaptogenesis.
Journal: Nature communications
In common: easystats, lmerTest, lme4, 6 other tools

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

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.