Skip to content

Commit

Permalink
Modify save_monocle_objects to complete despite missing BPCells direc…
Browse files Browse the repository at this point in the history
…tory.
  • Loading branch information
brgew committed Sep 6, 2023
1 parent 5bad7b8 commit f9149c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: monocle3
Title: Clustering, Differential Expression, and Trajectory Analysis for
Single-Cell RNA-Seq
Version: 1.4.2
Version: 1.4.3
Authors@R: c(
person(given = "Hannah",
family = "Pliner",
Expand Down
14 changes: 13 additions & 1 deletion R/io.R
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,19 @@ save_monocle_objects <- function(cds, directory_path, hdf5_assays=FALSE, comment
matrix_info <- get_matrix_info(mat=counts(cds))
if(matrix_info[['matrix_class']] == 'BPCells' &&
matrix_info[['matrix_mode']] == 'dir') {
bpcells_matrix_dir_flag <- TRUE
#
# Check that BPCells matrix directory exists.
# We use the bpcells_matrix_dir_flag to save the
# directory (later) and so we don't try to save
# the BPCells matrix files if the directory
# doesn't exist.
#
if(dir.exists(matrix_info[['matrix_path']])) {
bpcells_matrix_dir_flag <- TRUE
}
else {
message('save_monocle_objects: warning: the CDS has a BPCells count matrix but\nbut the BPCells count matrix directory is missing, which will likely\ncause problems in the future.\nI\'m continuing without it.')
}
}

# Path of cds object file.
Expand Down

0 comments on commit f9149c7

Please sign in to comment.