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
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: tidySingleCellExperiment
Title: Brings SingleCellExperiment to the Tidyverse
Version: 1.11.7
Version: 1.11.8
Authors@R: c(person("Stefano", "Mangiola",
comment=c(ORCID="0000-0001-7474-836X"),
email="[email protected]",
Expand All @@ -26,7 +26,6 @@ Imports:
SummarizedExperiment,
tibble,
ggplot2,
plotly,
magrittr,
rlang,
purrr,
Expand Down Expand Up @@ -58,7 +57,8 @@ Suggests:
GGally,
uwot,
celldex,
dittoSeq
dittoSeq,
plotly
VignetteBuilder:
knitr
RdMacros:
Expand Down
4 changes: 1 addition & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ S3method(mutate,SingleCellExperiment)
S3method(nest,SingleCellExperiment)
S3method(pivot_longer,SingleCellExperiment)
S3method(plot_ly,SingleCellExperiment)
S3method(plot_ly,default)
S3method(print,SingleCellExperiment)
S3method(pull,SingleCellExperiment)
S3method(rename,SingleCellExperiment)
Expand All @@ -45,7 +44,6 @@ S3method(unite,SingleCellExperiment)
S3method(unnest,tidySingleCellExperiment_nested)
export("%>%")
export(join_transcripts)
export(plot_ly)
export(tidy)
export(unnest_single_cell_experiment)
exportMethods(aggregate_cells)
Expand Down Expand Up @@ -111,7 +109,6 @@ importFrom(pillar,get_extent)
importFrom(pillar,style_subtle)
importFrom(pillar,tbl_format_header)
importFrom(pkgconfig,get_config)
importFrom(plotly,plot_ly)
importFrom(purrr,as_mapper)
importFrom(purrr,imap)
importFrom(purrr,map)
Expand Down Expand Up @@ -156,6 +153,7 @@ importFrom(ttservice,aggregate_cells)
importFrom(ttservice,bind_cols)
importFrom(ttservice,bind_rows)
importFrom(ttservice,join_features)
importFrom(ttservice,plot_ly)
importFrom(utils,data)
importFrom(utils,packageDescription)
importFrom(utils,tail)
Expand Down
58 changes: 9 additions & 49 deletions R/plotly_methods.R
Original file line number Diff line number Diff line change
@@ -1,54 +1,14 @@
#' @name plotly
#' @rdname plotly
#' @inherit plotly::plot_ly
#' @name plot_ly
#' @rdname plot_ly
#' @inherit ttservice::plot_ly
#' @return `plotly`
#'
#' @examples
#' # TODO
#' @examples
#' data(pbmc_small)
#' pbmc_small |>
#' plot_ly(x = ~ nCount_RNA, y = ~ nFeature_RNA)
#'
#' @importFrom plotly plot_ly
#' @export
plot_ly <- function(data=data.frame(),
..., type=NULL, name=NULL,
color=NULL, colors=NULL, alpha=NULL,
stroke=NULL, strokes=NULL, alpha_stroke=1,
size=NULL, sizes=c(10, 100),
span=NULL, spans=c(1, 20),
symbol=NULL, symbols=NULL,
linetype=NULL, linetypes=NULL,
split=NULL, frame=NULL,
width=NULL, height=NULL, source="A") {
UseMethod("plot_ly")
}

#' @rdname plotly
#' @export
plot_ly.default <- function(data=data.frame(),
..., type=NULL, name=NULL,
color=NULL, colors=NULL, alpha=NULL,
stroke=NULL, strokes=NULL, alpha_stroke=1,
size=NULL, sizes=c(10, 100),
span=NULL, spans=c(1, 20),
symbol=NULL, symbols=NULL,
linetype=NULL, linetypes=NULL,
split=NULL, frame=NULL,
width=NULL, height=NULL, source="A") {
data %>%
# This is a trick to not loop the call
drop_class("tbl_df") %>%
plotly::plot_ly(...,
type=type, name=name,
color=color, colors=colors, alpha=alpha,
stroke=stroke, strokes=strokes, alpha_stroke=alpha_stroke,
size=size, sizes=sizes,
span=span, spans=spans,
symbol=symbol, symbols=symbols,
linetype=linetype, linetypes=linetypes,
split=split, frame=frame,
width=width, height=height, source=source)
}

#' @rdname plotly
#' @importFrom ttservice plot_ly
#' @export
plot_ly.SingleCellExperiment <- function(data=data.frame(),
..., type=NULL, name=NULL,
Expand All @@ -63,7 +23,7 @@ plot_ly.SingleCellExperiment <- function(data=data.frame(),
data %>%
# This is a trick to not loop the call
as_tibble() %>%
plot_ly(...,
ttservice::plot_ly(...,
type=type, name=name,
color=color, colors=colors, alpha=alpha,
stroke=stroke, strokes=strokes, alpha_stroke=alpha_stroke,
Expand Down
60 changes: 4 additions & 56 deletions man/plotly.Rd → man/plot_ly.Rd

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