
MethScope-MRMP
MethScope-MRMP.RmdGenerate an MRMP reference
MethScope includes pre-defined MRMP references, and you can also build your own from a methylation atlas.
Prerequisites
- Install YAME for
.cgprocessing: https://zhou-lab.github.io/YAME/ - Prepare a reference methylation
.cgfile (for example, an atlas or merged reference panel) - Install and load
MethScope
library(MethScope)Step 1: Binarize the reference .cg file
Convert methylation proportions into binary strings. The default
threshold is 0.5; adjust with -b if needed.
Step 2: Build MRMP pattern definitions
Use GenerateReference() to identify recurrent
patterns.min_CG controls the minimum CpGs per MRMP (default:
50).
GenerateReference(binary_file = "example_binstring", min_CG = 50)This step generates a patterns.txt file.
Step 3: Pack patterns into a .cm reference
Pack patterns.txt into a .cm file that can
be passed as reference_pattern in
GenerateInput().
Build MRMP references from cell-type pseudobulks
If cell-type labels are available, pseudobulked profiles can produce robust cell-type-informed MRMP references.
Step 1: Create pseudobulk profiles per cell type
Prepare a text file (samples.txt) containing sample IDs
for one cell type, then aggregate with musum.
Step 2: Repeat per cell type and build MRMPs
Run the same workflow above
(binstring -> GenerateReference -> yame pack) on each
pseudobulk or combined pseudobulk panel.
For running a full parallelized multi-cell-type script, please refer to: https://github.com/zhou-lab/MethScope/blob/main/analysis/GenerateReference.sh
After generating patterns.cm, use it as the custom MRMP
reference in downstream MethScope analyses.