The relevance map is cached insided of the DiffusionMap.
gene_relevance(coords, exprs, ..., k = 20L, dims = 1:2, distance = NULL, smooth = TRUE, remove_outliers = FALSE, verbose = FALSE) # S4 method for DiffusionMap,missing gene_relevance(coords, exprs, ..., k = 20L, dims = 1:2, distance = NULL, smooth = TRUE, remove_outliers = FALSE, verbose = FALSE) # S4 method for matrix,dMatrixOrMatrix gene_relevance(coords, exprs, ..., pcs = NULL, knn_params = list(), weights = 1, k, dims, distance, smooth, remove_outliers, verbose)
| coords | A |
|---|---|
| exprs | An cells \(\times\) genes |
| ... | Unused. All parameters to the right of the |
| k | Number of nearest neighbors to use |
| dims | Index into columns of |
| distance | Distance measure to use for the nearest neighbor search. |
| smooth | Smoothing parameters |
| remove_outliers | Remove cells that are only within one other cell's nearest neighbor, as they tend to get large norms. |
| verbose | If TRUE, log additional info to the console |
| pcs | A cell \(\times\) |
| knn_params | |
| weights | Weights for the partial derivatives. A vector of the same length as |
A GeneRelevance object:
coordsA cells \(\times\) dims matrix or sparseMatrix
of coordinates (e.g. diffusion components), reduced to the dimensions passed as dims
exprsA cells \(\times\) genes matrix of expressions
partialsArray of partial derivatives wrt to considered dimensions in reduced space (genes \(\times\) cells \(\times\) dimensions)
partials_normMatrix with norm of aforementioned derivatives. (n\_genes \(\times\) cells)
nn_indexMatrix of k nearest neighbor indices. (cells \(\times\) k)
dimsColumn index for plotted dimensions. Can character, numeric or logical
distanceDistance measure used in the nearest neighbor search. See find_knn
smooth_windowSmoothing window used (see smth.gaussian)
smooth_alphaSmoothing kernel width used (see smth.gaussian)
Gene Relevance methods, Gene Relevance plotting: plot_differential_map/plot_gene_relevance
data(guo_norm) dm <- DiffusionMap(guo_norm) gr <- gene_relevance(dm) m <- t(Biobase::exprs(guo_norm)) gr_pca <- gene_relevance(prcomp(m)$x, m) # now plot them!