diff --git a/NAMESPACE b/NAMESPACE
index b12660bd..74d5bb21 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -4,12 +4,8 @@ S3method(as_AnnData,Seurat)
S3method(as_AnnData,SingleCellExperiment)
export(AnnData)
export(as_AnnData)
-export(from_Seurat)
-export(from_SingleCellExperiment)
export(generate_dataset)
export(read_h5ad)
-export(to_Seurat)
-export(to_SingleCellExperiment)
export(write_h5ad)
importFrom(Matrix,as.matrix)
importFrom(Matrix,sparseMatrix)
diff --git a/NEWS.md b/NEWS.md
index a14ad143..ff41c64e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,8 @@
# anndataR 0.99.0
-- Bump required R version to 4.5 in preparation of Bioconductor submission
+- Bump required R version to 4.5 in preparation for Bioconductor submission
+ (PR #309)
+- Remove deprecated functions and arguments (PR #311)
# anndataR 0.2.0
diff --git a/R/AbstractAnnData.R b/R/AbstractAnnData.R
index 6673e5c6..ffe6a42c 100644
--- a/R/AbstractAnnData.R
+++ b/R/AbstractAnnData.R
@@ -204,23 +204,6 @@ AbstractAnnData <- R6::R6Class(
)
},
#' @description
- #' `r lifecycle::badge('deprecated')`
- #'
- #' Deprecated, use `as_SingleCellExperiment()` instead
- #'
- #' @param ... Arguments passed to `adata$as_SingleCellExperiment()`
- #'
- #' @return A `SingleCellExperiment` object
- to_SingleCellExperiment = function(...) {
- lifecycle::deprecate_warn(
- "0.1.0",
- "to_SingleCellExperiment()",
- "as_SingleCellExperiment()"
- )
-
- self$as_SingleCellExperiment(...)
- },
- #' @description
#' Convert to `Seurat`
#'
#' See [as_Seurat()] for more details on the conversion
@@ -258,23 +241,6 @@ AbstractAnnData <- R6::R6Class(
)
},
#' @description
- #' `r lifecycle::badge('deprecated')`
- #'
- #' Deprecated, use `as_Seurat()` instead
- #'
- #' @param ... Arguments passed to `adata$as_Seurat()`
- #'
- #' @return A `Seurat` object
- to_Seurat = function(...) {
- lifecycle::deprecate_warn(
- "0.1.0",
- "to_Seurat()",
- "as_Seurat()"
- )
-
- self$as_Seurat(...)
- },
- #' @description
#' Convert to an [`InMemoryAnnData`]
#'
#' See [as_InMemoryAnnData()] for more details on the conversion
@@ -284,21 +250,6 @@ AbstractAnnData <- R6::R6Class(
as_InMemoryAnnData(self)
},
#' @description
- #' `r lifecycle::badge('deprecated')`
- #'
- #' Deprecated, use `as_InMemoryAnnData()` instead
- #'
- #' @return An [`InMemoryAnnData`] object
- to_InMemoryAnnData = function() {
- lifecycle::deprecate_warn(
- "0.1.0",
- "to_InMemoryAnnData()",
- "as_InMemoryAnnData()"
- )
-
- self$as_InMemoryAnnData()
- },
- #' @description
#' Convert to an [`HDF5AnnData`]
#'
#' See [as_HDF5AnnData()] for more details on the conversion
diff --git a/R/as_Seurat.R b/R/as_Seurat.R
index b74148a8..ad5ca9aa 100644
--- a/R/as_Seurat.R
+++ b/R/as_Seurat.R
@@ -299,28 +299,6 @@ as_Seurat <- function(
obj
}
-#' Convert an AnnData object to a Seurat object
-#'
-#' @description
-#' `r lifecycle::badge("deprecated")`
-#'
-#' This function is deprecated, use `adata$as_Seurat()` instead
-#'
-#' @param ... Arguments passed to [as_Seurat()]
-#'
-#' @return A `Seurat` object
-#' @export
-# nolint start: object_name_linter
-to_Seurat <- function(...) {
- # nolint end: object_name_linter
- lifecycle::deprecate_warn(
- when = "0.1.0",
- what = "to_Seurat()",
- with = "adata$as_Seurat()"
- )
- as_Seurat(...)
-}
-
# nolint start: object_name_linter
.as_Seurat_is_atomic_character <- function(x) {
# nolint end: object_name_linter
diff --git a/R/as_SingleCellExperiment.R b/R/as_SingleCellExperiment.R
index bcd61a95..a482e318 100644
--- a/R/as_SingleCellExperiment.R
+++ b/R/as_SingleCellExperiment.R
@@ -277,28 +277,6 @@ as_SingleCellExperiment <- function(
sce
}
-#' Convert an AnnData object to a SingleCellExperiment object
-#'
-#' @description
-#' `r lifecycle::badge("deprecated")`
-#'
-#' This function is deprecated, use `adata$as_SingleCellExperiment()` instead
-#'
-#' @param ... Arguments passed to [as_SingleCellExperiment()]
-#'
-#' @return A `SingleCellExperiment` object
-#' @export
-# nolint start: object_name_linter
-to_SingleCellExperiment <- function(...) {
- # nolint end: object_name_linter
- lifecycle::deprecate_warn(
- when = "0.1.0",
- what = "to_SingleCellExperiment()",
- with = "adata$as_SingleCellExperiment()"
- )
- as_SingleCellExperiment(...)
-}
-
# nolint start: object_length_linter object_name_linter
.as_SCE_guess_all <- function(adata, slot) {
# nolint end: object_length_linter object_name_linter
diff --git a/R/from_Seurat.R b/R/from_Seurat.R
index c83843a8..b1d7a8c4 100644
--- a/R/from_Seurat.R
+++ b/R/from_Seurat.R
@@ -1,10 +1,5 @@
#' Convert a Seurat object to an AnnData object
#'
-#' @description
-#' `r lifecycle::badge("deprecated")`
-#'
-#' This function is deprecated, use [as_AnnData()] instead
-#'
#' @param seurat_obj See [as_AnnData()]
#' @param assay_name See [as_AnnData()]
#' @param x_mapping See [as_AnnData()]
@@ -20,7 +15,7 @@
#' @param ... See [as_AnnData()]
#'
#' @return An `AnnData` object
-#' @export
+#' @noRd
# nolint start: object_name_linter
from_Seurat <- function(
# nolint end: object_name_linter
diff --git a/R/from_SingleCellExperiment.R b/R/from_SingleCellExperiment.R
index d286db30..20417fb6 100644
--- a/R/from_SingleCellExperiment.R
+++ b/R/from_SingleCellExperiment.R
@@ -1,10 +1,5 @@
#' Convert a SingleCellExperiment object to an AnnData object
#'
-#' @description
-#' `r lifecycle::badge("deprecated")`
-#'
-#' This function is deprecated, use [as_AnnData()] instead
-#'
#' @param sce See [as_AnnData()]
#' @param x_mapping See [as_AnnData()]
#' @param layers_mapping See [as_AnnData()]
@@ -19,7 +14,7 @@
#' @param ... See [as_AnnData()]
#'
#' @return An `AnnData` object
-#' @export
+#' @noRd
# nolint start: object_name_linter
from_SingleCellExperiment <- function(
# nolint end: object_name_linter
diff --git a/R/read_h5ad.R b/R/read_h5ad.R
index e183b94b..3b4f043c 100644
--- a/R/read_h5ad.R
+++ b/R/read_h5ad.R
@@ -12,7 +12,6 @@
#' [`SingleCellExperiment::SingleCellExperiment`] object
#' * `"Seurat"`: Read the H5AD file as a
#' [`SeuratObject::Seurat`] object
-#' @param to `r lifecycle::badge('deprecated')` Deprecated, use `as` instead
#' @param mode The mode to open the HDF5 file.
#'
#' * `a` creates a new file or opens an existing one for read/write.
@@ -43,23 +42,12 @@
read_h5ad <- function(
path,
as = c("InMemoryAnnData", "HDF5AnnData", "SingleCellExperiment", "Seurat"),
- to = deprecated(),
mode = c("r", "r+", "a", "w", "w-", "x"),
...
) {
as <- match.arg(as)
mode <- match.arg(mode)
- if (lifecycle::is_present(to)) {
- lifecycle::deprecate_warn(
- when = "0.1.0",
- what = "read_h5ad(to = )",
- with = "read_h5ad(as = )",
- details = "Overwriting `as` with `to`."
- )
- as <- to
- }
-
hdf5_adata <- HDF5AnnData$new(path, mode = mode)
if (as == "HDF5AnnData") {
diff --git a/man/AbstractAnnData.Rd b/man/AbstractAnnData.Rd
index dbafb6e5..9839981e 100644
--- a/man/AbstractAnnData.Rd
+++ b/man/AbstractAnnData.Rd
@@ -61,11 +61,8 @@ Other AnnData classes:
\item \href{#method-AbstractAnnData-varp_keys}{\code{AbstractAnnData$varp_keys()}}
\item \href{#method-AbstractAnnData-uns_keys}{\code{AbstractAnnData$uns_keys()}}
\item \href{#method-AbstractAnnData-as_SingleCellExperiment}{\code{AbstractAnnData$as_SingleCellExperiment()}}
-\item \href{#method-AbstractAnnData-to_SingleCellExperiment}{\code{AbstractAnnData$to_SingleCellExperiment()}}
\item \href{#method-AbstractAnnData-as_Seurat}{\code{AbstractAnnData$as_Seurat()}}
-\item \href{#method-AbstractAnnData-to_Seurat}{\code{AbstractAnnData$to_Seurat()}}
\item \href{#method-AbstractAnnData-as_InMemoryAnnData}{\code{AbstractAnnData$as_InMemoryAnnData()}}
-\item \href{#method-AbstractAnnData-to_InMemoryAnnData}{\code{AbstractAnnData$to_InMemoryAnnData()}}
\item \href{#method-AbstractAnnData-as_HDF5AnnData}{\code{AbstractAnnData$as_HDF5AnnData()}}
\item \href{#method-AbstractAnnData-to_HDF5AnnData}{\code{AbstractAnnData$to_HDF5AnnData()}}
\item \href{#method-AbstractAnnData-write_h5ad}{\code{AbstractAnnData$write_h5ad()}}
@@ -245,28 +242,6 @@ A \code{SingleCellExperiment} object
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-AbstractAnnData-to_SingleCellExperiment}{}}}
-\subsection{Method \code{to_SingleCellExperiment()}}{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-Deprecated, use \code{as_SingleCellExperiment()} instead
-\subsection{Usage}{
-\if{html}{\out{}}\preformatted{AbstractAnnData$to_SingleCellExperiment(...)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{}}
-\describe{
-\item{\code{...}}{Arguments passed to \code{adata$as_SingleCellExperiment()}}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-A \code{SingleCellExperiment} object
-}
-}
-\if{html}{\out{
}}
\if{html}{\out{}}
\if{latex}{\out{\hypertarget{method-AbstractAnnData-as_Seurat}{}}}
\subsection{Method \code{as_Seurat()}}{
@@ -312,28 +287,6 @@ A \code{Seurat} object
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-AbstractAnnData-to_Seurat}{}}}
-\subsection{Method \code{to_Seurat()}}{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-Deprecated, use \code{as_Seurat()} instead
-\subsection{Usage}{
-\if{html}{\out{}}\preformatted{AbstractAnnData$to_Seurat(...)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{}}
-\describe{
-\item{\code{...}}{Arguments passed to \code{adata$as_Seurat()}}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-A \code{Seurat} object
-}
-}
-\if{html}{\out{
}}
\if{html}{\out{}}
\if{latex}{\out{\hypertarget{method-AbstractAnnData-as_InMemoryAnnData}{}}}
\subsection{Method \code{as_InMemoryAnnData()}}{
@@ -349,21 +302,6 @@ An \link{InMemoryAnnData} object
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-AbstractAnnData-to_InMemoryAnnData}{}}}
-\subsection{Method \code{to_InMemoryAnnData()}}{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-Deprecated, use \code{as_InMemoryAnnData()} instead
-\subsection{Usage}{
-\if{html}{\out{}}\preformatted{AbstractAnnData$to_InMemoryAnnData()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-An \code{\link{InMemoryAnnData}} object
-}
-}
-\if{html}{\out{
}}
\if{html}{\out{}}
\if{latex}{\out{\hypertarget{method-AbstractAnnData-as_HDF5AnnData}{}}}
\subsection{Method \code{as_HDF5AnnData()}}{
diff --git a/man/HDF5AnnData.Rd b/man/HDF5AnnData.Rd
index ef3a2e06..4434034d 100644
--- a/man/HDF5AnnData.Rd
+++ b/man/HDF5AnnData.Rd
@@ -69,9 +69,6 @@ Other AnnData classes:
anndataR::AbstractAnnData$print()
anndataR::AbstractAnnData$shape()
anndataR::AbstractAnnData$to_HDF5AnnData()
-anndataR::AbstractAnnData$to_InMemoryAnnData()
-anndataR::AbstractAnnData$to_Seurat()
-anndataR::AbstractAnnData$to_SingleCellExperiment()
anndataR::AbstractAnnData$uns_keys()
anndataR::AbstractAnnData$var_keys()
anndataR::AbstractAnnData$varm_keys()
diff --git a/man/InMemoryAnnData.Rd b/man/InMemoryAnnData.Rd
index 7b5a06c1..fa8f7d3d 100644
--- a/man/InMemoryAnnData.Rd
+++ b/man/InMemoryAnnData.Rd
@@ -89,9 +89,6 @@ Other AnnData classes:
anndataR::AbstractAnnData$print()
anndataR::AbstractAnnData$shape()
anndataR::AbstractAnnData$to_HDF5AnnData()
-anndataR::AbstractAnnData$to_InMemoryAnnData()
-anndataR::AbstractAnnData$to_Seurat()
-anndataR::AbstractAnnData$to_SingleCellExperiment()
anndataR::AbstractAnnData$uns_keys()
anndataR::AbstractAnnData$var_keys()
anndataR::AbstractAnnData$varm_keys()
diff --git a/man/from_Seurat.Rd b/man/from_Seurat.Rd
deleted file mode 100644
index 5607de68..00000000
--- a/man/from_Seurat.Rd
+++ /dev/null
@@ -1,57 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/from_Seurat.R
-\name{from_Seurat}
-\alias{from_Seurat}
-\title{Convert a Seurat object to an AnnData object}
-\usage{
-from_Seurat(
- seurat_obj,
- assay_name = NULL,
- x_mapping = NULL,
- layers_mapping = TRUE,
- obs_mapping = TRUE,
- var_mapping = TRUE,
- obsm_mapping = TRUE,
- varm_mapping = TRUE,
- obsp_mapping = TRUE,
- varp_mapping = TRUE,
- uns_mapping = TRUE,
- output_class = c("InMemory", "HDF5AnnData"),
- ...
-)
-}
-\arguments{
-\item{seurat_obj}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{assay_name}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{x_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{layers_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{obs_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{var_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{obsm_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{varm_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{obsp_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{varp_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{uns_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{output_class}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{...}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-}
-\value{
-An \code{AnnData} object
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-This function is deprecated, use \code{\link[=as_AnnData]{as_AnnData()}} instead
-}
diff --git a/man/from_SingleCellExperiment.Rd b/man/from_SingleCellExperiment.Rd
deleted file mode 100644
index 3e3aabd0..00000000
--- a/man/from_SingleCellExperiment.Rd
+++ /dev/null
@@ -1,54 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/from_SingleCellExperiment.R
-\name{from_SingleCellExperiment}
-\alias{from_SingleCellExperiment}
-\title{Convert a SingleCellExperiment object to an AnnData object}
-\usage{
-from_SingleCellExperiment(
- sce,
- x_mapping = NULL,
- layers_mapping = TRUE,
- obs_mapping = TRUE,
- var_mapping = TRUE,
- obsm_mapping = TRUE,
- varm_mapping = TRUE,
- obsp_mapping = TRUE,
- varp_mapping = TRUE,
- uns_mapping = TRUE,
- output_class = c("InMemory", "HDF5AnnData"),
- ...
-)
-}
-\arguments{
-\item{sce}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{x_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{layers_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{obs_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{var_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{obsm_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{varm_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{obsp_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{varp_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{uns_mapping}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{output_class}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-
-\item{...}{See \code{\link[=as_AnnData]{as_AnnData()}}}
-}
-\value{
-An \code{AnnData} object
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-This function is deprecated, use \code{\link[=as_AnnData]{as_AnnData()}} instead
-}
diff --git a/man/read_h5ad.Rd b/man/read_h5ad.Rd
index 4c463459..fe9bd5bd 100644
--- a/man/read_h5ad.Rd
+++ b/man/read_h5ad.Rd
@@ -7,7 +7,6 @@
read_h5ad(
path,
as = c("InMemoryAnnData", "HDF5AnnData", "SingleCellExperiment", "Seurat"),
- to = deprecated(),
mode = c("r", "r+", "a", "w", "w-", "x"),
...
)
@@ -26,8 +25,6 @@ read_h5ad(
\code{\link[SeuratObject:Seurat-class]{SeuratObject::Seurat}} object
}}
-\item{to}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Deprecated, use \code{as} instead}
-
\item{mode}{The mode to open the HDF5 file.
\itemize{
\item \code{a} creates a new file or opens an existing one for read/write.
diff --git a/man/to_Seurat.Rd b/man/to_Seurat.Rd
deleted file mode 100644
index 065562a1..00000000
--- a/man/to_Seurat.Rd
+++ /dev/null
@@ -1,19 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/as_Seurat.R
-\name{to_Seurat}
-\alias{to_Seurat}
-\title{Convert an AnnData object to a Seurat object}
-\usage{
-to_Seurat(...)
-}
-\arguments{
-\item{...}{Arguments passed to \code{\link[=as_Seurat]{as_Seurat()}}}
-}
-\value{
-A \code{Seurat} object
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-This function is deprecated, use \code{adata$as_Seurat()} instead
-}
diff --git a/man/to_SingleCellExperiment.Rd b/man/to_SingleCellExperiment.Rd
deleted file mode 100644
index ffdcb711..00000000
--- a/man/to_SingleCellExperiment.Rd
+++ /dev/null
@@ -1,19 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/as_SingleCellExperiment.R
-\name{to_SingleCellExperiment}
-\alias{to_SingleCellExperiment}
-\title{Convert an AnnData object to a SingleCellExperiment object}
-\usage{
-to_SingleCellExperiment(...)
-}
-\arguments{
-\item{...}{Arguments passed to \code{\link[=as_SingleCellExperiment]{as_SingleCellExperiment()}}}
-}
-\value{
-A \code{SingleCellExperiment} object
-}
-\description{
-\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
-
-This function is deprecated, use \code{adata$as_SingleCellExperiment()} instead
-}
diff --git a/tests/testthat/test-HDF5-read.R b/tests/testthat/test-HDF5-read.R
index 2b68567f..5d3786d9 100644
--- a/tests/testthat/test-HDF5-read.R
+++ b/tests/testthat/test-HDF5-read.R
@@ -141,10 +141,3 @@ test_that("reading H5AD as Seurat works", {
seurat <- read_h5ad(filename, as = "Seurat")
expect_s4_class(seurat, "Seurat")
})
-
-test_that("deprecated to argument in read_h5ad() works", {
- expect_warning(
- mem_ad <- read_h5ad(filename, to = "InMemoryAnnData")
- )
- expect_true(inherits(mem_ad, "InMemoryAnnData"))
-})
diff --git a/tests/testthat/test-HDF5AnnData.R b/tests/testthat/test-HDF5AnnData.R
index 95ff2f93..eef20294 100644
--- a/tests/testthat/test-HDF5AnnData.R
+++ b/tests/testthat/test-HDF5AnnData.R
@@ -187,8 +187,3 @@ test_that("writing var names works", {
h5ad$var_names <- LETTERS[1:20]
expect_identical(h5ad$var_names, LETTERS[1:20])
})
-
-test_that("deprecated to_InMemoryAnnData() works", {
- expect_warning(mem_ad <- adata$to_InMemoryAnnData())
- expect_true(inherits(mem_ad, "InMemoryAnnData"))
-})
diff --git a/tests/testthat/test-InMemoryAnnData.R b/tests/testthat/test-InMemoryAnnData.R
index 27b64d9d..2cebdf33 100644
--- a/tests/testthat/test-InMemoryAnnData.R
+++ b/tests/testthat/test-InMemoryAnnData.R
@@ -247,14 +247,3 @@ test_that("write to layers", {
ad$layers <- dummy$layers
expect_identical(ad$layers, dummy$layers)
})
-
-test_that("deprecated to_HDF5AnnData() works", {
- ad <- AnnData(
- X = dummy$X,
- obs = dummy$obs,
- var = dummy$var,
- layers = dummy$layers
- )
- expect_warning(h5_ad <- ad$to_HDF5AnnData(file = tempfile()))
- expect_true(inherits(h5_ad, "HDF5AnnData"))
-})
diff --git a/tests/testthat/test-as_Seurat.R b/tests/testthat/test-as_Seurat.R
index 9e80fb22..96bd4856 100644
--- a/tests/testthat/test-as_Seurat.R
+++ b/tests/testthat/test-as_Seurat.R
@@ -177,8 +177,3 @@ test_that("as_Seurat works with unnamed mappings", {
)
)
})
-
-test_that("deprecated to_Seurat() works", {
- expect_warning(seu <- ad$to_Seurat(x_mapping = "counts"))
- expect_s4_class(seu, "Seurat")
-})
diff --git a/tests/testthat/test-as_SingleCellExperiment.R b/tests/testthat/test-as_SingleCellExperiment.R
index 7dfc7ba2..e1febf22 100644
--- a/tests/testthat/test-as_SingleCellExperiment.R
+++ b/tests/testthat/test-as_SingleCellExperiment.R
@@ -248,8 +248,3 @@ test_that("as_SCE works with unnamed mappings", {
)
)
})
-
-test_that("deprecated to_SingleCellExperiment() works", {
- expect_warning(sce <- ad$to_SingleCellExperiment())
- expect_s4_class(sce, "SingleCellExperiment")
-})