Skip to content

Commit 589a02d

Browse files
authored
Merge pull request #104 from stemangiola/adapt-ggplot-S7
No major adaptations are needed for ggplot2 s7
2 parents 987165f + 7038138 commit 589a02d

File tree

9 files changed

+49
-38
lines changed

9 files changed

+49
-38
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
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.15.1
4+
Version: 1.19.1
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
@@ -55,7 +55,7 @@ Biarch: true
5555
biocViews: AssayDomain, Infrastructure, RNASeq, DifferentialExpression, GeneExpression, Normalization, Clustering, QualityControl, Sequencing, Transcription, Transcriptomics
5656
Encoding: UTF-8
5757
LazyData: true
58-
RoxygenNote: 7.3.1
58+
RoxygenNote: 7.3.2
5959
Roxygen: list(markdown = TRUE)
6060
LazyDataCompression: xz
6161
URL: https://github.com/stemangiola/tidySummarizedExperiment

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ importFrom(SummarizedExperiment,elementMetadata)
6060
importFrom(SummarizedExperiment,rbind)
6161
importFrom(SummarizedExperiment,rowData)
6262
importFrom(SummarizedExperiment,rowRanges)
63+
importFrom(cli,col_br_black)
6364
importFrom(dplyr,count)
6465
importFrom(dplyr,distinct)
6566
importFrom(dplyr,distinct_at)

R/ggplot2_methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' @name ggplot
22
#' @rdname ggplot
33
#' @inherit ggplot2::ggplot
4-
#' @title Create a new \code{ggplot} from a \code{tidyseurat}
4+
#' @title Create a new \code{ggplot} from a \code{SummarizedExperiment}
55
#' @return `ggplot`
66
#'
77
#' @examples

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Here we plot the distribution of counts per sample.
209209

210210
```{r plot1}
211211
pasilla_tidy %>%
212-
tidySummarizedExperiment::ggplot(aes(counts + 1, group=.sample, color=`type`)) +
212+
ggplot(aes(counts + 1, group=.sample, color=`type`)) +
213213
geom_density() +
214214
scale_x_log10() +
215215
my_theme

README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,35 @@ tidySummarizedExperiment - part of tidytranscriptomics
22
================
33

44
<!-- badges: start -->
5-
5+
66
[![Lifecycle:maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
77
[![R build
88
status](https://github.com/stemangiola/tidySummarizedExperiment/workflows/R-CMD-check-bioc/badge.svg)](https://github.com/stemangiola/tidySummarizedExperiment/actions)
99
<!-- badges: end -->
1010

11-
**Brings SummarizedExperiment to the tidyverse!**
11+
**Brings SummarizedExperiment to the tidyverse!**
1212

1313
website:
1414
[stemangiola.github.io/tidySummarizedExperiment/](https://stemangiola.github.io/tidySummarizedExperiment/)
1515

16-
Another [nice introduction](https://carpentries-incubator.github.io/bioc-intro/60-next-steps/index.html) by carpentries-incubator.
16+
Another [nice
17+
introduction](https://carpentries-incubator.github.io/bioc-intro/60-next-steps/index.html)
18+
by carpentries-incubator.
1719

1820
Please also have a look at
1921

20-
- [tidySingleCellExperiment](https://stemangiola.github.io/tidySingleCellExperiment/)
21-
for tidy manipulation of SingleCellExperiment objects
22-
- [tidyseurat](https://stemangiola.github.io/tidyseurat/) for tidy
23-
manipulation of Seurat objects
24-
- [tidybulk](https://stemangiola.github.io/tidybulk/) for tidy
25-
analysis of RNA sequencing data
26-
- [nanny](https://github.com/stemangiola/nanny) for tidy high-level
27-
data analysis and manipulation
28-
- [tidygate](https://github.com/stemangiola/tidygate) for adding
29-
custom gate information to your tibble
30-
- [tidyHeatmap](https://stemangiola.github.io/tidyHeatmap/) for
31-
heatmaps produced with tidy principles
22+
- [tidySingleCellExperiment](https://stemangiola.github.io/tidySingleCellExperiment/)
23+
for tidy manipulation of SingleCellExperiment objects
24+
- [tidyseurat](https://stemangiola.github.io/tidyseurat/) for tidy
25+
manipulation of Seurat objects
26+
- [tidybulk](https://stemangiola.github.io/tidybulk/) for tidy analysis
27+
of RNA sequencing data
28+
- [nanny](https://github.com/stemangiola/nanny) for tidy high-level data
29+
analysis and manipulation
30+
- [tidygate](https://github.com/stemangiola/tidygate) for adding custom
31+
gate information to your tibble
32+
- [tidyHeatmap](https://stemangiola.github.io/tidyHeatmap/) for heatmaps
33+
produced with tidy principles
3234

3335
# Introduction
3436

@@ -43,9 +45,9 @@ tidyverse worlds.
4345

4446
## Functions/utilities available
4547

46-
| SummarizedExperiment-compatible Functions | Description |
47-
|-------------------------------------------|------------------------------------------------------------------------------------|
48-
| `all` | After all `tidySummarizedExperiment` is a SummarizedExperiment object, just better |
48+
| SummarizedExperiment-compatible Functions | Description |
49+
|----|----|
50+
| `all` | After all `tidySummarizedExperiment` is a SummarizedExperiment object, just better |
4951

5052
| tidyverse Packages | Description |
5153
|--------------------|---------------------------------------------|
@@ -98,7 +100,7 @@ pasilla_tidy
98100
```
99101

100102
## # A SummarizedExperiment-tibble abstraction: 102,193 × 5
101-
## [90m# Transcripts=14599 | Samples=7 | Assays=counts[39m
103+
## # Features=14599 | Samples=7 | Assays=counts
102104
## .feature .sample counts condition type
103105
## <chr> <chr> <int> <chr> <chr>
104106
## 1 FBgn0000003 untrt1 0 untreated single_end
@@ -111,7 +113,7 @@ pasilla_tidy
111113
## 8 FBgn0000024 untrt1 10 untreated single_end
112114
## 9 FBgn0000028 untrt1 0 untreated single_end
113115
## 10 FBgn0000032 untrt1 1446 untreated single_end
114-
## # … with 40 more rows
116+
## # 40 more rows
115117

116118
**But it is a SummarizedExperiment object after all**
117119

@@ -136,7 +138,7 @@ pasilla_tidy %>%
136138
```
137139

138140
## # A SummarizedExperiment-tibble abstraction: 1 × 5
139-
## [90m# Transcripts=1 | Samples=1 | Assays=counts[39m
141+
## # Features=1 | Samples=1 | Assays=counts
140142
## .feature .sample counts condition type
141143
## <chr> <chr> <int> <chr> <chr>
142144
## 1 FBgn0000003 untrt1 0 untreated single_end
@@ -149,7 +151,7 @@ pasilla_tidy %>%
149151
```
150152

151153
## # A SummarizedExperiment-tibble abstraction: 58,396 × 5
152-
## [90m# Transcripts=14599 | Samples=4 | Assays=counts[39m
154+
## # Features=14599 | Samples=4 | Assays=counts
153155
## .feature .sample counts condition type
154156
## <chr> <chr> <int> <chr> <chr>
155157
## 1 FBgn0000003 untrt1 0 untreated single_end
@@ -162,7 +164,7 @@ pasilla_tidy %>%
162164
## 8 FBgn0000024 untrt1 10 untreated single_end
163165
## 9 FBgn0000028 untrt1 0 untreated single_end
164166
## 10 FBgn0000032 untrt1 1446 untreated single_end
165-
## # … with 40 more rows
167+
## # 40 more rows
166168

167169
We can use `select` to choose columns.
168170

@@ -184,7 +186,7 @@ pasilla_tidy %>%
184186
## 8 untrt1
185187
## 9 untrt1
186188
## 10 untrt1
187-
## # … with 102,183 more rows
189+
## # 102,183 more rows
188190

189191
We can use `count` to count how many rows we have for each sample.
190192

@@ -231,7 +233,7 @@ pasilla_tidy %>%
231233
```
232234

233235
## # A SummarizedExperiment-tibble abstraction: 102,193 × 5
234-
## [90m# Transcripts=14599 | Samples=7 | Assays=counts[39m
236+
## # Features=14599 | Samples=7 | Assays=counts
235237
## .feature .sample counts condition sequencing
236238
## <chr> <chr> <int> <chr> <chr>
237239
## 1 FBgn0000003 untrt1 0 untreated single_end
@@ -244,7 +246,7 @@ pasilla_tidy %>%
244246
## 8 FBgn0000024 untrt1 10 untreated single_end
245247
## 9 FBgn0000028 untrt1 0 untreated single_end
246248
## 10 FBgn0000032 untrt1 1446 untreated single_end
247-
## # … with 40 more rows
249+
## # 40 more rows
248250

249251
We could use `mutate` to create a column. For example, we could create a
250252
new type column that contains single and paired instead of single_end
@@ -256,7 +258,7 @@ pasilla_tidy %>%
256258
```
257259

258260
## # A SummarizedExperiment-tibble abstraction: 102,193 × 5
259-
## [90m# Transcripts=14599 | Samples=7 | Assays=counts[39m
261+
## # Features=14599 | Samples=7 | Assays=counts
260262
## .feature .sample counts condition type
261263
## <chr> <chr> <int> <chr> <chr>
262264
## 1 FBgn0000003 untrt1 0 untreated single
@@ -269,7 +271,7 @@ pasilla_tidy %>%
269271
## 8 FBgn0000024 untrt1 10 untreated single
270272
## 9 FBgn0000028 untrt1 0 untreated single
271273
## 10 FBgn0000032 untrt1 1446 untreated single
272-
## # … with 40 more rows
274+
## # 40 more rows
273275

274276
We could use `unite` to combine multiple columns into a single column.
275277

@@ -279,7 +281,7 @@ pasilla_tidy %>%
279281
```
280282

281283
## # A SummarizedExperiment-tibble abstraction: 102,193 × 4
282-
## [90m# Transcripts=14599 | Samples=7 | Assays=counts[39m
284+
## # Features=14599 | Samples=7 | Assays=counts
283285
## .feature .sample counts group
284286
## <chr> <chr> <int> <chr>
285287
## 1 FBgn0000003 untrt1 0 untreated_single_end
@@ -292,7 +294,7 @@ pasilla_tidy %>%
292294
## 8 FBgn0000024 untrt1 10 untreated_single_end
293295
## 9 FBgn0000028 untrt1 0 untreated_single_end
294296
## 10 FBgn0000032 untrt1 1446 untreated_single_end
295-
## # … with 40 more rows
297+
## # 40 more rows
296298

297299
We can also combine commands with the tidyverse pipe `%>%`.
298300

@@ -340,7 +342,7 @@ pasilla_tidy %>%
340342
## 8 FBgn0000024 untrt1 10 untreated single_end 7
341343
## 9 FBgn0000028 untrt1 0 untreated single_end 0.429
342344
## 10 FBgn0000032 untrt1 1446 untreated single_end 1085.
343-
## # … with 86,503 more rows
345+
## # 86,503 more rows
344346

345347
# Plotting
346348

@@ -371,7 +373,7 @@ Here we plot the distribution of counts per sample.
371373

372374
``` r
373375
pasilla_tidy %>%
374-
tidySummarizedExperiment::ggplot(aes(counts + 1, group=.sample, color=`type`)) +
376+
ggplot(aes(counts + 1, group=.sample, color=`type`)) +
375377
geom_density() +
376378
scale_x_log10() +
377379
my_theme

inst/NEWS.rd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
\name{NEWS}
22
\title{News for Package \pkg{tidySummarizedExperiment}}
33

4+
\section{Changes in version 1.16.0, Bioconductor 3.22 Release}{
5+
\itemize{
6+
\item Updated documentation to properly reflect S3 method structure.
7+
\item Simplified ggplot2 compatibility - S3 method continues to work with ggplot2 4.0.0.
8+
}}
9+
410
\section{Changes in version 1.4.0, Bioconductor 3.14 Release}{
511
\itemize{
612
\item Improved join_*() functions.

man/as_tibble.Rd

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

man/formatting.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ggplot.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)