View source: R/search_neighbors.R
search_neighbors | R Documentation |
Search [shared] K-nearest neighbor graph to find the samples that are most similar to those matching a substring search.
search_neighbors(
seurat,
graph_name = NULL,
var1_search = NULL,
label_col = NULL,
var2_group = NULL,
group_col = NULL,
max_neighbors = Inf,
add_original_names = TRUE,
verbose = TRUE
)
seurat |
Seurat object. |
graph_name |
Name of the graph to use.
If none provided, will use the last graph available.
If no graphs are available, new ones will be computed using
|
var1_search |
Substring search term to filter var1 by. If a vector is supplied instead, this will be interpreted as an "or" query. |
label_col |
|
var2_group |
Substring search term to filter var2 by,
according to |
group_col |
|
max_neighbors |
The max number of neighbors (var2) per term (var1). |
add_original_names |
Add original names into the results. This can be useful when var1 names are forced to be unique internally. |
verbose |
Whether to print messages. |
data("pseudo_seurat")
### No group filter
top_neighbors <- search_neighbors(seurat = pseudo_seurat,
var1_search = "purkinje",
max_neighbors=5)
### With group filter
top_neighbors2 <- search_neighbors(seurat = pseudo_seurat,
var1_search = "purkinje",
var2_group = "human",
group_col = "species",
max_neighbors=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.