Skip to content

R package for transfer learning of single-cell RNA-seq denoising

Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



38 Commits

Repository files navigation


R package for transfer learning of scRNA-seq denoising. Take a look at our free SAVER-X web-server for the transfer learning online computation! We also encourage you to read our pre-print manucript for more information. You can also refer to our earlier denoising method SAVER.


06/13/2022: update sctransfer Python package for version control of dependent packages tensorflow and keras. Fix bugs in using the newest version of scanpy.

11/12/2019: fix the bug in SAVER-X by requiring the reticulate package to be updated to version 1.13

8/14/2019: SAVER-X now accepts either a data file or a matrix object in R as input, and creates a new folder under current working directory to store intemediate and final results. It returns the file name storing the denoised results.


First, install the supporting Python package sctransfer. See the source code of the package here

pip install sctransfer

Next, open R and install the R package SAVERX


Basic Usage

Our current pre-trained models can be downloaded here

Our input can be either a data file or a dense/sparse matrix. The data file can be '.txt', '.csv' or '.rds' file. The '.rds' file can store either a matrix or a sparse matrix of class 'dgCMatrix'. As a toy example, you may download one of our demo datasets on the web server, shekhar_downsampled.csv, the down-sampled mouse retina data from here. SAVER-X will generate a new folder based on the current time to store intemediate files and final results and return the file name storing the denoised matrix.

SAVER-X without pretraining

file <- saverx("./testdata/shekhar_downsampled.csv") <- readRDS(file)

SAVER-X with a pretrained model

For the demo dataset, we have a pre-trained model for the mouse retina, please download the file, mouse_Retina.hdf5, and you may save it in './mouse_retina.hdf5'

file <- saverx("./testdata/shekhar_downsampled.csv", data.species = "Mouse", 
use.pretrain = T, pretrained.weights.file = "./mouse_retina.hdf5", model.species = "Mouse") <- readRDS(file)

For both cases, object '' is your final denoised matrix. When dealing with large datasets, you can set ' = T' to reduce RAM. Set 'clearup.python.session = F' if you plan to run SAVER-X more than once in your R session.

Note: We use R package reticulate to run Python code in R. You may find solutions in this reference if you face any issues in Python version configuration in reticulate.


R package for transfer learning of single-cell RNA-seq denoising






No releases published