diff --git a/DESCRIPTION b/DESCRIPTION index d2d40a65..0fecef43 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: SeuratObject Type: Package Title: Data Structures for Single Cell Data -Version: 5.0.0 +Version: 5.0.1 Authors@R: c( person(given = 'Rahul', family = 'Satija', email = 'rsatija@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0001-9448-8833')), person(given = 'Paul', family = 'Hoffman', email = 'seurat@nygenome.org', role = c('aut', 'cre'), comment = c(ORCID = '0000-0002-7693-8957')), @@ -46,7 +46,7 @@ Imports: future.apply, grDevices, grid, - Matrix (>= 1.6.1), + Matrix (>= 1.6.3), methods, progressr, Rcpp (>= 1.0.5), diff --git a/NAMESPACE b/NAMESPACE index 74b49243..273adf81 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -531,7 +531,12 @@ exportMethods(show) importClassesFrom(Matrix,CsparseMatrix) importClassesFrom(Matrix,Matrix) importClassesFrom(Matrix,RsparseMatrix) +importClassesFrom(Matrix,compMatrix) +importClassesFrom(Matrix,dMatrix) importClassesFrom(Matrix,dgCMatrix) +importClassesFrom(Matrix,dsparseMatrix) +importClassesFrom(Matrix,generalMatrix) +importClassesFrom(Matrix,sparseMatrix) importClassesFrom(sp,CRS) importClassesFrom(sp,Spatial) importClassesFrom(sp,SpatialPoints) diff --git a/NEWS.md b/NEWS.md index 64e728bf..3e7ada61 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +# SeuratObject 5.0.1 + +## Changes: +- Update internal calls to `GetAssayData()` to use `layer` instead of `slot` (#160) +- Update Matrix version to 1.6-2 (#164) +- Change layer-saving in `SaveSeuratRds()` to move all layers instead of just those in `tempdir()` (#169) +- Update internal calls to `SetAssayData()` to use `layer` instead of `slot` (#171) +- Replace internal calls of `FilterObjects()` to `.FilterObjects()` (#171) + # SeuratObject 5.0.0 ## Added - New `Assay5` class with support for layers; layers provide support for: diff --git a/R/assay.R b/R/assay.R index 4152a052..c96de65f 100644 --- a/R/assay.R +++ b/R/assay.R @@ -319,7 +319,7 @@ Features.Assay <- function( } layer <- layer[1L] %||% 'data' layer <- match.arg(arg = layer) - features <- rownames(x = GetAssayData(object = x, slot = layer)) + features <- rownames(x = GetAssayData(object = x, layer = layer)) if (!length(x = features)) { features <- NULL } @@ -370,7 +370,7 @@ FetchData.Assay <- function( x = vars ) # Pull expression information - mat <- GetAssayData(object = object, slot = layer) + mat <- GetAssayData(object = object, layer = layer) if (IsMatrixEmpty(x = mat)) { abort(message = paste("Layer", sQuote(x = layer), "is empty in this assay")) } @@ -736,7 +736,7 @@ RenameCells.Assay <- function(object, new.names = NULL, ...) { CheckDots(...) names(new.names) <- NULL for (data.slot in c("counts", "data", "scale.data")) { - old.data <- GetAssayData(object = object, slot = data.slot) + old.data <- GetAssayData(object = object, layer = data.slot) if (ncol(x = old.data) <= 1) { next } @@ -1370,7 +1370,7 @@ merge.Assay <- function( } combined.assay <- SetAssayData( object = combined.assay, - slot = "data", + layer = "data", new.data = merged.data ) } @@ -1465,17 +1465,17 @@ subset.Assay <- function(x, cells = NULL, features = NULL, ...) { if (length(x = features) == 0) { abort(message = "Cannot find features provided") } - if (ncol(x = GetAssayData(object = x, slot = 'counts')) == ncol(x = x)) { - slot(object = x, name = "counts") <- GetAssayData(object = x, slot = "counts")[features, cells, drop = FALSE] + if (ncol(x = GetAssayData(object = x, layer = 'counts')) == ncol(x = x)) { + slot(object = x, name = "counts") <- GetAssayData(object = x, layer = "counts")[features, cells, drop = FALSE] } - slot(object = x, name = "data") <- GetAssayData(object = x, slot = "data")[features, cells, drop = FALSE] - cells.scaled <- colnames(x = GetAssayData(object = x, slot = "scale.data")) + slot(object = x, name = "data") <- GetAssayData(object = x, layer = "data")[features, cells, drop = FALSE] + cells.scaled <- colnames(x = GetAssayData(object = x, layer = "scale.data")) cells.scaled <- cells.scaled[cells.scaled %in% cells] cells.scaled <- cells.scaled[na.omit(object = match(x = colnames(x = x), table = cells.scaled))] - features.scaled <- rownames(x = GetAssayData(object = x, slot = 'scale.data')) + features.scaled <- rownames(x = GetAssayData(object = x, layer = 'scale.data')) features.scaled <- intersect(x = features, y = features.scaled) slot(object = x, name = "scale.data") <- if (length(x = cells.scaled) > 0 && length(x = features.scaled) > 0) { - GetAssayData(object = x, slot = "scale.data")[features.scaled, cells.scaled, drop = FALSE] + GetAssayData(object = x, layer = "scale.data")[features.scaled, cells.scaled, drop = FALSE] } else { new(Class = 'matrix') } @@ -1625,7 +1625,7 @@ setMethod( signature = c(x = 'Assay'), definition = function(x, na.rm = FALSE, dims = 1, ..., slot = 'data') { return(Matrix::colMeans( - x = GetAssayData(object = x, slot = slot), + x = GetAssayData(object = x, layer = slot), na.rm = na.rm, dims = dims, ... @@ -1649,7 +1649,7 @@ setMethod( signature = c(x = 'Assay'), definition = function(x, na.rm = FALSE, dims = 1, ..., slot = 'data') { return(Matrix::colSums( - x = GetAssayData(object = x, slot = slot), + x = GetAssayData(object = x, layer = slot), na.rm = na.rm, dims = dims, ... @@ -1673,7 +1673,7 @@ setMethod( signature = c(x = 'Assay'), definition = function(x, na.rm = FALSE, dims = 1, ..., slot = 'data') { return(Matrix::rowMeans( - x = GetAssayData(object = x, slot = slot), + x = GetAssayData(object = x, layer = slot), na.rm = na.rm, dims = dims, ... @@ -1697,7 +1697,7 @@ setMethod( signature = c(x = 'Assay'), definition = function(x, na.rm = FALSE, dims = 1, ..., slot = 'data') { return(Matrix::rowSums( - x = GetAssayData(object = x, slot = slot), + x = GetAssayData(object = x, layer = slot), na.rm = na.rm, dims = dims, ... @@ -1927,11 +1927,11 @@ SubsetVST <- function(sct.info, cells, features) { #' @noRd #' ValidateDataForMerge <- function(assay, slot) { - mat <- GetAssayData(object = assay, slot = slot) + mat <- GetAssayData(object = assay, layer = slot) if (any(dim(x = mat) == c(0, 0))) { slots.to.check <- setdiff(x = c("counts", "data", "scale.data"), y = slot) for (ss in slots.to.check) { - data.dims <- dim(x = GetAssayData(object = assay, slot = ss)) + data.dims <- dim(x = GetAssayData(object = assay, layer = ss)) data.slot <- ss if (!any(data.dims == c(0, 0))) { break @@ -1944,7 +1944,7 @@ ValidateDataForMerge <- function(assay, slot) { data = 0, nrow = data.dims[1], ncol = data.dims[2], - dimnames = dimnames(x = GetAssayData(object = assay, slot = data.slot)) + dimnames = dimnames(x = GetAssayData(object = assay, layer = data.slot)) ) mat <- as.sparse(x = mat) } diff --git a/R/assay5.R b/R/assay5.R index d4270289..3f54cf6b 100644 --- a/R/assay5.R +++ b/R/assay5.R @@ -1518,7 +1518,7 @@ SetAssayData.StdAssay <- function( ) layer <- slot } - LayerData(object = object, layer = slot) <- new.data + LayerData(object = object, layer = layer) <- new.data return(object) } @@ -2733,7 +2733,7 @@ setAs( # browser() # Add the expression matrices for (i in c('counts', 'data', 'scale.data')) { - adata <- GetAssayData(object = from, slot = i) + adata <- GetAssayData(object = from, layer = i) if (IsMatrixEmpty(x = adata)) { next } diff --git a/R/seurat.R b/R/seurat.R index b3e51648..452ca8ff 100644 --- a/R/seurat.R +++ b/R/seurat.R @@ -6,7 +6,6 @@ #' @include graph.R #' @include spatial.R #' @importFrom methods setClass -#' @importClassesFrom Matrix dgCMatrix #' NULL @@ -475,7 +474,6 @@ Neighbors <- function(object, slot = NULL) { #' Reductions(object = pbmc_small) #' Reductions <- function(object, slot = NULL) { - # reductions <- FilterObjects(object = object, classes.keep = 'DimReduc') reductions <- .FilterObjects(object = object, classes.keep = 'DimReduc') if (is.null(x = slot)) { return(reductions) @@ -611,8 +609,8 @@ RenameAssays <- function( #' @param object A \code{\link{Seurat}} object #' @param file Path to save \code{object} to; defaults to #' \code{file.path(getwd(), paste0(Project(object), ".Rds"))} -#' @param destdir Destination directory for on-disk layers saved in -#' \dQuote{\code{\Sexpr[stage=render]{tempdir()}}} +#' @param move Move on-disk layers into \code{dirname(file)} +#' @param destdir \Sexpr[stage=build,results=rd]{lifecycle::badge("deprecated")} #' @param relative Save relative paths instead of absolute ones #' @inheritDotParams base::saveRDS #' @@ -686,12 +684,28 @@ RenameAssays <- function( SaveSeuratRds <- function( object, file = NULL, - destdir = NULL, + move = TRUE, + destdir = deprecated(), relative = FALSE, ... ) { file <- file %||% file.path(getwd(), paste0(Project(object = object), '.Rds')) file <- normalizePath(path = file, winslash = '/', mustWork = FALSE) + if (is_present(arg = destdir)) { + .Deprecate( + when = '5.0.1', + what = 'SaveSeuratRds(destdir = )', + with = 'SaveSeuratRds(move = )', + details = paste( + "Specifying a directory to move on-disk layers stored in", + sQuote(x = normalizePath(path = tempdir(), winslash = '/', mustWork = FALSE)), + "is deprecated; now, specify `move = TRUE` either move all on-disk layers to", + sQuote(x = dirname(path = file)), + "or `move = FALSE` leave them as-is" + ) + ) + move <- is_bare_character(x = destdir, n = 1L) || is.null(x = destdir) + } # Cache v5 assays assays <- .FilterObjects(object = object, classes.keep = 'StdAssay') p <- progressor(along = assays, auto_finish = TRUE) @@ -707,13 +721,9 @@ SaveSeuratRds <- function( ) cache <- vector(mode = 'list', length = length(x = assays)) names(x = cache) <- assays - tdir <- normalizePath(path = tempdir(), winslash = '/') # because macOS is weird - destdir <- destdir %||% dirname(path = file) - if (!is_na(x = destdir) || isTRUE(x = relative)) { - check_installed( - pkg = 'fs', - reason = 'for moving on-disk matrices' - ) + destdir <- dirname(path = file) + if (isTRUE(x = move)) { + check_installed(pkg = 'fs', reason = 'for moving on-disk matrices') } for (assay in assays) { p( @@ -747,27 +757,23 @@ SaveSeuratRds <- function( p(message = "No on-disk layers found", class = 'sticky', amount = 0) next } - if (!is_na(x = destdir)) { + if (isTRUE(x = move)) { for (i in seq_len(length.out = nrow(x = df))) { pth <- df$path[i] - mv <- substr(x = pth, start = 1L, stop = nchar(x = tdir)) == tdir || - isTRUE(x = relative) - if (isTRUE(x = mv)) { - p( - message = paste( - "Moving layer", - sQuote(x = df$layer[i]), - "to", - sQuote(x = destdir) - ), - class = 'sticky', - amount = 0 - ) - df[i, 'path'] <- as.character(x = .FileMove( - path = pth, - new_path = destdir - )) - } + p( + message = paste( + "Moving layer", + sQuote(x = df$layer[i]), + "to", + sQuote(x = destdir) + ), + class = 'sticky', + amount = 0 + ) + df[i, 'path'] <- as.character(x = .FileMove( + path = pth, + new_path = destdir + )) } } if (isTRUE(x = relative)) { @@ -893,7 +899,7 @@ UpdateSeuratObject <- function(object) { object <- UpdateSlots(object = object) # Validate object keys message("Ensuring keys are in the proper structure") - for (ko in FilterObjects(object = object)) { + for (ko in .FilterObjects(object = object)) { key <- Key(object = object[[ko]]) if (!length(x = key) || !nzchar(x = key)) { key <- Key(object = ko, quiet = TRUE) @@ -924,7 +930,7 @@ UpdateSeuratObject <- function(object) { assays <- make.names(names = Assays(object = object)) names(x = assays) <- Assays(object = object) object <- do.call(what = RenameAssays, args = c('object' = object, assays)) - for (obj in FilterObjects(object = object, classes.keep = c('Assay', 'DimReduc', 'Graph'))) { + for (obj in .FilterObjects(object = object, classes.keep = c('Assay', 'DimReduc', 'Graph'))) { suppressWarnings( expr = object[[obj]] <- UpdateSlots(object = object[[obj]]), classes = 'validationWarning' @@ -937,7 +943,7 @@ UpdateSeuratObject <- function(object) { } # Validate object keys message("Ensuring keys are in the proper structure") - for (ko in FilterObjects(object = object)) { + for (ko in .FilterObjects(object = object)) { suppressWarnings( expr = Key(object = object[[ko]]) <- UpdateKey(key = Key(object = object[[ko]])), classes = 'validationWarning' @@ -945,7 +951,7 @@ UpdateSeuratObject <- function(object) { } # Check feature names message("Ensuring feature names don't have underscores or pipes") - for (assay.name in FilterObjects(object = object, classes.keep = 'Assay')) { + for (assay.name in .FilterObjects(object = object, classes.keep = 'Assay')) { assay <- object[[assay.name]] for (slot in c('counts', 'data', 'scale.data')) { if (!IsMatrixEmpty(x = slot(object = assay, name = slot))) { @@ -998,7 +1004,7 @@ UpdateSeuratObject <- function(object) { classes = 'validationWarning' ) } - for (reduc.name in FilterObjects(object = object, classes.keep = 'DimReduc')) { + for (reduc.name in .FilterObjects(object = object, classes.keep = 'DimReduc')) { reduc <- object[[reduc.name]] for (slot in c('feature.loadings', 'feature.loadings.projected')) { if (!IsMatrixEmpty(x = slot(object = reduc, name = slot))) { @@ -1426,7 +1432,7 @@ DefaultAssay.Seurat <- function(object, ...) { #' DefaultFOV.Seurat <- function(object, assay = NULL, ...) { assay <- assay[1L] %||% DefaultAssay(object = object) - fovs <- FilterObjects(object = object, classes.keep = 'FOV') + fovs <- .FilterObjects(object = object, classes.keep = 'FOV') if (is.na(x = assay)) { return(fovs[1L]) } @@ -1456,7 +1462,7 @@ DefaultFOV.Seurat <- function(object, assay = NULL, ...) { #' "DefaultFOV<-.Seurat" <- function(object, assay = NA, ..., value) { assay <- assay[1L] %||% DefaultAssay(object = object) - fovs <- FilterObjects(object = object, classes.keep = 'FOV') + fovs <- .FilterObjects(object = object, classes.keep = 'FOV') value <- match.arg(arg = value, choices = fovs) if (!is.na(x = assay)) { assay <- match.arg(arg = assay, choices = Assays(object = object)) @@ -1871,7 +1877,7 @@ FetchData.Seurat <- function( #' #' @examples #' # Get assay data from the default assay in a Seurat object -#' GetAssayData(object = pbmc_small, slot = "data")[1:5,1:5] +#' GetAssayData(object = pbmc_small, layer = "data")[1:5,1:5] #' GetAssayData.Seurat <- function( object, @@ -1968,7 +1974,7 @@ HVFInfo.Seurat <- function( cmds <- apply( X = expand.grid( c('FindVariableFeatures', 'SCTransform'), - FilterObjects(object = object, classes.keep = c('Assay', 'Assay5')) + .FilterObjects(object = object, classes.keep = c('Assay', 'Assay5')) ), MARGIN = 1, FUN = paste, @@ -2153,9 +2159,11 @@ LayerData.Seurat <- function( ... ) { if (is_present(arg = slot)) { - deprecate_stop(when = "5.0.0", - what = "LayerData(slot = )", - with = "LayerData(layer = )") + deprecate_stop( + when = "5.0.0", + what = "LayerData(slot = )", + with = "LayerData(layer = )" + ) } assay <- assay %||% DefaultAssay(object = object) assay <- arg_match(arg = assay, values = Assays(object = object)) @@ -2357,7 +2365,7 @@ RenameCells.Seurat <- function( Idents(object = object) <- old.ids names(x = new.cell.names) <- old.names # rename in the assay objects - assays <- FilterObjects(object = object, classes.keep = 'Assay') + assays <- .FilterObjects(object = object, classes.keep = 'Assay') for (i in assays) { slot(object = object, name = "assays")[[i]] <- RenameCells( object = object[[i]], @@ -2365,7 +2373,7 @@ RenameCells.Seurat <- function( ) } # rename in the assay5 objects - assays5 <- FilterObjects(object = object, classes.keep = 'Assay5') + assays5 <- .FilterObjects(object = object, classes.keep = 'Assay5') for (i in assays5) { slot(object = object, name = "assays")[[i]] <- RenameCells( object = object[[i]], @@ -2373,7 +2381,7 @@ RenameCells.Seurat <- function( ) } # rename in the DimReduc objects - dimreducs <- FilterObjects(object = object, classes.keep = 'DimReduc') + dimreducs <- .FilterObjects(object = object, classes.keep = 'DimReduc') for (i in dimreducs) { slot(object = object, name = "reductions")[[i]] <- RenameCells( object = object[[i]], @@ -2381,7 +2389,7 @@ RenameCells.Seurat <- function( ) } # rename the graphs - graphs <- FilterObjects(object = object, classes.keep = "Graph") + graphs <- .FilterObjects(object = object, classes.keep = "Graph") for (g in graphs) { graph.g <- object[[g]] rownames(graph.g) <- colnames(graph.g) <- new.cell.names[colnames(x = graph.g)] @@ -2465,13 +2473,20 @@ SetAssayData.Seurat <- function( ... ) { CheckDots(...) + if (is_present(arg = slot)) { + .Deprecate( + when = '5.0.0', + what = 'SetAssayData(slot = )', + with = 'SetAssayData(layer = )' + ) + layer <- slot + } object <- UpdateSlots(object = object) assay <- assay %||% DefaultAssay(object = object) object[[assay]] <- SetAssayData( object = object[[assay]], layer = layer, new.data = new.data, - slot = slot, ... ) return(object) @@ -2755,7 +2770,7 @@ WhichCells.Seurat <- function( cells <- intersect(x = cells, y = cells.idents) } if (!missing(x = expression)) { - objects.use <- FilterObjects( + objects.use <- .FilterObjects( object = object, classes.keep = c('Assay', 'StdAssay', 'DimReduc', 'SpatialImage') ) @@ -2795,7 +2810,7 @@ WhichCells.Seurat <- function( object = object, vars = unique(x = expr.char[vars.use]), cells = cells, - slot = slot + layer = slot ) cells <- rownames(x = data.subset)[eval_tidy(expr = expr, data = data.subset)] } @@ -3734,11 +3749,11 @@ subset.Seurat <- function( f = Negate(f = is.null), x = slot(object = x, name = 'assays') ) - if (length(x = FilterObjects(object = x, classes.keep = c('Assay', 'StdAssay'))) == 0 || is.null(x = x[[DefaultAssay(object = x)]])) { + if (length(x = .FilterObjects(object = x, classes.keep = c('Assay', 'StdAssay'))) == 0 || is.null(x = x[[DefaultAssay(object = x)]])) { abort(message = "Under current subsetting parameters, the default assay will be removed. Please adjust subsetting parameters or change default assay") } # Filter DimReduc objects - for (dimreduc in FilterObjects(object = x, classes.keep = 'DimReduc')) { + for (dimreduc in .FilterObjects(object = x, classes.keep = 'DimReduc')) { suppressWarnings( x[[dimreduc]] <- tryCatch( expr = subset.DimReduc(x = x[[dimreduc]], cells = cells, features = features), @@ -3754,7 +3769,7 @@ subset.Seurat <- function( } # Recalculate nCount and nFeature if (!is.null(features)) { - for (assay in FilterObjects(object = x, classes.keep = 'Assay')) { + for (assay in .FilterObjects(object = x, classes.keep = 'Assay')) { n.calc <- CalcN(object = x[[assay]]) if (!is.null(x = n.calc)) { names(x = n.calc) <- paste(names(x = n.calc), assay, sep = '_') @@ -3911,7 +3926,7 @@ setMethod( # because R doesn't allow S3-style [[<- for S4 classes # Ensure cell order stays the same if (all(Cells(x = value) %in% Cells(x = x)) && !all(Cells(x = value) == Cells(x = x))) { for (slot in c('counts', 'data', 'scale.data')) { - assay.data <- GetAssayData(object = value, slot = slot) + assay.data <- GetAssayData(object = value, layer = slot) if (!IsMatrixEmpty(x = assay.data)) { assay.data <- assay.data[, Cells(x = x), drop = FALSE] } @@ -4113,8 +4128,8 @@ setMethod( # because R doesn't allow S3-style [[<- for S4 classes if (inherits(x = value, what = 'Assay')) { if ((!i %in% Assays(object = x)) | (i %in% Assays(object = x) && !identical( - x = GetAssayData(object = x, assay = i, slot = "counts"), - y = GetAssayData(object = value, slot = "counts")) + x = GetAssayData(object = x, assay = i, layer = "counts"), + y = GetAssayData(object = value, layer = "counts")) )) { n.calc <- CalcN(object = value) if (!is.null(x = n.calc)) { diff --git a/R/utils.R b/R/utils.R index d4b7e691..b9f61f70 100644 --- a/R/utils.R +++ b/R/utils.R @@ -267,7 +267,7 @@ NULL #' @concept utils #' .DefaultFOV <- function(object, assay = NULL) { - images <- FilterObjects(object = object, classes.keep = 'FOV') + images <- .FilterObjects(object = object, classes.keep = 'FOV') if (!is.null(x = assay)) { assays <- c(assay, DefaultAssay(object = object[[assay]])) images <- Filter( @@ -1011,7 +1011,7 @@ DefaultDimReduc <- function(object, assay = NULL) { object <- UpdateSlots(object = object) assay <- assay %||% DefaultAssay(object = object) drs.use <- c('umap', 'tsne', 'pca') - dim.reducs <- FilterObjects(object = object, classes.keep = 'DimReduc') + dim.reducs <- .FilterObjects(object = object, classes.keep = 'DimReduc') drs.assay <- Filter( f = function(x) { return(DefaultAssay(object = object[[x]]) == assay) @@ -2276,7 +2276,11 @@ StitchMatrix.matrix <- function(x, y, rowmap, colmap, ...) { new_path <- fs::path_expand(path = new_path) new_path <- fs::dir_create(path = new_path) dest <- tryCatch( - expr = fs::dir_copy(path = path, new_path = new_path, overwrite = overwrite), + expr = fs::dir_copy( + path = path, + new_path = new_path, + overwrite = overwrite + ), EEXIST = eexist, error = hndlr ) @@ -2292,10 +2296,13 @@ StitchMatrix.matrix <- function(x, y, rowmap, colmap, ...) { ) } else { abort( - message = paste0( - "Can't find path: ", - sQuote(x = path), - "; if path is relative, change working directory." + message = paste( + strwrap(x = paste0( + "Can't find path: ", + sQuote(x = path), + "; if path is relative, change working directory" + )), + sep = '\n' ), call = caller_env(n = 1L + n) ) diff --git a/R/zzz.R b/R/zzz.R index 92ddcc24..6e3ac80e 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -10,7 +10,8 @@ #' enquo eval_tidy have_name inform is_bare_character is_bare_integerish #' is_bare_list is_bare_numeric is_missing is_na is_named is_quosure #' missing_arg warn -#' @importClassesFrom Matrix dgCMatrix +#' @importClassesFrom Matrix dgCMatrix CsparseMatrix dsparseMatrix generalMatrix +#' dMatrix sparseMatrix compMatrix Matrix #' @useDynLib SeuratObject #' NULL diff --git a/cran-comments.md b/cran-comments.md index 0b4c84d8..9011be8c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,10 @@ -# SeuratObject v5.0.0 +# SeuratObject v5.0.1 ## Test environments * local ubuntu 22.04 install, R 4.2.3 -* win-builder (oldrelease, release, devel) +* win-builder (oldrelease, release) + +We were unable to test on r-devel on win-builder due to insufficient Matrix version ## R CMD check results @@ -23,14 +25,7 @@ BPCells is hosted on R-universe and used conditionally in SeuratObject ## Downstream dependencies -The following reverse dependencies are impacted by this release of SeuratObject: - -- Seurat: - - new test failures and warnings: Seurat's tests expect errors that are now handled by SeuratObject. Warnings occur due to use of deprecated, but still accepted arguments. The authors of Seurat are aware of these changes, but the functionality of Seurat is not impacted - - S3 generic/method consistency: Seurat defines a method for a generic defined in SeuratObject. In the latest update, SeuratObject changes one of the parameters in the method signature, but still accepts the old arguments. The functionality of Seurat is not impacted by this update - -- Signac - - new test failures: SeuratObject changes the order of the results, but not the actual values. The authors of Signac are aware of this, but the functionality of Signac is not impacted +The following reverse dependency is impacted by this release of SeuratObject: - tidyseurat - - new test failures: SeuratObject changes the order of the results, but not the actual values. The authors of tidyseurat are aware of this, but the functionality of tidyseurat is not impacted + - test failures: SeuratObject changes the order of the results, but not the actual values. The authors of tidyseurat are aware of this, but the functionality of tidyseurat is not impacted diff --git a/man/AssayData.Rd b/man/AssayData.Rd index bee78764..b296dd26 100644 --- a/man/AssayData.Rd +++ b/man/AssayData.Rd @@ -80,7 +80,7 @@ use \code{\link{LayerData<-}} \examples{ # Get assay data from the default assay in a Seurat object -GetAssayData(object = pbmc_small, slot = "data")[1:5,1:5] +GetAssayData(object = pbmc_small, layer = "data")[1:5,1:5] # Set an Assay layer through the Seurat object count.data <- GetAssayData(object = pbmc_small[["RNA"]], layer = "counts") diff --git a/man/SaveSeuratRds.Rd b/man/SaveSeuratRds.Rd index 8d0fa921..4a20c0f1 100644 --- a/man/SaveSeuratRds.Rd +++ b/man/SaveSeuratRds.Rd @@ -5,7 +5,14 @@ \alias{LoadSeuratRds} \title{Save and Load \code{Seurat} Objects from Rds files} \usage{ -SaveSeuratRds(object, file = NULL, destdir = NULL, relative = FALSE, ...) +SaveSeuratRds( + object, + file = NULL, + move = TRUE, + destdir = deprecated(), + relative = FALSE, + ... +) LoadSeuratRds(file, ...) } @@ -15,8 +22,9 @@ LoadSeuratRds(file, ...) \item{file}{Path to save \code{object} to; defaults to \code{file.path(getwd(), paste0(Project(object), ".Rds"))}} -\item{destdir}{Destination directory for on-disk layers saved in -\dQuote{\code{\Sexpr[stage=render]{tempdir()}}}} +\item{move}{Move on-disk layers into \code{dirname(file)}} + +\item{destdir}{\Sexpr[stage=build,results=rd]{lifecycle::badge("deprecated")}} \item{relative}{Save relative paths instead of absolute ones} diff --git a/man/SeuratObject-package.Rd b/man/SeuratObject-package.Rd index 7bf8c28c..bf9cffd0 100644 --- a/man/SeuratObject-package.Rd +++ b/man/SeuratObject-package.Rd @@ -33,6 +33,7 @@ Authors: Other contributors: \itemize{ \item Madeline Kowalski \email{mkowalski@nygenome.org} (\href{https://orcid.org/0000-0002-5655-7620}{ORCID}) [contributor] + \item Saket Choudhary \email{schoudhary@nygenome.org} (\href{https://orcid.org/0000-0001-5202-7633}{ORCID}) [contributor] \item Skylar Li \email{sli@nygenome.org} [contributor] \item Longda Jiang \email{ljiang@nygenome.org} (\href{https://orcid.org/0000-0003-4964-6497}{ORCID}) [contributor] \item Jeff Farrell \email{jfarrell@g.harvard.edu} [contributor]