zhouwanding commited on
Commit
368caf9
·
verified ·
1 Parent(s): c9f3133

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +40 -29
README.md CHANGED
@@ -5,42 +5,53 @@ tags:
5
  - dna-methylation
6
  - methylation
7
  - wgbs
8
- - imputation
9
  - single-cell
 
 
 
10
  ---
11
 
12
- # MethScope — whole-genome methylation upscaler (`hg38_wg.updecx`)
13
 
14
- Pretrained **whole-genome CpG upscaler** for
15
- [methscope-cli](https://github.com/zhou-lab/methscope-cli). A single
16
- self-contained bundle (`.updecx`) — the `UPDEC2` decoder plus its 1000-pattern
17
- MRMP feature definition — that reconstructs dense CpG methylation from a sparse
18
- query methylome.
19
 
20
- ## Usage
21
 
22
  ```sh
23
- # fetch the model
24
- hf download zhou-lab/methscope hg38_wg.updecx --local-dir .
25
 
26
- # impute genome-wide CpG methylation from a sparse .cg
27
- methscope upscale -o imputed.cg hg38_wg.updecx sparse.cg
 
 
28
  ```
29
 
30
- Inference is pure C — no CUDA or BLAS at run time (~2 s / sample, ~3 GB RAM).
31
-
32
- ## Model
33
-
34
- | | |
35
- |---|---|
36
- | genome | hg38 (29,401,795 CpGs) |
37
- | input | 1000 MRMP features (beta + missing indicator) |
38
- | architecture | `UPDEC2` — one processing unit per MRMP membership, N16 leaky low-rank factor, uniform rank |
39
- | training | Loyfer sorted-cell WGBS (207 cells), fixed-29k simulated sparse queries |
40
- | external validation | 2018_Zhou cohort, genome-uniform MAE **0.1076** (beats the per-block baseline; see the lab journal) |
41
- | size | 2.8 GB |
42
-
43
- Trained with `methscope upscale-train` (CUDA). See the
44
- [methscope-cli documentation](https://zhou-lab.github.io/methscope-cli/) and the
45
- [model catalog](https://github.com/zhou-lab/methscope_data) for the classifier
46
- and deconvolution bundles.
 
 
 
 
 
 
 
 
5
  - dna-methylation
6
  - methylation
7
  - wgbs
 
8
  - single-cell
9
+ - imputation
10
+ - deconvolution
11
+ - cell-type-annotation
12
  ---
13
 
14
+ # MethScope — pretrained models
15
 
16
+ Pretrained models for [**methscope-cli**](https://github.com/zhou-lab/methscope-cli):
17
+ ultra-fast analysis of sparse DNA methylomes via MRMP (Most Recurrent Methylation
18
+ Pattern) encoding. Each model is a **single self-contained bundle** that already
19
+ carries its MRMP feature definition (and labels / signature), so a query `.cg`
20
+ runs directly — no separate annotation files.
21
 
22
+ ## Fetch & run
23
 
24
  ```sh
25
+ # fetch one model (or --local-dir models to grab all)
26
+ hf download zhou-lab/methscope hg38_celltype.ubjx --local-dir .
27
 
28
+ methscope predict query.cg hg38_celltype.ubjx # cell type / label
29
+ methscope deconv mixture.cg hg38_65celltypes.refx # cell-type proportions (NNLS)
30
+ methscope upscale -o out.cg hg38_wg.updecx query.cg # genome-wide CpG upscaling
31
+ methscope inspect hg38_sex.ubjx # framework, labels, features
32
  ```
33
 
34
+ Small query `.cg` test fixtures (typed cells, a deconvolution mixture, an
35
+ upscale input + truth) live in the GitHub repo
36
+ [`zhou-lab/methscope_data`](https://github.com/zhou-lab/methscope_data) under
37
+ `test/`, alongside this catalog and the MRMP-construction reproducibility archive.
38
+
39
+ ## Models
40
+
41
+ | file | task | framework | labels / notes |
42
+ |------|------|-----------|----------------|
43
+ | `hg38_wg.updecx` | whole-genome CpG upscaling | `UPDEC2` | all 29,401,795 hg38 CpGs; the primary upscaler (2.8 GB) |
44
+ | `hg38_10k1.updecx` | CpG upscaling (single block) | MLP decoder | block 10k1 (10,000 CpGs); small demo model |
45
+ | `hg38_celltype.ubjx` | cell-type annotation | xgboost | 62 human cell types |
46
+ | `mm10_celltype.ubjx` | cell-type annotation | xgboost | 41 mouse-brain cell types |
47
+ | `hg38_sex.ubjx` | sex prediction | logistic | Female, Male (XCI `Xa_hi`/`Xa_lo` markers) |
48
+ | `hg38_65celltypes.refx` | cell-type deconvolution (NNLS) | refx | 65 types = 58 Zhou + 7 Loyfer organ/blood; split MRMP, 15,300 patterns |
49
+
50
+ `methscope inspect <model>` prints the exact framework, full label list, and (for
51
+ linear models) per-feature weights. Classifiers carry a required framework `kind`
52
+ mark (`xgboost` / `threshold` / `logistic`); `predict` rejects an unmarked
53
+ bundle. Upscale decoders (`.updecx`) run via `upscale`, deconvolution references
54
+ (`.refx`, `kind=refx`) via `deconv`.
55
+
56
+ See the [methscope-cli documentation](https://zhou-lab.github.io/methscope-cli/)
57
+ for the full command reference and runnable examples.