Set Cell Subset Name

SetSubsetName(gate_obj, new_name)

Arguments

gate_obj

a single Gate class object

new_name

character. New name of cell subset

Value

Gate object with new name of subset cells in name_subset_cells slot

Examples


# An internal function to change the name of the cell selection
example_gate <- Gate(counter = as.integer(1), 
                   assay_name = "example", 
                   input_cells = list(c("a", "b", "c")),
                   input_coords =  data.frame(x=c(1,2,3),y=c(4,5,6)),
                   subset_cells = list(c("a","b")), 
                   subset_coords = data.frame(x=c(1,2),y=c(4,5)), 
                   x_axis = "ADT-A", 
                   y_axis = "ADT-B", 
                   gate_coords = list(x=c(1,2,3,4),y=c(5,6,7,8)), 
                   name_subset_cells = "example_cells_A", 
                   num_input_cells = as.integer(1000), 
                   num_subset_cells = as.integer(500), 
                   total_num_cells_in_sample = as.integer(1000),
                   pct_subset_from_previous = 50, 
                   pct_subset_from_total = 50)
                   
# Change cell subset name name from "example_cells_A" to "custom_name"
example_gate <- SetSubsetName(example_gate, "custom_name")