xsave | R Documentation |
This function saves an R object to a file in a quick and efficient format using the 'qs' package. It constructs the file name based on various inputs and stores additional metadata if the object is a Seurat object. The saving path can be adjusted by the presence of 'OutDir' in the global environment or defaults to the working directory.
xsave(
obj,
suffix = NULL,
prefix = NULL,
nthreads = if (object.size(obj) < 1e+07) 1 else .getNrCores(12),
preset = "high",
project = getProject(),
dir = if (exists("OutDir")) OutDir else getwd(),
showMemObject = TRUE,
saveParams = if (exists("p")) TRUE else FALSE,
paramList = if (exists("p")) p else NULL,
allGenes = if (exists("all.genes")) all.genes else NULL,
saveLocation = TRUE,
backgroundJob = FALSE,
v = TRUE
)
obj |
The R object to be saved. |
suffix |
Optional; a suffix to add to the filename. |
prefix |
Optional; a prefix to add to the filename. |
nthreads |
Number of threads to use when saving, defaults to 12. |
preset |
Compression preset, defaults to 'high'. |
project |
The project name to be included in the filename, defaults to the result of |
dir |
Output Directory |
showMemObject |
Logical; if TRUE, displays the memory size of the largest objects. |
saveParams |
Logical; if TRUE and if the object is a Seurat object, additional parameters are saved within it. |
paramList |
Optional; a list of parameters to save within the Seurat object. |
allGenes |
Optional; a list of all genes to save within the Seurat object. |
saveLocation |
Logical; if TRUE and if the object is a Seurat object, file location is saved into misc slot. |
backgroundJob |
NOT IMPLEMENTED. Logical; if TRUE, the compression is done in the background. |
v |
Verbose output. |
Invisible; The function is called for its side effects (saving a file) and does not return anything.
The function uses the 'qs' package for quick and efficient serialization of objects and includes a timing feature from the 'tictoc' package.
qsave
for the underlying save function used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.