diff --git a/DESCRIPTION b/DESCRIPTION index c51a0ba..de71f0e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: monocle3 Title: Clustering, Differential Expression, and Trajectory Analysis for Single-Cell RNA-Seq -Version: 1.4.9 +Version: 1.4.10 Authors@R: c( person(given = "Hannah", family = "Pliner", diff --git a/R/io.R b/R/io.R index 3825f8d..04a6c97 100644 --- a/R/io.R +++ b/R/io.R @@ -1198,6 +1198,10 @@ save_transform_models <- function( cds, directory_path, comment="", verbose=TRUE assertthat::assert_that(archive_control[['archive_compression']] %in% c('gzip', 'bzip2', 'xz', 'none'), msg=paste0("archive_compression must be \'none\', \'gzip\', \'bzip2\', or \'xz\'.")) + # Make a 'normalized' path string. The annoy index save function does not + # recognize tildes. + directory_path <- normalizePath(directory_path, mustWork=FALSE) + # file information is written to an RDS file # in directory_path # cds_object: reduce_dim_aux @@ -1434,6 +1438,11 @@ copy_reduce_dim_aux <- function(cds_dst, cds_src) { # is not run. load_transform_models <- function(cds, directory_path) { appendLF <- TRUE + + # Make a 'normalized' path string. The annoy index save function does not + # recognize tildes. + directory_path <- normalizePath(directory_path, mustWork=FALSE) + # Check for directory. if(!file.exists(directory_path)) stop('Directory \'', directory_path, '\' does not exist.') @@ -1743,6 +1752,10 @@ save_monocle_objects <- function(cds, directory_path, hdf5_assays=FALSE, comment assertthat::assert_that(archive_control[['archive_compression']] %in% c('gzip', 'bzip2', 'xz', 'none'), msg=paste0("archive_compression must be \'none\', \'gzip\', \'bzip2\', or \'xz\'.")) + # Make a 'normalized' path string. The annoy index save function does not + # recognize tildes. + directory_path <- normalizePath(directory_path, mustWork=FALSE) + # file information is written to an RDS file # in directory_path # cds_object: cds | reduce_dim_aux @@ -2059,6 +2072,11 @@ save_monocle_objects <- function(cds, directory_path, hdf5_assays=FALSE, comment # is not run. load_monocle_objects <- function(directory_path, matrix_control=list(matrix_path='.')) { appendLF <- FALSE + + # Make a 'normalized' path string. The annoy index save function does not + # recognize tildes. + directory_path <- normalizePath(directory_path, mustWork=FALSE) + # Check for directory. if(!file.exists(directory_path)) stop('Directory or file \'', directory_path, '\' does not exist.')