Causal mediation analysis for UK Biobank Research Analysis Platform (RAP) cohorts using UKBAnalytica. Wraps regmedint (Valeri & VanderWeele 4-way decomposition: CDE, PNDE, TNIE, TNDE, PNIE, TE, PM) via run_mediation; supports multi-mediator screening (run_multi_mediator), visualization (plot_mediation, plot_mediation_forest) for linear, logistic, and Cox outcome models with continuous or binary mediators. Use this skill when the user asks for mediation analysis, indirect effects, natural direct / indirect effects, controlled direct effects, proportion mediated, or mediator screening across multiple candidates. Triggers: mediation analysis, indirect effect, natural direct effect, TNIE, PNDE, proportion mediated, 中介分析, /ukbsci-mediation. Hard rule: local agents must not read or inspect real UKB RAP participant-level data; generate scripts for RAP execution and interpret aggregate outputs only.
Build a UK Biobank disease cohort from a phenotype table extracted on the Research Analysis Platform (RAP), using the UKBAnalytica R package. Covers disease-definition construction and catalog lookup (get_predefined_diseases, get_disease_catalog, get_pomegranate_diseases, create_disease_definition, combine_disease_definitions), source parsers (parse_icd10_diagnoses, parse_icd9_diagnoses, parse_opcs4_procedures, parse_cancer_registry, parse_death_records, parse_self_reported_illnesses), multi-source case extraction (extract_cases_by_source, extract_disease_diagnosis, extract_disease_history, extract_disease_history_sensitivity, compare_data_sources), reusable follow-up time skeletons (ukb_time_skeleton), and the Cox-ready dataset builder build_survival_dataset() with prevalent vs incident separation and follow-up time computation, plus select_incident_by_years() for time-window stratification. Use this skill when the user asks to define a UKB disease phenotype, inspect curated/Pomegranate diagnostic codes, sep
Machine learning workflows (binary / multiclass classification and right-censored survival) for UK Biobank Research Analysis Platform (RAP) cohorts using UKBAnalytica. End-to-end pipelines (ukb_ml_workflow, ukb_ml_flow, ukb_ml_survival_workflow) cover frozen train / validation / test split, feature selection (Boruta, filter, glmnet), hyperparameter tuning (grid / random / Bayesian), final refit, test-set evaluation, model comparison, and model-agnostic interpretation via SHAP. Supports RF / XGBoost / glmnet / SVM / NNet / RPart / Naive Bayes / Logistic for classification, and RSF / GBM / coxnet for survival. Output evaluation: ROC, PR, calibration, DCA, KS, gain & lift, confusion matrix, threshold optimization, SHAP summary / dependence / force, plus plot_ml_* and plot_shap_* visualizations. Use this skill when the user asks for a UKB-based predictive model, ML pipeline, SHAP interpretation, C-index for a survival model, or comparison between several ML algorithms. Triggers: UKB ML, machine learning, XGBoost,
Publication-grade figure production for UK Biobank Research Analysis Platform (RAP) analyses built with UKBAnalytica. Wraps the package's built-in plotters — plot_forest (subgroup / regression forest), plot_calibration (clinical-model calibration), plot_regression_volcano (multi-exposure / multi-protein volcano), plot_heatmap, plot_stacked_bar, plot_violin, and plot_scatter for lightweight exploratory/manuscript panels, plus the family of survival, ML, SHAP, mediation, propensity, imputation, correlation, and enrichment plots from sibling skills — and adds a shared neutral theme (ukbsci_clinical / ukbsci_diverging / ukbsci_sequential palettes), a dual-format save helper, and a figure-contract checklist. Use this skill when the user asks for any manuscript figure derived from UKBAnalytica outputs: forest plots, volcano plots, KM curves, calibration plots, Love plots, SHAP summaries, multi-panel composites, or PDF / SVG high-resolution export. Triggers: UKB plotting, forest plot, volcano, calibration, manuscrip
Propensity-score analyses for UK Biobank Research Analysis Platform (RAP) cohorts built with UKBAnalytica. Covers PS estimation via logistic regression or gradient-boosted models (estimate_propensity_score), 1:N nearest-neighbor or optimal matching (match_propensity), inverse-probability of treatment weighting (calculate_weights, ATE / ATT / ATC, stabilized, truncated), covariate balance diagnostics (assess_balance, plot_balance, plot_ps_distribution), and weighted regression with robust standard errors (run_weighted_analysis). Use this skill when the user asks for propensity score matching, PSM, IPTW, ATE / ATT, covariate balance, Love plot, PS distribution check, or a weighted Cox / logistic / linear analysis on a UKB cohort. Triggers: propensity score, PSM, IPTW, ATE, ATT, Love plot, covariate balance, 倾向评分, 倾向得分匹配, /ukbsci-propensity. Hard rule: local agents must not read or inspect real UKB RAP participant-level data; generate scripts for RAP execution and interpret aggregate outputs only.
Discover UK Biobank fields and extract phenotype data from inside an authenticated UK Biobank Research Analysis Platform (RAP) session using the UKBAnalytica R package (rap_find_dataset, rap_list_fields, rap_plan_extract, rap_extract_pheno, rap_submit_extract, ukb_metadata_setup, ukb_search_fields, ukb_field_info, ukb_extract_fields, ukb_decode, ukb_check_rap_env, ukb_create_extraction_manifest, ukb_write_extraction_manifest). Use this skill when the user asks to search UKB fields, check the RAP environment, plan/run a phenotype extraction on RAP, create an extraction manifest, choose between dx extract_dataset (sync) and table-exporter (async), decode RAP column names or coded values, or build the upstream phenotype table that feeds ukbsci-cohort. Triggers: UK Biobank RAP extract, dx extract_dataset, table-exporter, UKB field search, RAP 提取, 字段搜索, 表型提取, /ukbsci-rap-extract. Hard rule: local agents must not read or inspect real UKB RAP participant-level data; generate scripts for RAP execution and interpret a
Subgroup interaction tests and sensitivity-analysis filters for UK Biobank Research Analysis Platform (RAP) cohorts built with UKBAnalytica. Covers run_subgroup_analysis and run_multi_subgroup (stratum-specific Cox / logistic / linear / GLM / negative-binomial effects + interaction p-value), sensitivity_exclude_early_events (drop events within N years of baseline to guard against reverse causation), and sensitivity_exclude_missing_covariates (complete-case analysis with optional flow tracking), ukb_participant_flow / plot_participant_flow for cohort attrition, and ukb_sensitivity_suite for common Cox sensitivity runs. Use this skill when the user asks for subgroup analysis, interaction tests, effect modification, complete-case sensitivity, or early-event exclusion sensitivity. Subgroup analysis now supports all model families: cox, logistic, linear, glm (any GLM family including Poisson, quasi-Poisson, Gamma), and negbin (negative-binomial). Triggers: subgroup analysis, interaction p-value, effect modificatio
End-to-end orchestrator for a UK Biobank Research Analysis Platform (RAP) study using the UKBAnalytica R package. Plans, sequences, and supervises the full pipeline — from RAP phenotype extraction, through disease-cohort construction with reusable time skeletons, variable preprocessing, baseline tables, multiple imputation, regression / survival / propensity / mediation / subgroup-sensitivity analyses, machine learning, omics workflows, and final publication-ready plots — by routing each phase to the right specialist skill (ukbsci-rap-extract, ukbsci-cohort, ukbsci-preprocess, ukbsci-baseline, ukbsci-imputation, ukbsci-regression, ukbsci-survival, ukbsci-propensity, ukbsci-mediation, ukbsci-subgroup-sensitivity, ukbsci-proteomics, ukbsci-ml, ukbsci-plot). Use this skill when the user asks for an end-to-end UKB study, an analysis plan covering multiple phases, or "RAP-to-publication" guidance. Triggers: end-to-end UKB analysis, UKB pipeline, RAP to publication, full study plan, 端到端 UKB 分析, RAP 到论文, 完整流程, 项目计划,