saverx: the SAVERX function

View source: R/saverx.R

saverxR Documentation

the SAVERX function

Description

Output and intemediate files are stored at the same directory as the input data file text.file.name. To avoid potential file name conflicts, please make the folder only contain text.file.name. DO NOT run two SAVER-X tasks for the data file in the same folder.

Usage

saverx(input.file.name = NULL, data.matrix = NULL,
  data.species = c("Human", "Mouse", "Others"), use.pretrain = F,
  pretrained.weights.file = "", model.species = c("Human", "Mouse",
  "Joint"), model.nodes.ID = NULL, is.large.data = F, ncores = 1,
  verbose = F, batch_size = NULL, clearup.python.session = T, ...)

Arguments

input.file.name

Can be either .txt, .csv or .rds files that store the data matrix gene by cell, or can be NULL is data.matrix is provided. The rds file can either store the data as a regular matrix or a sparse matrix

data.matrix

a matrix of UMI counts. Should be NULL if input.file.name is provided. The matrix is gene by cell with gene and cell names. Can be either a regular or sparse matrix.

data.species

The species of the dataset

use.pretrain

Use a pretrained model or not

pretrained.weights.file

If a pretrained model is used, provide the file storing the autoencoder model weights. It should have an extension of ".hdf5" and is the saved weights from the Python package sctransfer

model.species

The species of the pretrained model

model.nodes.ID

The vector of node IDs of the pretrained model (only needed for the species of the data when the pre-trained model is joint). Set to NULL if running SAVER-X without pretraining.

is.large.data

If the data is very large, it may take too much RAM and setting this parameter to True can reduce RAM by writing intermediate Python ouput files to disk instead of directly passing it to R. However, setting this to True can increase the computation time

ncores

number of cores that can be used for the SAVER shrinkage

verbose

Whether to show more autoencoder optimization progress or not

batch_size

batch size of the autoencoder. Default is NULL, where the batch size is automatically determined by max(number of cells / 50, 32)

clearup.python.session

Whether to clear up everything in the Python session after computation or not. This clears up everything in Python, so you need to start a new R session to run saverx function again.

...

more arguments passed to autoFilterCV

Value

name of the final denoised RDS data file


jingshuw/SAVERX documentation built on June 20, 2022, 3:17 a.m.