Skip to content

Commit 195a24b

Browse files
committed
Modify import statements for dplyr and tidyr, enhance documentation links, and refine example code in the introduction vignette for clarity and uniqueness.
1 parent c2ea8b8 commit 195a24b

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
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: tidySingleCellExperiment
33
Title: Brings SingleCellExperiment to the Tidyverse
4-
Version: 1.19.2
4+
Version: 1.19.3
55
Authors@R: c(person("Stefano", "Mangiola",
66
comment=c(ORCID="0000-0001-7474-836X"),
77
@@ -71,6 +71,6 @@ biocViews:
7171
AssayDomain, Infrastructure, RNASeq, DifferentialExpression, SingleCell,
7272
GeneExpression, Normalization, Clustering, QualityControl, Sequencing
7373
Encoding: UTF-8
74-
RoxygenNote: 7.3.2
74+
RoxygenNote: 7.3.3
7575
URL: https://github.com/stemangiola/tidySingleCellExperiment
7676
BugReports: https://github.com/stemangiola/tidySingleCellExperiment/issues

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ importFrom(dplyr,group_split)
8383
importFrom(dplyr,inner_join)
8484
importFrom(dplyr,left_join)
8585
importFrom(dplyr,mutate)
86+
importFrom(dplyr,n)
8687
importFrom(dplyr,pull)
8788
importFrom(dplyr,rename)
8889
importFrom(dplyr,right_join)

R/dplyr_methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ filter.SingleCellExperiment <- function(.data, ..., .preserve=FALSE) {
198198
#' @name group_by
199199
#' @rdname group_by
200200
#' @inherit dplyr::group_by
201-
#' @seealso \code{}
201+
#' @seealso \code{\link[dplyr]{group_by}}
202202
#'
203203
#' @examples
204204
#' data(pbmc_small)

R/methods.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ tidy.SingleCellExperiment <- function(object) {
157157
#' @importFrom dplyr mutate
158158
#' @importFrom dplyr pull
159159
#' @importFrom dplyr left_join
160-
#' @importFrom dplyr unnest
160+
#' @importFrom tidyr unnest
161161
#' @importFrom S4Vectors DataFrame
162162
#' @importFrom methods as
163163
#'
@@ -170,6 +170,9 @@ setMethod("aggregate_cells", "SingleCellExperiment", function(.data,
170170

171171
# Fix NOTEs
172172
feature <- NULL
173+
.feature <- NULL
174+
my_id_to_split_by___ <- NULL
175+
assay_name <- NULL
173176
.sample <- enquo(.sample)
174177

175178
# Subset only wanted assays

R/tidyr_methods.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ unnest_single_cell_experiment <- function(data, cols, ...,
9393
#' @importFrom tidyr nest
9494
#' @importFrom rlang enquos
9595
#' @importFrom rlang :=
96+
#' @importFrom dplyr n
9697
#' @export
9798
nest.SingleCellExperiment <- function(.data, ..., .names_sep = NULL) {
9899

man/group_by.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.

vignettes/introduction.Rmd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Here we plot abundance of two features for each group.
184184

185185
```{r}
186186
pbmc_small_polished %>%
187-
join_features(features=c("HLA-DRA", "LYZ")) %>%
187+
join_features(features=c("HLA-DRA", "LYZ"), shape="long") %>%
188188
ggplot(aes(groups, .abundance_counts + 1, fill=groups)) +
189189
geom_boxplot(outlier.shape=NA) +
190190
geom_jitter(aes(size=nCount_RNA), alpha=0.5, width=0.2) +
@@ -267,11 +267,12 @@ marker_genes <-
267267
map(~ .x %>%
268268
head(10) %>%
269269
rownames()) %>%
270-
unlist()
270+
unlist() %>%
271+
unique()
271272
272273
# Plot heatmap
273274
pbmc_small_cluster %>%
274-
join_features(features=marker_genes) %>%
275+
join_features(features=marker_genes, shape="long") %>%
275276
group_by(label) %>%
276277
heatmap(
277278
.row=.feature, .column=.cell,

0 commit comments

Comments
 (0)