Feature_Present {scCustomize} | R Documentation |
Check if genes/features are present
Description
Check if genes are present in object and return vector of found genes. Return warning messages for genes not found.
Usage
Feature_Present(
data,
features,
case_check = TRUE,
case_check_msg = TRUE,
print_msg = TRUE,
omit_warn = TRUE,
return_none = FALSE,
seurat_assay = NULL
)
Arguments
data |
Name of input data. Currently only data of classes: Seurat, liger, data.frame, dgCMatrix, dgTMatrix, tibble are accepted. Gene_IDs must be present in rownames of the data. |
features |
vector of features to check. |
case_check |
logical. Whether or not to check if features are found if the case is changed from the input list (Sentence case to Upper and vice versa). Default is TRUE. |
case_check_msg |
logical. Whether to print message to console if alternate case features are found in addition to inclusion in returned list. Default is TRUE. |
print_msg |
logical. Whether message should be printed if all features are found. Default is TRUE. |
omit_warn |
logical. Whether to print message about features that are not found in current object. Default is TRUE. |
return_none |
logical. Whether list of found vs. bad features should still be returned if no features are found. Default is FALSE. |
seurat_assay |
Name of assay to pull feature names from if |
Value
A list of length 3 containing 1) found features, 2) not found features, 3) features found if case was modified.
Examples
## Not run:
features <- Feature_Present(data = obj_name, features = DEG_list, print_msg = TRUE,
case_check = TRUE)
found_features <- features[[1]]
## End(Not run)