Last updated: 2026-08-25
Checks: 7 0
Knit directory: coderepo-local/
This reproducible R Markdown analysis was created with workflowr (version 1.7.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20251109) was run prior to running
the code in the R Markdown file. Setting a seed ensures that any results
that rely on randomness, e.g. subsampling or permutations, are
reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 052df2a. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for
the analysis have been committed to Git prior to generating the results
(you can use wflow_publish or
wflow_git_commit). workflowr only checks the R Markdown
file, but you know if there are other scripts or data files that it
depends on. Below is the status of the Git repository when the results
were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: Rplots.pdf
Ignored: analysis/.DS_Store
Ignored: analysis/.Rhistory
Ignored: analysis/site_libs/
Ignored: code/.DS_Store
Ignored: code/.Rhistory
Ignored: code/revision_simulations/.DS_Store
Ignored: data/appendixB/
Ignored: data/dynamic_eQTL_real/
Ignored: data/revision_simulations/
Ignored: data/toy_example/
Ignored: output/dynamic_eQTL_real/
Ignored: output/pdf/
Ignored: output/playwright/
Ignored: output/revision_simulations/
Ignored: scripts/
Untracked files:
Untracked: analysis/revision_internal_fash_knockoff.rmd
Untracked: code/revision_simulations/internal/fash_knockoff/reporting.R
Untracked: code/revision_simulations/internal/fash_knockoff/test_reporting.R
Unstaged changes:
Modified: code/revision_simulations/internal/fash_knockoff/plot_lfdr_histograms.R
Modified: code/revision_simulations/internal/fash_knockoff/plot_w_boxplot_by_discovery.R
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were
made to the R Markdown
(analysis/revision_enhancer_enrichment.rmd) and HTML
(docs/revision_enhancer_enrichment.html) files. If you’ve
configured a remote Git repository (see ?wflow_git_remote),
click on the hyperlinks in the table below to view the files as they
were in that past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | 052df2a | Ziang Zhang | 2026-08-25 | Simplify R6 enhancer-enrichment page to three Roadmap annotations |
| Rmd | 09f63bc | Ziang Zhang | 2026-08-24 | Sync revision analyses and rendered pages |
| html | 09f63bc | Ziang Zhang | 2026-08-24 | Sync revision analyses and rendered pages |
| Rmd | c87957a | Ziang Zhang | 2026-08-10 | Add revision analyses: R1-R6 reviewer-facing pages and internal studies |
| html | c87957a | Ziang Zhang | 2026-08-10 | Add revision analyses: R1-R6 reviewer-facing pages and internal studies |
The reviewer asked whether the dynamic eQTLs that FASH discovers show enrichment in functionally relevant enhancers. This page is a short, orthogonal check on that question: it asks whether the discovered variants fall inside enhancer regions of the cell types involved in the differentiation more often than the variants tested in this study do. The estimates below are descriptive and exploratory. They are not a fully adjusted functional-enrichment analysis, and they are not used anywhere as evidence that individual discoveries are correct.
Two sections, each comparing all discovered variants against one lead variant per gene:
We used enhancer annotations from the Roadmap Epigenomics Project 15-state ChromHMM segmentation (Roadmap Epigenomics Consortium et al. 2015). We treated the Roadmap enhancer states (EnhG and Enh) as enhancer regions and focused on three epigenomes spanning the differentiation trajectory of this iPSC-to-cardiomyocyte study:
| Epigenome | Tissue | Stage |
|---|---|---|
| E020 | iPS-20b | starting state |
| E013 | hESC-derived CD56+ mesoderm | intermediate state |
| E095 | left ventricle | terminal state |
Each tested variant is treated as a single base and intersected against the enhancer intervals of each epigenome, giving one indicator per variant per epigenome over all 745,867 tested variants.
plot_method_comparison()
Figure 1. Enhancer enrichment for current FASH, Strober linear, and Strober quadratic/nonlinear discoveries, using all discovered variants (left) and one lead variant per gene (right). Enhancer annotations are the Roadmap 15-state ChromHMM enhancer states for E020 (iPSC), E013 (mesoderm), and E095 (left ventricle). Fold enrichment is the overlap rate in the variant set divided by the overlap rate among all tested variants; the dashed line marks no enrichment. Bars are leave-one-autosome-out jackknife 95% intervals.
With one lead variant per gene, FASH’s 1,169 lead variants are enriched at the intermediate and terminal states: 1.47-fold (95% CI 1.15-1.88) at the E013 mesoderm enhancers and 1.26-fold (95% CI 1.04-1.53) at the E095 left-ventricle enhancers. The starting state gives no signal, 1.05-fold (95% CI 0.77-1.43). Both Strober analyses point the same way at E013 and E095, with intervals that overlap FASH’s.
Using every discovered variant the FASH estimates are smaller: 1.22-fold (95% CI 1.03-1.44) at E095, and 1.11-fold (95% CI 0.91-1.36) at E013, which is not distinguishable from the background. The Strober sets carry somewhat larger estimates in this view. The three discovery sets differ in size and membership and each has its own gene composition, so these differences are not a formal comparison between methods.
An rsID is counted as FASH-only if it appears in neither Strober analysis, regardless of which gene it was paired with; this is the conservative reading, since an enhancer annotation is a property of a variant rather than of a gene-variant pair. For the lead column, FASH’s lowest-lfdr variant is chosen for each gene first and the exclusion is applied afterwards, so a gene whose best variant Strober also found drops out rather than falling back to a weaker one. That leaves 7,981 of FASH’s 9,148 discovered variants, and 1,029 of its 1,169 lead variants.
plot_fash_only()
Figure 2. Enhancer enrichment for FASH discoveries at variants that neither Strober analysis identified (blue), against all FASH discoveries as a reference (grey), using all discovered variants (left) and one lead variant per gene (right). Enhancer annotations are the Roadmap 15-state ChromHMM enhancer states for E020 (iPSC), E013 (mesoderm), and E095 (left ventricle). Fold enrichment is the overlap rate in the variant set divided by the overlap rate among all tested variants; the dashed line marks no enrichment. Bars are leave-one-autosome-out jackknife 95% intervals.
The lead-per-gene enrichment survives the exclusion largely intact: 1.38-fold (95% CI 1.12-1.71) at E013 and 1.26-fold (95% CI 1.04-1.53) at E095, against 1.47-fold and 1.26-fold for the unfiltered FASH lead set. Using every FASH-only variant the estimates are weaker, with intervals that reach or cross 1: 1.10-fold (95% CI 0.92-1.31) at E013 and 1.17-fold (95% CI 1.00-1.36) at E095.
Taken together, FASH discoveries — including lead variants that neither Strober analysis identified — show enrichment in enhancer annotations relevant to this differentiation, which offers orthogonal support for their regulatory relevance. The signal is clearest for the mesoderm and left-ventricle states and under lead-per-gene selection.
Background. All 745,867 variants tested in this study that lie on an autosome and participate in at least one tested gene-variant pair. No external reference panel enters, so the background is exactly the cis-eQTL testing universe from which the discoveries were drawn.
Fold enrichment. For a variant set and an enhancer annotation,
\[\text{fold enrichment} = \frac{\text{proportion of selected variants overlapping the enhancer}}{\text{proportion of all tested variants overlapping the enhancer}}\]
The background excludes the set being tested, so a set is never part of its own comparator. No matched controls are used: the purpose here is a simple exploratory check, and every background variant already comes from the same testing universe.
Discovery sets. FASH uses cumulative lfdr at FDR
0.05 after the BF correction; both Strober analyses use their reported
eFDR 0.05, with non_linear_dynamic_eqtls_5_pc.txt labelled
quadratic/nonlinear throughout. “One lead variant per gene” keeps, for
each discovered gene, the variant with the lowest lfdr (FASH) or the
smallest p-value (Strober). This reduces the repeated contribution of
multiple variants tagging the same signal; the all-variant view reports
the complete discovery set.
Uncertainty. Uncertainty was assessed using a leave-one-autosome-out jackknife to account approximately for local dependence among variants. All intervals shown are 95% jackknife intervals.
The figures on this page are computed at render time by enrichment_api.R,
through exactly the calls below:
source(
"code/revision_simulations/internal/fash_strober_enhancer_comparison/enrichment_api.R"
)
# 1. Background: every variant tested in this study.
background <- load_background()
# 2. Variant sets: the FASH and Strober discovery sets, all and lead-per-gene.
sets <- load_variant_sets()
# 3. The three Roadmap enhancer annotations.
annotations <- load_annotation_groups("custom", groups = c(
"Roadmap E020 iPS-20b: Enhancer",
"Roadmap E013 hESC-derived CD56+ mesoderm: Enhancer",
"Roadmap E095 left ventricle: Enhancer"
))
# 4. Fold enrichment against the tested-variant background, with
# 5. leave-one-autosome-out jackknife 95% intervals.
compute_enrichment(sets, background, annotations, controls = "background")
compute_enrichment() takes any named list of variant
vectors, so substituting your own sets needs no other change:
compute_enrichment(
list(my_hits = readLines("my_variants.txt"), fash_only = sets$current_only_lead),
background, annotations, controls = "background"
)
Rebuilding the inputs from source — the annotation intervals and the tested variant universe, then the discovery sets:
Rscript --vanilla \
code/revision_simulations/internal/variant_annotation_enrichment/download_variant_annotations.R
Rscript --vanilla \
code/revision_simulations/internal/variant_annotation_enrichment/run_variant_annotation_enrichment.R
Rscript --vanilla \
code/revision_simulations/internal/fash_strober_enhancer_comparison/run_fash_strober_enhancer_comparison.R
Intermediate data stays under output/, which is not
tracked in git; the repository carries code, not data. Rebuilding this
page:
Rscript --vanilla -e \
'workflowr::wflow_build("analysis/revision_enhancer_enrichment.rmd")'
Roadmap Epigenomics Consortium, Kundaje, A., Meuleman, W., Ernst, J., Bilenky, M., Yen, A., et al. (2015). Integrative analysis of 111 reference human epigenomes. Nature 518, 317–330. https://doi.org/10.1038/nature14248
sessionInfo()
R version 4.5.1 (2025-06-13)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.6.1
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1
locale:
[1] en_CA/en_CA/en_CA/C/en_CA/en_CA
time zone: America/Chicago
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] workflowr_1.7.2
loaded via a namespace (and not attached):
[1] gtable_0.3.6 jsonlite_2.0.0 dplyr_1.1.4 compiler_4.5.1
[5] promises_1.5.0 tidyselect_1.2.1 Rcpp_1.1.1-1.1 stringr_1.6.0
[9] git2r_0.36.2 dichromat_2.0-0.1 callr_3.7.6 later_1.4.4
[13] jquerylib_0.1.4 scales_1.4.0 yaml_2.3.12 fastmap_1.2.0
[17] ggplot2_4.0.3 R6_2.6.1 labeling_0.4.3 generics_0.1.4
[21] knitr_1.50 tibble_3.3.0 rprojroot_2.1.1 RColorBrewer_1.1-3
[25] bslib_0.9.0 pillar_1.11.1 rlang_1.2.0 cachem_1.1.0
[29] stringi_1.8.9 httpuv_1.6.16 xfun_0.55 S7_0.2.2
[33] getPass_0.2-4 fs_1.6.6 sass_0.4.10 otel_0.2.0
[37] cli_3.6.6 withr_3.0.3 magrittr_2.0.5 ps_1.9.1
[41] grid_4.5.1 digest_0.6.39 processx_3.8.6 rstudioapi_0.17.1
[45] lifecycle_1.0.5 vctrs_0.7.3 evaluate_1.0.5 glue_1.8.1
[49] farver_2.1.2 whisker_0.4.1 rmarkdown_2.30 httr_1.4.7
[53] tools_4.5.1 pkgconfig_2.0.3 htmltools_0.5.9