shortcut filter and pull function compatible with annotation files created by Create_Cluster_Annotation_File by default but also any other csv file.

Pull_Cluster_Annotation(
  annotation = NULL,
  cluster_name_col = "cluster",
  cell_type_col = "cell_type"
)

Arguments

annotation

name of the data.frame/tibble or path to CSV file containing cluster annotation.

cluster_name_col

name of column containing cluster names/numbers (default is "cluster").

cell_type_col

name of column contain the cell type annotation (default is "cell_type").

Value

a list of named vectors for every cell type in the cell_type_col column of the annotation table and vectors new cluster names (for use with Rename_Clusters function or manual identity renaming).

Examples

if (FALSE) {
# If pulling from a data.frame/tibble
cluster_annotation <- Pull_Cluster_Annotation(annotation = annotation_df,
cluster_name_col = "cluster", cell_type_col = "cell_type")

# If pulling from csv file
cluster_annotation <- Pull_Cluster_Annotation(annotation = "file_path/file_name.csv",
cluster_name_col = "cluster", cell_type_col = "cell_type")
}