Skip to content

Commit 2f6f6b1

Browse files
authored
Merge pull request #115 from tidyomics/change-default-to-wide-for-join_features
Change default shape parameter in join_features() and join_transcript…
2 parents 640ef9d + cd7ce8a commit 2f6f6b1

File tree

12 files changed

+33
-20
lines changed

12 files changed

+33
-20
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ setClass("tidySingleCellExperiment", contains="SingleCellExperiment")
4040
#' @importFrom stringr str_subset
4141
#' @export
4242
setMethod("join_features", "SingleCellExperiment", function(.data,
43-
features=NULL, all=FALSE, exclude_zeros=FALSE, shape="long", ...) {
43+
features=NULL, all=FALSE, exclude_zeros=FALSE, shape="wide", ...) {
4444
# CRAN Note
4545
.cell <- NULL
4646
.feature <- NULL
@@ -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/methods_DEPRECATED.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ join_transcripts <-
3535
transcripts=NULL,
3636
all=FALSE,
3737
exclude_zeros=FALSE,
38-
shape="long", ...)
38+
shape="wide", ...)
3939
{
4040
UseMethod("join_transcripts", .data)
4141
}
@@ -45,7 +45,7 @@ join_transcripts.default <-
4545
transcripts=NULL,
4646
all=FALSE,
4747
exclude_zeros=FALSE,
48-
shape="long", ...)
48+
shape="wide", ...)
4949
{
5050
print("tidySingleCellExperiment says:",
5151
" This function cannot be applied to this object")
@@ -56,7 +56,7 @@ join_transcripts.Seurat <-
5656
transcripts=NULL,
5757
all=FALSE,
5858
exclude_zeros=FALSE,
59-
shape="long", ...)
59+
shape="wide", ...)
6060
{
6161
deprecate_warn(
6262
"1.1.2", "join_transcripts()",

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

inst/NEWS.rd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@
2323
\item Use .cell for cell column name to avoid errors when cell column is defined by the user
2424
}}
2525

26+
\section{Changes in version 1.19.2, Bioconductor 3.22 Release}{
27+
\itemize{
28+
\item \strong{BREAKING CHANGE}: Changed default shape parameter in \code{join_features()} from "long" to "wide".
29+
This means that \code{join_features()} now returns a SingleCellExperiment object by default instead of a tibble.
30+
To get the old behavior, explicitly specify \code{shape="long"}.
31+
}}
32+

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.

man/join_features.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/join_transcripts.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)