Skip to content

Commit 5ce4d95

Browse files
authored
Merge pull request #89 from stemangiola/tidy-generics
Tidy generics
2 parents 719e551 + f1d5c7e commit 5ce4d95

File tree

4 files changed

+13
-46
lines changed

4 files changed

+13
-46
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: tidyseurat
33
Title: Brings Seurat to the Tidyverse
4-
Version: 0.8.4
4+
Version: 0.8.5
55
Authors@R: c(person("Stefano", "Mangiola", email = "[email protected]",
66
role = c("aut", "cre")),
77
person("Maria", "Doyle", email = "[email protected]",
@@ -33,7 +33,8 @@ Imports:
3333
stringr,
3434
cli,
3535
fansi,
36-
Matrix
36+
Matrix,
37+
generics
3738
Suggests:
3839
testthat,
3940
knitr,

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export(get_abundance_sc_long)
4949
export(get_abundance_sc_wide)
5050
export(join_transcripts)
5151
export(plot_ly)
52-
export(tidy)
5352
export(unnest_seurat)
5453
exportMethods(aggregate_cells)
5554
exportMethods(join_features)
@@ -95,6 +94,7 @@ importFrom(dplyr,summarise)
9594
importFrom(dplyr,summarize)
9695
importFrom(dplyr,vars)
9796
importFrom(fansi,strwrap_ctl)
97+
importFrom(generics,tidy)
9898
importFrom(ggplot2,aes)
9999
importFrom(ggplot2,ggplot)
100100
importFrom(lifecycle,deprecate_warn)

R/methods.R

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,17 @@ setMethod(
1515

1616
setClass("tidyseurat", contains="Seurat")
1717

18-
#' @name tidy
19-
#' @rdname tidy
20-
#' @title tidy for `Seurat`
21-
#'
22-
#' @param object A `Seurat` object.
23-
#' @return A `tidyseurat` object.
24-
#'
25-
#' @examples
26-
#' data(pbmc_small)
27-
#' pbmc_small
28-
#'
29-
#' @export
30-
tidy <- function(object) {
31-
UseMethod("tidy", object)
32-
}
18+
#' @importFrom generics tidy
3319

34-
#' @rdname tidy
20+
#' @title tidy for Seurat objects
21+
#' @name tidy
22+
#' @description tidy for Seurat objects
23+
#' @param x A Seurat object
24+
#' @param ... Additional arguments (not used)
25+
#' @return A tidyseurat object
3526
#' @importFrom lifecycle deprecate_warn
3627
#' @export
37-
tidy.Seurat <- function(object){
28+
tidy.Seurat <- function(x, ...){
3829

3930
# DEPRECATE
4031
deprecate_warn(
@@ -43,7 +34,7 @@ tidy.Seurat <- function(object){
4334
details="tidyseurat says: tidy() is not needed anymore."
4435
)
4536

46-
return(object)
37+
return(x)
4738
}
4839

4940

man/tidy.Rd

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)