This function will construct a weighted nearest neighbor (WNN) graph. For each cell, we identify the nearest neighbors based on a weighted combination of two modalities. Takes as input two dimensional reductions, one computed for each modality.Other parameters are listed for debugging, but can be left as default values.
FindMultiModalNeighbors( object, reduction.list, dims.list, k.nn = 20, l2.norm = TRUE, knn.graph.name = "wknn", snn.graph.name = "wsnn", weighted.nn.name = "weighted.nn", modality.weight.name = NULL, knn.range = 200, prune.SNN = 1/15, sd.scale = 1, cross.contant.list = NULL, smooth = FALSE, return.intermediate = FALSE, modality.weight = NULL, verbose = TRUE )
A Seurat object
A list of two dimensional reductions, one for each of the modalities to be integrated
A list containing the dimensions for each reduction to use
the number of multimodal neighbors to compute. 20 by default
Perform L2 normalization on the cell embeddings after dimensional reduction. TRUE by default.
Multimodal knn graph name
Multimodal snn graph name
Multimodal neighbor object name
Variable name to store modality weight in object meta data
The number of approximate neighbors to compute
Cutoff not to discard edge in SNN graph
The scaling factor for kernel width. 1 by default
Constant used to avoid divide-by-zero errors. 1e-4 by default
Smoothing modality score across each individual modality neighbors. FALSE by default
Store intermediate results in misc
Print progress bars and output
Seurat object containing a nearest-neighbor object, KNN graph, and SNN graph - each based on a weighted combination of modalities.