Skip to content

Commit 131a828

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-tests
2 parents 0131ff6 + bd2dce2 commit 131a828

21 files changed

Lines changed: 39 additions & 97 deletions

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
- Bump required R version to 4.5 in preparation for Bioconductor submission
44
(PR #309)
5-
- Remove deprecated functions and arguments (PR #311)
5+
- Remove deprecated functions and arguments (PR #311, PR #313)
6+
- Minor cleanups and improvements (PR #313).
67
- Add more tests to increase coverage (PR #315)
78

89
# anndataR 0.2.0

R/AbstractAnnData.R

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -272,23 +272,6 @@ AbstractAnnData <- R6::R6Class(
272272
)
273273
},
274274
#' @description
275-
#' `r lifecycle::badge('deprecated')`
276-
#'
277-
#' Deprecated, use `as_HDF5AnnData()` instead
278-
#'
279-
#' @param ... Arguments passed to `adata$as_HDF5AnnData()`
280-
#'
281-
#' @return An [`HDF5AnnData`] object
282-
to_HDF5AnnData = function(...) {
283-
lifecycle::deprecate_warn(
284-
"0.1.0",
285-
"to_HDF5AnnDAta()",
286-
"as_HDF5AnnData()",
287-
)
288-
289-
self$as_HDF5AnnData(...)
290-
},
291-
#' @description
292275
#' Write the `AnnData` object to an H5AD file
293276
#'
294277
#' See [write_h5ad()] for details

R/as_Seurat.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ as_Seurat <- function(
352352
!"counts" %in% names(layers_mapping) &&
353353
!"data" %in% names(layers_mapping)
354354
) {
355-
cli_warn(c(
355+
cli_warn(paste(
356356
"No {.val counts} or {.val data} layer found in {.arg names(layers_mapping)},",
357-
"this may lead to unexpected results when using the resulting Seurat object."
357+
"this may lead to unexpected results when using the resulting {.cls Seurat} object."
358358
))
359359
}
360360

@@ -381,6 +381,7 @@ as_Seurat <- function(
381381
# and remove the counts layer
382382
if (!"counts" %in% names(layers_mapping)) {
383383
SeuratObject::LayerData(obj, layer = dummy_counts) <- counts
384+
SeuratObject::DefaultLayer(obj[[assay_name]]) <- dummy_counts
384385
obj[[assay_name]]$counts <- NULL
385386
}
386387

R/from_Seurat.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ from_Seurat <- function(
3333
output_class = c("InMemory", "HDF5AnnData"),
3434
...
3535
) {
36-
lifecycle::deprecate_soft(
37-
when = "0.99.0",
38-
what = "from_Seurat()",
39-
with = "as_AnnData()"
40-
)
41-
4236
check_requires("Converting Seurat to AnnData", c("SeuratObject", "Seurat"))
4337

4438
output_class <- match.arg(output_class)

R/from_SingleCellExperiment.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ from_SingleCellExperiment <- function(
3131
output_class = c("InMemory", "HDF5AnnData"),
3232
...
3333
) {
34-
lifecycle::deprecate_soft(
35-
when = "0.99.0",
36-
what = "from_SingleCellExperiment()",
37-
with = "as_AnnData()"
38-
)
39-
4034
check_requires(
4135
"Converting SingleCellExperiment to AnnData",
4236
"SingleCellExperiment",

R/generate_dataset.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
#'
2525
#' @examples
2626
#' dummy <- generate_dataset()
27-
#' \dontrun{
28-
#' dummy <- generate_dataset(format = "AnnData")
29-
#' dummy <- generate_dataset(format = "SingleCellExperiment")
30-
#' dummy <- generate_dataset(format = "Seurat")
31-
#' }
3227
generate_dataset <- function(
3328
n_obs = 10L,
3429
n_vars = 20L,

man/AbstractAnnData.Rd

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/HDF5AnnData.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/InMemoryAnnData.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_dataset.Rd

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)