Plasma metabolomic signatures of migraine in 479,760 adults.
The 9 matches
- [1] § STAR★Methods › Quantification and statistical analysis › Downstream integrative analyses ↔ 4.SEM.R, lines 1–57 · score 0.92 · formal causal mediation, LASSO prioritized metabolites, latent metabolite factor, affective traits, exploratory statistical, statistical interrelationships
- [2] § Results › Integration with genetic risk and cross-trait associations ↔ 4.SEM.R, lines 1–57 · score 0.90 · exploratory statistical interrelationshi, causal mediation, latent metabolite factor, affective trait, LASSO prioritized, exploratory structural
- [3] § STAR★Methods › Method details › Covariates ↔ 2.Trajectories+clusters.R, lines 1–63 · score 0.68 · alcohol consumption, smoking status, sleep duration, diabetes, age, Covariates
- [4] § STAR★Methods › Method details › Covariates ↔ 1.Cox+linear.R, lines 1–42 · score 0.68 · alcohol consumption, smoking status, sleep duration, diabetes, age, Covariates
- [5] § Results › Study population and metabolite profiling ↔ 1.Cox+linear.R, lines 1–42 · score 0.65 · diabetes status, smoking status, sleep duration, plasma metabolites, BMI, migraine
- [6] § STAR★Methods › Quantification and statistical analysis › Association analyses of plasma metabolites with migraine ↔ 1.Cox+linear.R, lines 385–456 · score 0.65 · Hazard ratios, prevalent migraine, linear, stratified, Cox, age
- [7] § STAR★Methods › Method details › Plasma metabolomics profiling ↔ Protocol_demo/run_synthetic_example.R, lines 586–716 · score 0.58 · quality control, log, preprocessing, medians, absolute, scores
- [8] § STAR★Methods › Method details › Assessment of migraine status ↔ Protocol_demo/generate_synthetic_data.R, lines 71–184 · score 0.56 · event date, diagnosis date, UKB, status, baseline, incident
- [9] § Results › Metabolite feature prioritization ↔ 4.SEM.R, lines 280–336 · score 0.52 · latent metabolite factor, sleep duration, SEM, insomnia, anxiety, depression
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 · 336 lines · 8.7 KB · no license · 3 matches
- #!/usr/bin/env Rscript
- # ============================================================
- # SEM analysis: latent metabolite factor and incident migraine
- # ============================================================
- # Purpose:
- # Fit exploratory structural equation models linking selected
- # sleep/affective traits, a latent metabolite factor, and
- # incident migraine.
- #
- # Required input object:
- # dat_base: individual-level analysis dataset containing:
- # - incident_migraine
- # - prevalent_depression, prevalent_anxiety, insomnia, sleep duration
- # - 12 LASSO-prioritized metabolite variables
- # - covariates listed below
- #
- # Optional input object:
- # meta_reverse_map: named vector mapping Met IDs to metabolite names
- #
- # Note:
- # These SEMs are exploratory statistical interrelationship models.
- # They should not be interpreted as formal causal mediation analyses.
- # ============================================================
- suppressPackageStartupMessages({
- library(dplyr)
- library(data.table)
- library(lavaan)
- library(fastDummies)
- library(stringr)
- library(purrr)
- })
- # -----------------------------
- # User parameters
- # -----------------------------
- result_dir <- "results"
- dir.create(result_dir, showWarnings = FALSE, recursive = TRUE)
- lasso_meta_cols <- c(
- "Met38", "Met57", "Met60", "Met82",
- "Met88", "Met111", "Met120", "Met125",
- "Met146", "Met201", "Met245", "Met246"
- )
- exposures <- c(
- dep_status = "Depression",
- anx_status = "Anxiety",
- insom_status = "Insomnia",
- sleep_hours = "Sleep duration"
- )
- base_covars <- c(
- "age", "sex", "ethn", "Qualification", "bmi", "Socioeconomic",
- "Smoking_status", "Alcohol_consumption"
- )
- # -----------------------------
- # Helper functions
- # -----------------------------
- check_required_vars <- function(dat, vars) {
- missing_vars <- setdiff(vars, names(dat))
- if (length(missing_vars) > 0) {
- stop("Missing required variables: ", paste(missing_vars, collapse = ", "))
- }
- }
- make_metabolite_map <- function(meta_cols) {
- if (exists("meta_reverse_map")) {
- data.frame(
- Metabolite_ID = names(meta_reverse_map),
- Metabolite_name = unname(meta_reverse_map),
- stringsAsFactors = FALSE
- )
- } else {
- data.frame(
- Metabolite_ID = meta_cols,
- Metabolite_name = meta_cols,
- stringsAsFactors = FALSE
- )
- }
- }
- prepare_sem_data <- function(dat, meta_cols) {
- dat <- dat %>%
- mutate(
- migraine_incident = as.integer(incident_migraine == 1),
- dep_status = as.integer(prevalent_depression == 1),
- anx_status = as.integer(prevalent_anxiety == 1),
- insom_status = as.numeric(insomnia),
- sleep_hours = as.numeric(`sleep duration`),
- age = as.numeric(age),
- bmi = as.numeric(bmi),
- Socioeconomic = as.numeric(Socioeconomic),
- Qualification = as.numeric(Qualification),
- sex = factor(sex),
- ethn = factor(ethn),
- Smoking_status = factor(Smoking_status),
- Alcohol_consumption = factor(Alcohol_consumption)
- ) %>%
- as.data.frame()
- dat[, meta_cols] <- lapply(dat[, meta_cols, drop = FALSE], function(x) {
- as.numeric(scale(as.numeric(x)))
- })
- dat <- fastDummies::dummy_cols(
- dat,
- select_columns = c("sex", "ethn", "Smoking_status", "Alcohol_consumption"),
- remove_first_dummy = TRUE,
- remove_selected_columns = TRUE,
- ignore_na = TRUE
- )
- dat
- }
- get_sem_covars <- function(dat) {
- c(
- "age", "Qualification", "bmi", "Socioeconomic",
- grep("^(sex_|ethn_|Smoking_status_|Alcohol_consumption_)",
- names(dat), value = TRUE)
- ) %>%
- unique() %>%
- intersect(names(dat))
- }
- remove_invalid_covars <- function(df, covars) {
- covars[vapply(covars, function(v) {
- x <- df[[v]]
- length(unique(x[!is.na(x)])) > 1
- }, logical(1))]
- }
- build_sem_model <- function(exposure, meta_cols, outcome, covars) {
- measurement_part <- paste0(
- "MetFactor =~ ",
- paste(meta_cols, collapse = " + ")
- )
- covar_rhs <- if (length(covars) > 0) {
- paste0(" + ", paste(covars, collapse = " + "))
- } else {
- ""
- }
- structural_part <- paste0(
- "\n",
- "MetFactor ~ a*", exposure, covar_rhs, "\n",
- outcome, " ~ b*MetFactor + cprime*", exposure, covar_rhs, "\n\n",
- "IE := a*b\n",
- "DE := cprime\n",
- "TE := cprime + (a*b)\n"
- )
- paste(measurement_part, structural_part, sep = "\n")
- }
- run_sem_latent <- function(dat, exposure, meta_cols,
- outcome = "migraine_incident",
- covars,
- estimator = "WLSMV") {
- use_vars <- unique(c(exposure, meta_cols, outcome, covars))
- df <- dat %>%
- select(all_of(use_vars)) %>%
- filter(complete.cases(.)) %>%
- as.data.frame()
- if (nrow(df) < 100 || length(unique(df[[outcome]])) < 2) {
- warning("Skipping ", exposure, ": insufficient complete cases or outcome variation.")
- return(NULL)
- }
- df[[exposure]] <- as.numeric(scale(as.numeric(df[[exposure]])))
- valid_covars <- remove_invalid_covars(df, covars)
- model <- build_sem_model(
- exposure = exposure,
- meta_cols = meta_cols,
- outcome = outcome,
- covars = valid_covars
- )
- fit <- lavaan::sem(
- model,
- data = df,
- ordered = outcome,
- estimator = estimator,
- std.lv = TRUE
- )
- pe <- lavaan::parameterEstimates(fit, standardized = TRUE) %>%
- as.data.frame()
- loadings <- pe %>%
- filter(op == "=~", lhs == "MetFactor") %>%
- transmute(
- Exposure = exposure,
- Metabolite_ID = rhs,
- Loading = est,
- SE = se,
- Z = z,
- P_value = pvalue,
- Std_loading = std.all,
- N = nrow(df)
- )
- effects <- pe %>%
- filter(
- (op == "~" & lhs %in% c("MetFactor", outcome)) |
- (op == ":=" & lhs %in% c("IE", "DE", "TE"))
- ) %>%
- mutate(
- Exposure = exposure,
- N = nrow(df)
- )
- fit_indices <- data.frame(
- Exposure = exposure,
- N = nrow(df),
- Chisq = lavaan::fitMeasures(fit, "chisq"),
- DF = lavaan::fitMeasures(fit, "df"),
- P_value = lavaan::fitMeasures(fit, "pvalue"),
- CFI = lavaan::fitMeasures(fit, "cfi"),
- TLI = lavaan::fitMeasures(fit, "tli"),
- RMSEA = lavaan::fitMeasures(fit, "rmsea"),
- SRMR = lavaan::fitMeasures(fit, "srmr")
- )
- list(
- exposure = exposure,
- model = model,
- fit = fit,
- loadings = loadings,
- effects = effects,
- fit_indices = fit_indices
- )
- }
- format_sem_tables <- function(sem_results, exposure_labels, meta_name_df) {
- valid_results <- compact(sem_results)
- loading_table <- bind_rows(map(valid_results, "loadings")) %>%
- left_join(meta_name_df, by = "Metabolite_ID") %>%
- mutate(
- Exposure = recode(Exposure, !!!as.list(exposure_labels)),
- Loading_95CI = sprintf(
- "%.4f (%.4f, %.4f)",
- Loading,
- Loading - 1.96 * SE,
- Loading + 1.96 * SE
- ),
- Direction = case_when(
- Std_loading > 0 ~ "Positive",
- Std_loading < 0 ~ "Negative",
- TRUE ~ "Neutral"
- )
- ) %>%
- select(
- Exposure, Metabolite_ID, Metabolite_name,
- Loading, SE, Z, P_value, Std_loading,
- Loading_95CI, Direction, N
- )
- effect_table <- bind_rows(map(valid_results, "effects")) %>%
- mutate(Exposure = recode(Exposure, !!!as.list(exposure_labels)))
- fit_table <- bind_rows(map(valid_results, "fit_indices")) %>%
- mutate(Exposure = recode(Exposure, !!!as.list(exposure_labels)))
- list(
- loadings = loading_table,
- effects = effect_table,
- fit_indices = fit_table
- )
- }
- # -----------------------------
- # Main analysis
- # -----------------------------
- required_vars <- c(
- "incident_migraine", "prevalent_depression", "prevalent_anxiety",
- "insomnia", "sleep duration", lasso_meta_cols, base_covars
- )
- check_required_vars(dat_base, required_vars)
- meta_name_df <- make_metabolite_map(lasso_meta_cols)
- dat_sem <- prepare_sem_data(dat_base, lasso_meta_cols)
- covars_sem <- get_sem_covars(dat_sem)
- sem_results <- lapply(names(exposures), function(expo) {
- tryCatch(
- run_sem_latent(
- dat = dat_sem,
- exposure = expo,
- meta_cols = lasso_meta_cols,
- outcome = "migraine_incident",
- covars = covars_sem,
- estimator = "WLSMV"
- ),
- error = function(e) {
- warning("SEM failed for ", expo, ": ", conditionMessage(e))
- NULL
- }
- )
- })
- names(sem_results) <- names(exposures)
- sem_tables <- format_sem_tables(sem_results, exposures, meta_name_df)
- # -----------------------------
- # Export results
- # -----------------------------
- fwrite(
- sem_tables$loadings,
- file.path(result_dir, "sem_latent_metabolite_factor_loadings.csv")
- )
- fwrite(
- sem_tables$effects,
- file.path(result_dir, "sem_model_based_association_parameters.csv")
- )
- fwrite(
- sem_tables$fit_indices,
- file.path(result_dir, "sem_fit_indices.csv")
- )
- saveRDS(
- sem_results,
- file.path(result_dir, "sem_latent_factor_results.rds")
- )
- message("SEM analysis completed. Results saved to: ", normalizePath(result_dir))
4.SEM.R at commit 0f4a3f2, no license · at the source
Overview
- The Second Affiliated Hospital and Yuying Children’s Hospital of Wenzhou Medical University, Wenzhou, Zhejiang, China
- Wenzhou Medical University, Wenzhou, Zhejiang, China
Abstract
Migraine has been linked to metabolic and vascular factors, and previous metabolomic studies have implicated HDL-related alterations, but large-scale prospective evidence remains limited. We analyzed 251 baseline plasma metabolites measured by nuclear magnetic resonance in 479,760 UK Biobank participants, including 6,724 incident hospital-diagnosed migraine cases during follow-up. Prospective and cross-sectional analyses replicated and extended a coherent lipid and lipoprotein pattern: HDL-related measures were generally inversely associated with hospital-diagnosed migraine, whereas triglyceride-rich and VLDL-related measures showed positive associations. Repeated least absolute shrinkage and selection operator (LASSO) analysis prioritized 12 metabolite features, which were further examined in exploratory analyses of brain structural imaging phenotypes, migraine polygenic risk, and affective and sleep-related traits. These findings provide large-scale prospective evidence supporting a structured plasma metabolomic profile associated with hospital-diagnosed migraine and contextualize systemic lipid and lipoprotein metabolism as a relevant domain for future mechanistic and translational studies of migraine-related metabolic variation.
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 9 matches between paragraphs and lines of code.
sun160414/UKB_Metabolomic_Migraine
0f4a3f2f88ad3f05812b088a146993ddd039aa19, 26 September 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
6 files
- 1.Cox+linear.R, R, 456 lines, 3 matches
- 2.Trajectories+clusters.
R , R, 497 lines, 1 match - 4.SEM.R, R, 336 lines, 3 matches
- Protocol_demo/
generate_synthetic_data. , R, 193 lines, 1 matchR - Protocol_demo/
run_synthetic_example.R , R, 754 lines, 1 match - README.md, Text, 244 lines
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;
- 5 scripts, each with its path and the digest of its content;
- 9 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 and code availability
• Individual-level UKB data used in this study are available to approved researchers through the UKB application system and cannot be publicly redistributed by the authors because of data-access restrictions. Detailed information on UKB data access is available through the UKB research access platform (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 59 references.
Cite
This paper
Hong, Y., Chen, F., Wang, Y., & Huang, X.-F. (2026). Plasma metabolomic signatures of migraine in 479,760 adults. iScience, 29(8), 117031. https://
BibTeX
@article{hong2026plasma,
author = {Hong, Yanggang and Chen, Feng and Wang, Yi and Huang, Xiu-Feng},
title = {{Plasma metabolomic signatures of migraine in 479,760 adults}},
journal = {iScience},
year = {2026},
month = aug,
volume = {29},
number = {8},
pages = {117031},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/
url = {https://
pmid = {42602977},
pmcid = {PMC13475662}
}
RIS
TY - JOUR
AU - Hong, Yanggang
AU - Chen, Feng
AU - Wang, Yi
AU - Huang, Xiu-Feng
TI - Plasma metabolomic signatures of migraine in 479,760 adults
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/
VL - 29
IS - 8
SP - 117031
SN - 2589-0042
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Plasma metabolomic signatures of migraine in 479,760 adults",
"container-title": "iScience",
"author": [
{
"family": "Hong",
"given": "Yanggang"
},
{
"family": "Chen",
"given": "Feng"
},
{
"family": "Wang",
"given": "Yi"
},
{
"family": "Huang",
"given": "Xiu-Feng"
}
],
"container-title-short":
"volume": "29",
"issue": "8",
"page": "117031",
"DOI": "10.1016/
"PMID": "42602977",
"PMCID": "PMC13475662",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
6
]
]
}
}
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/neuonc/noag128 [code]
- Spatially-resolved single-cell imaging of melanoma brain metastases identifies localized immune patterns predictive of immune checkpoint blockade response.Journal: Neuro-oncologyIn common: survival, circlize, ComplexHeatmap, 4 other tools, clinical / translational, genetics / omics
- [2] doi:10.1016/j.isci.2026.115657 [code]
- Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug.Journal: iScienceIn common: survival, circlize, ComplexHeatmap, 4 other tools, clinical / translational
- [3] doi:10.1093/bioinformatics/btag592 [code]
- Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.Journal: Bioinformatics (Oxford, England)In common: survival, circlize, ComplexHeatmap, 4 other tools, genetics / omics
- [4] doi:10.3390/ijms27093997 [code]
- Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC.Journal: International journal of molecular sciencesIn common: survival, circlize, ComplexHeatmap, 4 other tools, genetics / omics
- [5] doi:10.1016/j.xcrm.2026.102682 [code]
- TET CpG sequence-context-specifi
c DNA demethylation shapes progression of IDH-mutant gliomas. Journal: Cell reports. MedicineIn common: survival, circlize, ComplexHeatmap, 4 other tools, genetics / omics - [6] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: survival, circlize, ComplexHeatmap, 4 other tools
- [7] doi:10.1038/s42003-026-10252-6 [code]
- RET signaling as a mediator of estrogen receptor positive breast cancer brain metastasis.Journal: Communications biologyIn common: survival, circlize, ComplexHeatmap, 4 other tools
- [8] doi:10.3390/ijms27156925 [code]
- XGBoost-SHAP Interpretable Modeling Identifies and Validates an Eight-Gene Biomarker for Hepatic Encephalopathy Risk Prediction in Cirrhosis.Journal: International journal of molecular sciencesIn common: lavaan, survival, data.table, 3 other tools, genetics / omics
- [9] doi:10.1038/s41467-026-76676-0 [code]
- Determinants of functional burden pleiotropy and gene dosage responses across human traits.Journal: Nature communicationsIn common: circlize, ComplexHeatmap, data.table, 3 other tools, genetics / omics, 1 reference
- [10] doi:10.1038/s41467-026-77170-3 [code]
- DNA methylation profiling identifies long-range epigenetic silencing of clustered protocadherins as a key determinant of meningioma progression.Journal: Nature communicationsIn common: survival, circlize, ComplexHeatmap, 3 other tools, genetics / omics
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, 5 scripts, and 9 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:c07bd4a258b25125…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
