Skip to content

Commit

Permalink
change meta present messages to generic (liger and seurat compatible)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-marsh committed Apr 23, 2024
1 parent 93cd0f2 commit f6bbe00
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions R/Utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,6 @@ Meta_Present <- function(

# Set possible variables based on object type
possible_features <- colnames(x = Fetch_Meta(object = object))
# if (inherits(x = object, what = "Seurat")) {
# possible_features <- colnames(x = [email protected])
# }
#
# if (inherits(x = object, what = "liger")) {
# possible_features <- colnames(x = [email protected])
# }

# If any features not found
if (any(!meta_col_names %in% possible_features)) {
Expand All @@ -452,14 +445,14 @@ Meta_Present <- function(
if (isFALSE(return_none)) {
if (length(x = found_meta) < 1) {
cli_abort(message = c("No meta data columns found.",
"i" = "The following @meta.data columns were not found: {.field {glue_collapse_scCustom(input_string = bad_meta, and = TRUE)}}")
"i" = "The following meta data columns were not found: {.field {glue_collapse_scCustom(input_string = bad_meta, and = TRUE)}}")
)
}
}

# Return message of features not found
if (length(x = bad_meta) > 0 && isTRUE(x = omit_warn)) {
cli_warn(message = c("The following @meta.data columns were omitted as they were not found:",
cli_warn(message = c("The following meta data columns were omitted as they were not found:",
"i" = "{.field {glue_collapse_scCustom(input_string = bad_meta, and = TRUE)}}")
)
}
Expand All @@ -475,7 +468,7 @@ Meta_Present <- function(

# Print all found message if TRUE
if (isTRUE(x = print_msg)) {
cli_inform(message = "All @meta.data columns present.")
cli_inform(message = "All meta data columns present.")
}

# Return full input gene list.
Expand Down

0 comments on commit f6bbe00

Please sign in to comment.