The approximate nature of the nearest neighbour search algorithm used to
compute the knn graph makes the resulting adjacency matrix asymmetric.
Those functions symmetrize a Graph or a Neighbor object.
Usage
SymmetrizeKnn(object, graph.name = "RNA_nn", use.max = TRUE, assay = NULL)
# S4 method for class 'Seurat'
SymmetrizeKnn(object, graph.name = "RNA_nn", use.max = TRUE, assay = NULL)
# S4 method for class 'Matrix'
SymmetrizeKnn(object, use.max = TRUE)
# S4 method for class 'Graph'
SymmetrizeKnn(object, use.max = TRUE)
# S4 method for class 'Neighbor'
SymmetrizeKnn(object, use.max = TRUE)Arguments
- object
a
Seurat,GraphorNeighborobject- graph.name
name of a
GraphorNeighborinstance stored in theSeurat object.- use.max
by default, use the maximum value in case of discrepancy between m[i,j] and m[j,i]. Set to
FALSEto use the minimum value.- assay
name of the assay to store in the output
Graph
See also
The classes Graph and
Neighbor and
symmetrize.pmax.sparse
