1 Introduction

methylscaper is an R package for visualizing data that jointly profile endogenous methylation and chromatin accessibility (MAPit, NOMe-seq, scNMT-seq, nanoNOMe, etc.). The package offers pre-processing for single-molecule data and accepts input from Bismark (or similar alignment programs) for single-cell data. A common interface for visualizing both data types is done by generating ordered representational methylation-state matrices. The package provides a Shiny app to allow for interactive and optimal ordering of the individual DNA molecules to discover methylation patterns and nucleosome positioning.

Note: If you use methylscaper in your research, please cite our manuscript on bioRxiv.

If, after reading this vignette you have questions, please submit your question on GitHub: Question or Report Issue. This will notify the package maintainers and benefit other users.

2 Getting Started

2.1 Installation

For local use of methylscaper, it can be installed into R from Bioconductor (using R version >= 4.1.0):

if (!requireNamespace("BiocManager", quietly = TRUE))


methylscaper can also be installed via GitHub. The R4.0 branch is current with the Bioconductor version and only requires R version >= 4.0.0 while 4.1 is still under development or for those who have not yet upgraded.

if (!requireNamespace("devtools", quietly=TRUE))
devtools::install_github("rhondabacher/methylscaper", ref="R4.0")

2.2 Load the package

After successful installation, load the package into the working space.


To access the Shiny app, simply run:


3 Visualizing single-cell data

For visualizing single-cell data from methods such as scNMT-seq, methylscaper begins with pre-aligned data. For each cell, there should be two files, one for the GCH sites and another for the HCG sites. The minimal number of columns needed for methylscaper is three: chromosome, position, and methylation status. This type of file is generated via the “Bismark_methylation_extractor” script in the Bismark software tool. The extractor function outputs files in four or six column output files (see bedGraph option described here: Methylscaper will accept these and convert to the three column format internally.

Due to the large file size, methylscaper further processes the data for the visualization analysis to the chromosome level. In the Shiny app, first select all files associated with the endogenous methylation and then select all files associated with accessibility. The files should be named in such a way that the file pairs can be inferred (e.g “Expr1_Sample1_met” pairs with “Expr1_Sample1_acc”). Finally, indicate the desired chromosome to filter to the chromosome level.

3.0.1 Example data for single-cell data

Below we walk through an example using data from Clark et al., 2018, obtained from GSE109262. For the sake of this example, we assume that the GSE109262_RAW.tar directory is downloaded to ~/Downloads/.

3.0.2 Preprocessing in the Shiny app

In the screenshot below, the data from GSE10926 data on chromosome 19 is ready for processing. When selecting “Browse…”, be sure to select all relevant files for each methylation type.