Skip to contents

Overview

Pretrained MethScope models for the current command-line workflow are documented on the methscope-cli website and are fetched with yame fetch -c. They are distributed as self-contained bundles: a single file carries the model, MRMP feature definition, and any labels or runtime metadata needed for prediction, so a query .cg can be run without supplying a separate .cm reference.

There are three bundle kinds:

file task run with
.clfx cell-type / trait classifier methscope classify
.msdref deconvolution reference methscope deconv
.updecx CpG-level upscaling decoder methscope upscale

Using a pretrained bundle

Because a bundle carries its own MRMP, pass it directly — no unbundling needed:

yame fetch -c hg38/models/hg38_celltype.clfx
yame fetch -c hg38/models/hg38_62celltypes.msdref
yame fetch -c hg38/models/hg38_10k1.updecx

methscope classify hg38_celltype.clfx query.cg > labels.tsv
methscope deconv hg38_62celltypes.msdref mixture.cg > props.tsv
methscope upscale -o out.cg hg38_10k1.updecx query.cg

Inspect a bundle — its framework mark, on-disk layout, and model summary — without running it:

methscope inspect hg38_celltype.clfx

Bundling and unbundling

Wrap a model together with the MRMP it needs. Current classifier bundles use the .clfx suffix, deconvolution references use .msdref, and upscaling decoders use .updecx:

# classifier: inner model + MRMP (+ class labels, + framework mark)
methscope bundle -m ref.mrmp -k xgboost -l labels.tsv -o model.clfx booster.ubj

# unwrap a bundle back into its parts (names derived from the bundle path)
methscope unbundle model.clfx

Bundle format (technical)

A bundle (magic MSBNDL1) keeps the MRMP feature definition together with the runtime model. After the MRMP come the container sections:

  • mrmp — the MRMP feature definition (a fmt2 YAME .cm).
  • kind — the framework mark: xgboost / threshold / logistic for a classifier, or the matching mark for another bundle type.
  • outcpg (upscale only) — a genome-wide mask of the imputed CpG locations, letting upscale emit a whole-genome .cg.
  • model — the raw inner model bytes: an XGBoost UBJ booster, a methscope-linear text spec, an upscaling decoder, or a deconvolution signature/reference payload.

Because the model and its MRMP travel together, predictions are reproducible and you never have to hand-match a loose .mrmp to the right model.

Models in R

The MethScope R package ships built-in models — e.g. Zhou2025_HumanAtlas_P1000() and Liu2021_MouseBrain_P1000() — carrying their MRMP metadata, used the same way through PredictCellType(). See the Get started tutorial and the methscope-cli command-line guide.