Skip to contents

Determine the number of neighbors per cell type for a cell of interest

Usage

inspect_k_nearest_neighbors(cell_id, nn_id_mat, group_varname, df_with_labels)

Arguments

cell_id

cell_id for which you want to assess its neighbors

nn_id_mat

output from dbscan::frNN()

group_varname

variable containing your labels for the cell_ids, e.g. cell type

df_with_labels

dataframe with 'cell_ids' and your 'group_varname'

Value

return dataframe with the columns: labels_of_neighbors, cell_id, n_total, and n_cells