Last updated: 2026-01-21
Checks: 7 0
Knit directory:
fsusie-experiments/analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.7.1). 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(1) 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 a6b8fa5. 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:
Untracked files:
Untracked: analysis/h3k27ac_cs1snp_fsusie.rds
Untracked: analysis/rosmap_h3k27ac_cache/
Untracked: analysis/rosmap_overview_cache/
Untracked: data/afreq.RData
Untracked: data/analysis_result/Fungen_xQTL.ENSG00000163808.cis_results_db.export.rds
Untracked: data/analysis_result/ROSMAP_haQTL.chr3_43915257_48413435.fsusie_mixture_normal_top_pc_weights.rds
Untracked: data/analysis_result/ROSMAP_mQTL.chr3_43915257_48413435.fsusie_mixture_normal_top_pc_weights.rds
Untracked: outputs/CD2AP_obj.RData
Untracked: outputs/CR1_CR2_all_effects.RData
Untracked: outputs/CR1_CR2_obj.RData
Untracked: outputs/ROSMAP_DLPFC_mega_eQTL.cs_only.tsv.gz
Untracked: outputs/ROSMAP_DLPFC_pQTL.cs_only.tsv.gz
Untracked: outputs/ROSMAP_haQTL_cs_effect_ha_peak_annotation.tsv.gz
Untracked: outputs/ROSMAP_haQTL_cs_snp_annotation.tsv.gz
Untracked: outputs/ROSMAP_haQTL_cs_snp_toppc1_annotation.tsv.gz
Untracked: outputs/ROSMAP_mQTL_cs_effect_cpg_annotation.tsv.gz
Untracked: outputs/ROSMAP_mQTL_cs_snp_annotation.tsv.gz
Untracked: outputs/ROSMAP_mQTL_cs_snp_toppc1_annotation.tsv.gz
Untracked: scripts_plot/cases_study/#CR1_CR2_from_RData.R#
Untracked: scripts_plot/cases_study/.#CR1_CR2_from_RData.R
Untracked: scripts_plot/cases_study/CR1CR2_zoomin_plot.pdf
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/smash_meth_ha.Rmd) and
HTML (docs/smash_meth_ha.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 | a6b8fa5 | Peter Carbonetto | 2026-01-21 | wflow_publish("smash_meth_ha.Rmd", verbose = T, view = F) |
| html | 2563850 | Peter Carbonetto | 2026-01-21 | Built the smash_meth_ha workflowr page. |
| Rmd | 608eb9c | Peter Carbonetto | 2026-01-21 | wflow_publish("smash_meth_ha.Rmd", verbose = T, view = F) |
Load the example DNA methylation (WGBS) and H3K9ac (ChIP-seq) signals.
load("../data/smash_meth_ha.RData")
Load smashr:
library(smashr)
Set the seed to make the results reproducible:
set.seed(1)
This plot shows the beta values at the CpG locations for a single sample (black dots) and the “smoothed” signal obtained by running SMASH on these data (blue curve):
y <- methyl_dat$beta
res <- smash.gaus(y,v.est = FALSE)
plot(y,pch = 20,col = "black",cex = 0.65,xlab = "CpG",ylab = "beta value")
lines(res,type = "l",col = "royalblue")

| Version | Author | Date |
|---|---|---|
| 2563850 | Peter Carbonetto | 2026-01-21 |
Note that the CpG locations are ordered sequencing by base-pair position along the chromosome (specifically, chromosome 20, near gene CASS4). However, the positions of the CpG probes are not distributed uniformly; there are some large gaps where there is no probe. The methylation data are shown in this way to make the spatial structure more obvious.
This plot shows the read count data from the ChIP-seq assay (black dots) and the “smoothed” signal obtained by running SMASH on these data (blue curve):
y <- h3k9ac_dat$y
pos <- h3k9ac_dat$pos
res <- smash.poiss(y,post.var = FALSE)
plot(pos/1e6,y,pch = 20,col = "black",
xlab = "base-pair position on chromosome 1 (Mb)",
ylab = "read count")
lines(pos/1e6,res,type = "l",col = "royalblue")

| Version | Author | Date |
|---|---|---|
| 2563850 | Peter Carbonetto | 2026-01-21 |
This the H3K9ac signal from a region on chromosome 1 near genes CR1 and CR2.
Note that since these are counts, we used the Poisson-based SMASH method. Also note that the read counts are actually read counts averaged across a few samples, so the read counts are not actually integers.
sessionInfo()
# R version 4.3.3 (2024-02-29)
# Platform: aarch64-apple-darwin20 (64-bit)
# Running under: macOS 15.7.1
#
# Matrix products: default
# BLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib
# LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
#
# locale:
# [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#
# time zone: America/Chicago
# tzcode source: internal
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] smashr_1.3-12
#
# loaded via a namespace (and not attached):
# [1] Matrix_1.6-5 jsonlite_2.0.0 compiler_4.3.3 promises_1.3.3
# [5] Rcpp_1.1.0 stringr_1.5.1 git2r_0.33.0 bitops_1.0-7
# [9] wavethresh_4.7.2 later_1.4.2 jquerylib_0.1.4 yaml_2.3.10
# [13] fastmap_1.2.0 lattice_0.22-5 R6_2.6.1 mixsqp_0.3-54
# [17] workflowr_1.7.1 knitr_1.50 MASS_7.3-60.0.1 tibble_3.3.0
# [21] rprojroot_2.0.4 bslib_0.9.0 pillar_1.11.0 rlang_1.1.6
# [25] cachem_1.1.0 SQUAREM_2021.1 stringi_1.8.7 httpuv_1.6.14
# [29] xfun_0.52 caTools_1.18.2 fs_1.6.6 sass_0.4.10
# [33] invgamma_1.2 truncnorm_1.0-9 cli_3.6.5 magrittr_2.0.3
# [37] digest_0.6.37 grid_4.3.3 irlba_2.3.5.1 lifecycle_1.0.4
# [41] vctrs_0.6.5 data.table_1.17.6 evaluate_1.0.4 glue_1.8.0
# [45] whisker_0.4.1 ashr_2.2-66 rmarkdown_2.29 tools_4.3.3
# [49] pkgconfig_2.0.3 htmltools_0.5.8.1