Skip to content

Commit

Permalink
Merge pull request #441 from Qile0317/e2l
Browse files Browse the repository at this point in the history
re-export expression2List() with deprecation message
  • Loading branch information
ncborcherding authored Nov 11, 2024
2 parents f150f57 + 21193f8 commit 8c9e61e
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export(combineExpression)
export(combineTCR)
export(createHTOContigList)
export(exportClones)
export(expression2List)
export(getCirclize)
export(getContigDoublets)
export(highlightClones)
Expand Down
43 changes: 43 additions & 0 deletions R/deprecated.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#' ***DEPRECATED*** Take the meta data in seurat/SCE and place it into a list
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' Allows users to perform more fundamental measures of clonotype analysis
#' using the meta data from the seurat or SCE object. For Seurat objects the
#' active identity is automatically added as "cluster". Remaining grouping
#' parameters or SCE or Seurat objects must appear in the meta data.
#'
#' This function is deprecated as of version 2 due to the confusion it caused
#' to many users. Users are encouraged to remain with the abstraction barrier
#' of combined single cell objects and the outputs of [combineTCR()] and
#' [combineBCR()] for all functions.
#'
#' We discourage the use of this function, but if you have to use it, set the
#' `force` argument to `TRUE`.
#'
#' @param sc output of [combineExpression()].
#' @param ... previously the `group` or `split.by` argument, indicating the
#' column header to group the new list by. This should strictly be one argument
#' and is an ellipsis for backwards compatibility. Everything after the first
#' argument is ignored.
#' @param force logical. If not `TRUE` (default), a deprecation error will
#' be thrown. Otherwise the function will run but not guaranteed to be stable.
#'
#' @export
#' @return list derived from the meta data of single-cell object with
#' elements divided by the group parameter
#' @keywords internal
#'
expression2List <- function(sc, ..., force = FALSE) {

if (!force) {
lifecycle::deprecate_stop(
"2.0.0", "expression2List()",
details = "If you MUST use it, see `?expression2List`"
)
}

lifecycle::deprecate_soft("2.0.0", "expression2List()")
.expression2List(sc, list(...)[[1]])
}
40 changes: 40 additions & 0 deletions man/expression2List.Rd

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

0 comments on commit 8c9e61e

Please sign in to comment.