Skip to content

Commit 62c3892

Browse files
authored
Merge pull request #124 from tidyomics/use-tidy-from-generics
Use tidy from generics
2 parents 8d26006 + abb3dda commit 62c3892

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: tidySingleCellExperiment
33
Title: Brings SingleCellExperiment to the Tidyverse
4-
Version: 1.19.3
4+
Version: 1.19.4
55
Authors@R: c(person("Stefano", "Mangiola",
66
comment=c(ORCID="0000-0001-7474-836X"),
77
email="mangiolastefano@gmail.com",
@@ -42,7 +42,8 @@ Imports:
4242
cli,
4343
fansi,
4444
Matrix,
45-
stats
45+
stats,
46+
generics
4647
Suggests:
4748
BiocStyle,
4849
testthat,

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ S3method(unite,SingleCellExperiment)
4747
S3method(unnest,tidySingleCellExperiment_nested)
4848
export("%>%")
4949
export(join_transcripts)
50-
export(tidy)
5150
export(unnest_single_cell_experiment)
5251
exportMethods(join_features)
5352
importFrom(Matrix,rowSums)
@@ -101,6 +100,7 @@ importFrom(dplyr,summarize)
101100
importFrom(dplyr,vars)
102101
importFrom(ellipsis,check_dots_used)
103102
importFrom(fansi,strwrap_ctl)
103+
importFrom(generics,tidy)
104104
importFrom(ggplot2,aes)
105105
importFrom(ggplot2,ggplot)
106106
importFrom(lifecycle,deprecate_warn)

R/methods.R

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ setMethod("join_features", "SingleCellExperiment", function(.data,
9393
}
9494
})
9595

96-
#' @name tidy
97-
#' @rdname tidy
9896
#' @title (DEPRECATED) tidy for `SingleCellExperiment`
97+
#' @name tidy.SingleCellExperiment
9998
#'
100-
#' @param object A `SingleCellExperiment` object.
99+
#' @param x A `SingleCellExperiment` object.
100+
#' @param ... Additional arguments passed to `generics::tidy`. (Unused.)
101101
#' @return A `tidySingleCellExperiment` object. (DEPRECATED - not needed anymore)
102102
#'
103103
#' @examples
@@ -107,23 +107,18 @@ setMethod("join_features", "SingleCellExperiment", function(.data,
107107
#' @references
108108
#' Hutchison, W.J., Keyes, T.J., The tidyomics Consortium. et al. The tidyomics ecosystem: enhancing omic data analyses. Nat Methods 21, 1166–1170 (2024). https://doi.org/10.1038/s41592-024-02299-2
109109
#'
110-
#' @export
111-
tidy <- function(object) {
112-
UseMethod("tidy", object)
113-
}
114-
115-
#' @rdname tidy
110+
#' @importFrom generics tidy
116111
#' @importFrom lifecycle deprecate_warn
117112
#' @export
118-
tidy.SingleCellExperiment <- function(object) {
113+
tidy.SingleCellExperiment <- function(x, ...) {
119114

120115
# DEPRECATE
121116
deprecate_warn(
122117
when="1.1.1",
123118
what="tidy()",
124119
details="tidySingleCellExperiment says: tidy() is not needed anymore.")
125120

126-
return(object)
121+
return(x)
127122
}
128123

129124
#' @name aggregate_cells

man/tidy.Rd

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

0 commit comments

Comments
 (0)