Skip to content

Commit e69bc5c

Browse files
committed
remove deprecated print method, and adjust NAMESPACE. Add startup message for external printing handling.
1 parent 589a02d commit e69bc5c

File tree

10 files changed

+8
-307
lines changed

10 files changed

+8
-307
lines changed

.DS_Store

8 KB
Binary file not shown.

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: tidySummarizedExperiment
33
Title: Brings SummarizedExperiment to the Tidyverse
4-
Version: 1.19.1
4+
Version: 1.19.2
55
Authors@R: c(person("Stefano", "Mangiola", email = "mangiolastefano@gmail.com",
66
role = c("aut", "cre")) )
77
Description: The tidySummarizedExperiment package provides a set of tools for creating and

NAMESPACE

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ S3method(pivot_longer,SummarizedExperiment)
2020
S3method(pivot_wider,SummarizedExperiment)
2121
S3method(plot_ly,SummarizedExperiment)
2222
S3method(plot_ly,tbl_df)
23-
S3method(print,SummarizedExperiment)
2423
S3method(pull,SummarizedExperiment)
2524
S3method(rename,SummarizedExperiment)
2625
S3method(right_join,SummarizedExperiment)
@@ -32,7 +31,6 @@ S3method(separate,SummarizedExperiment)
3231
S3method(slice,SummarizedExperiment)
3332
S3method(summarise,SummarizedExperiment)
3433
S3method(summarize,SummarizedExperiment)
35-
S3method(tbl_format_header,tidySummarizedExperiment)
3634
S3method(tidy,RangedSummarizedExperiment)
3735
S3method(tidy,SummarizedExperiment)
3836
S3method(unite,SummarizedExperiment)
@@ -52,15 +50,13 @@ importFrom(SummarizedExperiment,"colData<-")
5250
importFrom(SummarizedExperiment,"elementMetadata<-")
5351
importFrom(SummarizedExperiment,"rowData<-")
5452
importFrom(SummarizedExperiment,assay)
55-
importFrom(SummarizedExperiment,assayNames)
5653
importFrom(SummarizedExperiment,assays)
5754
importFrom(SummarizedExperiment,cbind)
5855
importFrom(SummarizedExperiment,colData)
5956
importFrom(SummarizedExperiment,elementMetadata)
6057
importFrom(SummarizedExperiment,rbind)
6158
importFrom(SummarizedExperiment,rowData)
6259
importFrom(SummarizedExperiment,rowRanges)
63-
importFrom(cli,col_br_black)
6460
importFrom(dplyr,count)
6561
importFrom(dplyr,distinct)
6662
importFrom(dplyr,distinct_at)
@@ -86,7 +82,6 @@ importFrom(dplyr,summarise)
8682
importFrom(dplyr,summarize)
8783
importFrom(dplyr,vars)
8884
importFrom(ellipsis,check_dots_used)
89-
importFrom(fansi,strwrap_ctl)
9085
importFrom(ggplot2,aes)
9186
importFrom(ggplot2,ggplot)
9287
importFrom(lifecycle,deprecate_warn)
@@ -98,10 +93,6 @@ importFrom(methods,.hasSlot)
9893
importFrom(methods,as)
9994
importFrom(methods,getMethod)
10095
importFrom(methods,is)
101-
importFrom(pillar,align)
102-
importFrom(pillar,get_extent)
103-
importFrom(pillar,style_subtle)
104-
importFrom(pillar,tbl_format_header)
10596
importFrom(pkgconfig,get_config)
10697
importFrom(purrr,imap)
10798
importFrom(purrr,map)
@@ -120,11 +111,9 @@ importFrom(rlang,enquos)
120111
importFrom(rlang,expr)
121112
importFrom(rlang,flatten_if)
122113
importFrom(rlang,is_spliced)
123-
importFrom(rlang,names2)
124114
importFrom(rlang,quo_is_null)
125115
importFrom(rlang,quo_name)
126116
importFrom(rlang,quo_squash)
127-
importFrom(stats,setNames)
128117
importFrom(stringr,regex)
129118
importFrom(stringr,str_detect)
130119
importFrom(stringr,str_replace)
@@ -148,4 +137,3 @@ importFrom(ttservice,bind_rows)
148137
importFrom(ttservice,plot_ly)
149138
importFrom(utils,packageDescription)
150139
importFrom(utils,tail)
151-
importFrom(vctrs,new_data_frame)

R/methods.R

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
#' @importFrom methods getMethod
2-
setMethod(
3-
f="show",
4-
signature="SummarizedExperiment",
5-
definition=function(object) {
6-
if (isTRUE(x=getOption(x="restore_SummarizedExperiment_show",
7-
default = FALSE)) |
8-
# If the object is a SingleCellExperiment
9-
# # From BioC 3_14 SingleCellExperiment is SummarizedExperiment and
10-
# # we don't want to process with tidySummarizedExperiment
11-
is(object, "SingleCellExperiment")
12-
) {
13-
f <- getMethod(
14-
f="show",
15-
signature="SummarizedExperiment",
16-
where=asNamespace(ns="SummarizedExperiment")
17-
)
18-
f(object=object)
19-
} else {
20-
object %>%
21-
print()
22-
}
23-
}
24-
)
25-
262
setClass("tidySummarizedExperiment",
273
contains=c("SummarizedExperiment", "RangedSummarizedExperiment"))
284

R/pillar_utilities.R

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1 @@
1-
NBSP <- "\U00A0"
21

3-
pillar___format_comment <- function (x, width)
4-
{
5-
if (length(x) == 0L) {
6-
return(character())
7-
}
8-
map_chr(x, pillar___wrap, prefix="# ",
9-
width=min(width, cli::console_width()))
10-
}
11-
12-
#' @importFrom fansi strwrap_ctl
13-
pillar___strwrap2 <- function (x, width, indent)
14-
{
15-
fansi::strwrap_ctl(x, width=max(width, 0), indent=indent,
16-
exdent=indent + 2)
17-
}
18-
19-
20-
pillar___wrap <- function (..., indent=0, prefix="", width)
21-
{
22-
x <- paste0(..., collapse="")
23-
wrapped <- pillar___strwrap2(x, width - get_extent(prefix), indent)
24-
wrapped <- paste0(prefix, wrapped)
25-
wrapped <- gsub(NBSP, " ", wrapped)
26-
paste0(wrapped, collapse="\n")
27-
}

R/print_method.R

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

R/utilities.R

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,22 +1286,6 @@ split_SummarizedExperiment_by_feature_to_list <- function(.data) {
12861286
map(1:nrow(.data), ~ .data[.x,])
12871287
}
12881288

1289-
#' Add attribute to abject
1290-
#'
1291-
#' @keywords internal
1292-
#' @noRd
1293-
#'
1294-
#'
1295-
#' @param var A tibble
1296-
#' @param attribute An object
1297-
#' @param name A character name of the attribute
1298-
#'
1299-
#' @return A tibble with an additional attribute
1300-
add_attr <- function(var, attribute, name) {
1301-
attr(var, name) <- attribute
1302-
var
1303-
}
1304-
13051289
is_filer_columns_in_column_selection <- function(.data, ...) {
13061290
# columns = enquos(columns)
13071291
tryCatch({

R/zzz.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#' @importFrom utils packageDescription
22
.onAttach <- function(libname, pkgname) {
33
attached <- tidyverse_attach()
4+
5+
# Print loading message about printing
6+
packageStartupMessage(
7+
"tidySummarizedExperiment says: Printing is now handled externally. ",
8+
"If you want to visualize the data in a tidy way, do library(tidyprint). ",
9+
"See https://github.com/tidyomics/tidyprint for more information."
10+
)
411
}

man/formatting.Rd

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

0 commit comments

Comments
 (0)