Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
william-hutchison committed Aug 31, 2023
1 parent 4c939a8 commit 3374ced
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 38 deletions.
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export(rowwise)
export(slice)
export(summarise)
export(unnest_single_cell_experiment)
import(dplyr)
import(tidyr)
importFrom(BiocGenerics,cbind)
importFrom(BiocGenerics,rbind)
importFrom(Matrix,rowSums)
Expand Down Expand Up @@ -94,6 +92,7 @@ importFrom(rlang,quo_is_symbol)
importFrom(rlang,quo_is_symbolic)
importFrom(rlang,quo_name)
importFrom(rlang,quo_squash)
importFrom(rlang,sym)
importFrom(stringr,regex)
importFrom(stringr,str_detect)
importFrom(stringr,str_replace_all)
Expand All @@ -105,6 +104,7 @@ importFrom(tidyr,nest)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,separate)
importFrom(tidyr,spread)
importFrom(tidyr,unite)
importFrom(tidyr,unnest)
importFrom(tidyselect,eval_select)
importFrom(ttservice,bind_cols)
Expand Down
19 changes: 1 addition & 18 deletions R/dplyr_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ bind_cols_ = function(..., .id=NULL) {
#' @examples
#' example(read10xVisium)
#' spe |>
#' bind_cols(
#' spe |>
#' select(array_row)
#' )
#' bind_cols(1:99)
#'
#' @export
bind_cols.SpatialExperiment <- bind_cols_
Expand Down Expand Up @@ -452,20 +449,6 @@ NULL
#' arrange(array_row)
NULL

#' @name bind_rows
#' @rdname bind_rows
#' @inherit ttservice::bind_rows
#'
#' @examples
#' example(read10xVisium)
#' spe |>
#' bind_rows(spe)
#' spe |>
#' bind_cols(1:99)
#'
#' @name bind
NULL

#' @name rename
#' @rdname rename
#' @inherit dplyr::rename
Expand Down
2 changes: 1 addition & 1 deletion R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ aggregate_cells <- function(.data, .sample = NULL, slot = "data", assays = NULL,

# Get counts
~ .x %>%
aggregation_function(na.rm = T) %>%
aggregation_function(na.rm = TRUE) %>%
enframe(
name = "feature",
value = sprintf("%s", .y)
Expand Down
2 changes: 1 addition & 1 deletion R/tibble_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ as_tibble.SpatialExperiment <- function(x, ...,
when(

# Only if I have reduced dimensions and special datasets
ncol(x@int_colData@listData$reducedDims) > 0 ~ (.) %>% dplyr::bind_cols(
ncol(x@int_colData@listData$reducedDims) > 0 ~ (.) %>% cbind(
special_datasets_to_tibble(x, ...)
),

Expand Down
5 changes: 0 additions & 5 deletions R/tidybulk_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
#' @keywords internal
#' @noRd
#'
#' @import dplyr
#' @import tidyr
#' @importFrom purrr as_mapper
#' @importFrom magrittr equals
#'
#' @param .x A tibble
#' @param .p A boolean
Expand Down Expand Up @@ -79,8 +76,6 @@ get_x_y_annotation_columns <- tidySingleCellExperiment:::get_x_y_annotation_colu
#' @keywords internal
#' @noRd
#'
#' @import dplyr
#' @import tidyr
#' @importFrom magrittr set_rownames
#' @importFrom rlang quo_is_null
#'
Expand Down
2 changes: 2 additions & 0 deletions R/tidyr_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ unnest_single_cell_experiment <- function(data, cols, ..., keep_empty=FALSE, p
#' @importFrom tidyr nest
#' @importFrom rlang enquos
#' @importFrom rlang :=
#' @importFrom rlang sym
#' @export
nest.SpatialExperiment <- function(.data, ..., .names_sep = NULL) {
cols <- enquos(...)
Expand Down Expand Up @@ -139,6 +140,7 @@ extract.SpatialExperiment <- function(data, col, into, regex="([[:alnum:]]+)", r
#' spe |>
#' unite("A", array_row:array_col)
#'
#' @importFrom tidyr unite
#' @importFrom SummarizedExperiment colData
#' @importFrom SummarizedExperiment colData<-
#' @export
Expand Down
11 changes: 1 addition & 10 deletions man/bind_rows.Rd

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

2 changes: 1 addition & 1 deletion man/right_join.Rd

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

0 comments on commit 3374ced

Please sign in to comment.