isave.RDS: isave.RDS

View source: R/Seurat.Utils.R

isave.RDSR Documentation

isave.RDS

Description

Save an RDS object, using a faster and efficient compression method that runs in the background.

Usage

isave.RDS(
  obj,
  prefix = NULL,
  suffix = NULL,
  inOutDir = TRUE,
  project = getProject(),
  alternative_path_rdata = paste0("~/Dropbox (VBC)/Abel.IMBA/AnalysisD/_RDS.files/",
    basename(OutDir)),
  homepath = if (Sys.info()[1] == "Darwin") "~/" else "/users/abel.vertesy/",
  showMemObject = TRUE,
  saveParams = TRUE,
  compress = TRUE,
  test_read = FALSE
)

Arguments

obj

The object to be saved, typically a Seurat object.

prefix

A string prefix added to the filename. Default: NULL.

suffix

A string suffix added to the filename. Default: NULL.

inOutDir

A boolean flag, if TRUE the OutDir is used as save directory, if FALSE the alternative_path_rdata is used. Default: TRUE.

project

A string representing the project code. This is appended to the saved file name. Default: the active project determined by getProject().

alternative_path_rdata

A string that specifies the alternative path for storing the RDS file if inOutDir is FALSE. Default: "~/Dropbox (VBC)/Abel.IMBA/AnalysisD/_RDS.files/" appended with the basename of OutDir.

homepath

A string representing the homepath. Will be replaced by '~' in the file path. Default: '~/'.

showMemObject

A boolean flag, if TRUE the function will print out the memory size of the largest objects in the workspace. Default: TRUE.

saveParams

A boolean flag, if TRUE the parameters 'p' and 'all.genes' are added to the 'misc' slot of the Seurat object if the object is of class Seurat. Default: TRUE.

compress

Compress .Rds file after writing? Default: TRUE.

test_read

Provide command to test validity by reading in the object just written.

Examples

## Not run: 
if (interactive()) {
  isave.RDS(my.R.object)
}

## End(Not run)

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.