Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
49 changes: 0 additions & 49 deletions R/AbstractAnnData.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 0 additions & 22 deletions R/as_Seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 0 additions & 22 deletions R/as_SingleCellExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions R/from_Seurat.R
Original file line number Diff line number Diff line change
@@ -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()]
Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions R/from_SingleCellExperiment.R
Original file line number Diff line number Diff line change
@@ -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()]
Expand All @@ -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
Expand Down
12 changes: 0 additions & 12 deletions R/read_h5ad.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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") {
Expand Down
62 changes: 0 additions & 62 deletions man/AbstractAnnData.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/HDF5AnnData.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/InMemoryAnnData.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 0 additions & 57 deletions man/from_Seurat.Rd

This file was deleted.

Loading
Loading