DeepRM
Deep learning for RNA Modification
✨ Introduction
DeepRM is a deep learning-based framework for RNA modification detection using Nanopore direct RNA sequencing. This repository contains the source code for training and running DeepRM.
🆕 What's new in v1.2
DeepRM v1.2 uses substantially less memory, runs faster and detects RNA modifications more accurately.
1. Substantially lower memory usage and higher speed
- The preprocessing uses 8 to 13 times less peak memory than DeepRM v1.1's.
- With input on a local SSD, the preprocessing runs 2 to 2.5 times as fast as DeepRM v1.1's. Run on Dorado's output while Dorado basecalls, it finishes when basecalling does, so it adds no time to the run.
- Inference is 1.9 to 3.0 times as fast as DeepRM v1.1 on A100, H100 and B200 GPUs.
- v1.2.1: with default settings, pileup uses 35 to 52 times less peak memory and runs 16 to 30 times as fast as v1.2's (input on a local SSD).
2. Improved RNA modification detection accuracy
- Higher m6A recall, most of all for clustered m6A (the nearest other m6A 1–4 nt away): 95.7 %, against 85.8 % with DeepRM v1.1 and 78.9 % with Dorado (v6.0.0 SUP), at the same false positive rate.
- Oxford Nanopore Technologies' all-5-mer synthetic RNA dataset: AU-PR 0.933, against 0.883 with DeepRM v1.1 and 0.923 with Dorado.
- HEK293T benchmark of the DeepRM paper: AU-PR 0.964 at DRACH and 0.716 at non-DRACH sites, against 0.961 and 0.704 with DeepRM v1.1, and 0.959 and 0.161 with Dorado.
Benchmark details and the full list of changes: 📜 Changelog.
⚡ Quick installation
In a new Python environment (Python 3.10 or newer) on Linux x86_64:
pip install deeprm
deeprm check
deeprm checkreports any problem it finds, with the command that fixes it.- With uv 0.12 or newer:
uv pip install deeprm. An older uv installs DeepRM v1.1.3 instead. Update uv, or name FlashAttention-4 in the command:uv pip install deeprm "flash-attn-4[cu13]==4.0.0b35". - Other setups: see Installation.
Table of Contents
- ✨ Introduction
- 🆕 What's new in v1.2
- ⚡ Quick installation
- 🎯 Key Features
- 📦 Installation
- 🚀 Quickstart
- 💻 Usage
- 🔧 Troubleshooting
- 📝 Citation
- 📝 License
- 🏛 Contributors
- 🏛 Acknowledgements
📚 Full documentation: https://deeprm.readthedocs.io/
🎯 Key Features
- High accuracy: Achieves state-of-the-art accuracy in RNA modification detection and stoichiometry measurement.
- Single-molecule resolution: Provides single-molecule level predictions for RNA modifications.
- End-to-end pipeline: Easy-to-use pipeline from raw reads to molecule-level and site-level predictions.
- Fast: Compiled inference, and fast C++ preprocessing and pileup.
- Customizable: Supports training of custom models.
📦 Installation
Prerequisites
- Linux x86_64 with glibc 2.28 or newer (Ubuntu 20.04, Debian 10, RHEL, Rocky or Alma 8, or newer)
- Python 3.10+
- An NVIDIA GPU: recommended for inference (which also runs on the CPU, more slowly), required for training.
- Optional: Dorado 2.0.0 (basecalling) and SAMtools 1.16.1+ (BAM files).
Installation options
- Estimated time: ~10 minutes. Use a new environment: DeepRM installs PyTorch 2.10.0 and replaces any other version.
-
With pip: see Quick installation.
-
With uv, using uv's own Python (it has the C headers needed to compile the model):
uv venv --python 3.12 --python-preference only-managed deeprm-env && source deeprm-env/bin/activate
uv pip install deeprm
- This needs uv 0.12 or newer (
uv --version; for an older uv see Quick installation). If deeprm-env already holds an older DeepRM, add-U(upgrade).
- From source:
git clone https://github.com/vadanamu/deeprm
cd deeprm
pip install -e .
- For training:
pip install "deeprm[train]". - Older GPUs, CPU-only and other setups: Advanced installation.
Verify Installation
deeprm --version
deeprm check
- With no problem found,
deeprm checkprints "Environment checks passed successfully."
🚀 Quickstart
- Example POD5 and BAM files are in the repository's
examplefolder (pip does not install them). Run the commands below from the repository folder.
RNA Modification Detection
- Estimated time: about 3 minutes on one B200 GPU.
1️⃣ Prepare data
deeprm call prep -p example/call-example/call_example_pod5 -b example/call-example/call_example.bam -o <prep_dir>
- (Alternative) Basecall your own POD5 files and prepare them in one pass:
dorado basecaller --reference <ref_fasta> --chunksize 12000 --min-qscore 0 --emit-moves --estimate-poly-a rna004_sup@v6.0.0 <pod5_dir> \ | tee >(samtools sort -@ <threads> -O BAM -o <bam_path> - && samtools index -@ <threads> <bam_path>) \ | deeprm call prep -p <pod5_dir> -b - -o <prep_dir>
- Keep
rna004_sup@v6.0.0and--chunksize 12000: the model expects reads basecalled this way.
- Keep
2️⃣ Run inference
deeprm call run -b example/call-example/call_example.bam -i <prep_dir> -o <pred_dir>
- Results:
<pred_dir>/<prep_dir name>/(see Output files).
Model Training
- Estimated time: ~1 hour
1️⃣ Prepare unmodified & modified training data
deeprm train prep -p example/train-example/A/train_example_A_pod5 -b example/train-example/A/train_example_A.bam -o <prep_dir>/a
deeprm train prep -p example/train-example/m6A/train_example_m6A_pod5 -b example/train-example/m6A/train_example_m6A.bam -o <prep_dir>/m6a
2️⃣ Compile training data
deeprm train compile -n <prep_dir>/a/data -p <prep_dir>/m6a/data -o <prep_dir>/compiled -c 1000
-c 1000suits this small example (default: 4000).
3️⃣ Run training
deeprm train run --data <prep_dir>/compiled --output <output_dir> --batch 64
- The output is a model file (.pt).
- This trains the v1.2 architecture (deeprm_v12) from scratch. The training data and methods of the released weights are reserved for a future publication.
💻 Usage
Inference usage
- Prepare data with
deeprm call prepas in the Quickstart. For reads aligned to a genome, add-g 260. Other ways: Usage. - Run inference with the bundled v1.2 model:
deeprm call run --input <prep_dir> --bam <bam_path> --output <prediction_dir> --gpu-pool <gpu_pool>
--annot <annotation_file>(RefFlat, GenePred or RefGene) also writes genomic coordinates, for reads aligned to transcripts.--model <model_file>runs a model made withdeeprm train run. DeepRM v1.1 model files need DeepRM v1.1 (pip install deeprm==1.1.3).
Output files
Under <prediction_dir>/<prep_dir name>/:
site-level/pileup.bed: one row per site (bedMethyl). Column 5 is the modscore × 1000; column 11 is the stoichiometry (%), 0 where it is not reported (unless--report-all-stoichiometry).site-level/modbam_<input BAM name>: per-read calls in MM/ML tags (SAMtags).molecule-level/inference_*.npz: per-read predictions.- All output files: Usage.
Training usage
- Three steps (
prep,compile,run), as in the Quickstart. Options: Usage.
🔧 Troubleshooting
- GPU not used, or "no kernel image is available": run
deeprm checkand run the command it prints. - "Falling back to Python preprocessing" in the log: Troubleshooting.
- Out of GPU memory: lower
-sfordeeprm call run(default: 16000) or--batchfordeeprm train run(default: 1024). - Other problems: Troubleshooting.
📝 Citation
If you use DeepRM in your research, please cite the following paper:
@article{kang2026deeprm,
title={Comprehensive discovery of m6A sites in the human transcriptome at single-molecule resolution},
author={Kang, Gihyeon and Hwang, Hyeonseo and Jeon, Hyeonseong and Choi, Heejin and Chang, Hee Ryung and Yeo, Nagyeong and Park, Junehee and Son, Narae and Jeon, Eunkyeong and Lim, Jungmin and Yun, Jaeung and Choi, Wook and Jo, Jae-Yoon and Kim, Jong-Seo and Park, Sangho and Kim, Yoon Ki and Baek, Daehyun},
journal={Nature Communications},
volume={17},
pages={664},
year={2026},
publisher={Springer Nature},
doi={10.1038/s41467-025-67417-w}
}
The article is fully open access and available at https://doi.org/10.1038/s41467-025-67417-w.
📝 License
DeepRM is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
by Seoul National University R&DB Foundation and Genome4me Inc.
See the LICENSE file for details.
🏛 Contributors
This repository is developed and maintained by the following organization:
- Laboratory of Computational Biology, School of Biological Sciences, Seoul National University
- Principal Investigator: Prof. Daehyun Baek
- Genome4me, Inc., Seoul, Republic of Korea
🏛 Acknowledgements
This study was supported by the National Research Foundation of Korea (NRF) funded by the Ministry of Science and ICT, Republic of Korea (MSIT) (RS-2019-NR037866, RS-2020-NR049252, RS-2020-NR049538, and RS-2022-NR067483), by a grant of Korean ARPA-H Project through the Korea Health Industry Development Institute (KHIDI), funded by the Ministry of Health & Welfare, Republic of Korea (RS-2025-25422732), by Artificial Intelligence Industrial Convergence Cluster Development Project funded by MSIT and Gwangju Metropolitan City, by National IT Industry Promotion Agency (NIPA) funded by MSIT, and by Korea Research Environment Open Network (KREONET) managed and operated by Korea Institute of Science and Technology Information (KISTI).
Metadata
Release files for deeprm 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deeprm-1.2.1.tar.gz | 67.9 MB | With provenance | Details for deeprm-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deeprm-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for deeprm-1.2.1-py3-none-any.whl |
Total release size: 134.1 MB
Release files / deeprm-1.2.1.tar.gz
| Download URL | deeprm-1.2.1.tar.gz |
|---|---|
| Size | 67.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89b13791d783fe2560c80d69057829d32274441cb4fcccdd4ee36d8eea1ab894
|
|
BLAKE2b-256 checksum How to use checksums |
a9cb214f936d10b591732b87805f682bf4bd4ef7939ab6c51b76f00cf0ed5640
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / deeprm-1.2.1-py3-none-any.whl
| Download URL | deeprm-1.2.1-py3-none-any.whl |
|---|---|
| Size | 66.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41976f595973a818fc08a2d736577f5c29d37d3675b486e829218731c6a3e74c
|
|
BLAKE2b-256 checksum How to use checksums |
80dd473fe2032175b67d0fa715b8eb7ed4bd0ca0b45075f93fa297a6d7cd2657
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for deeprm 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for deeprm-1.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.