Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-export expression2List() with deprecation message #441

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading