Gene Relevance {destiny} | R Documentation

## Gene relevances for entire data set

### Description

The relevance map is cached insided of the `DiffusionMap`.

### Usage

    gene_relevance(coords, exprs, ..., k = 20L, dims = 1:2, distance = NULL,
      verbose = FALSE)

    ## S4 method for signature 'DiffusionMap,missing'
    gene_relevance(coords, exprs, ..., k = 20L,
      dims = 1:2, distance = NULL, verbose = FALSE)

    ## S4 method for signature 'matrix,matrix'
    gene_relevance(coords, exprs, ..., k = 20L,
      dims = 1:2, distance = NULL, verbose = FALSE)

### Arguments

`coords` | A `DiffusionMap` object or a cells \times dims `matrix`.
`exprs` | An cells \times genes `matrix`. Only provide if `coords` is no `DiffusionMap`.
`...` | If no `DiffusionMap` is provided, a vector of `weights` (of the same length as `dims`) can be provided.
`k` | Number of nearest neighbors to use
`dims` | Index into columns of `coord`
`distance` | Distance measure to use for the nearest neighbor search.
`verbose` | If TRUE, log additional info to the console

### Value

A `GeneRelevance` object:

### Slots

`coords`

  A cells \times dims `matrix` of coordinates (e.g. diffusion components), reduced to the dimensions passed as `dims`

`exprs`

  A cells \times genes matrix of expressions

`partials`

  Array of partial derivatives wrt to considered dimensions in reduced space (genes \times cells \times dimensions)

`partials_norm`

  Matrix with norm of aforementioned derivatives. (n\_genes \times cells)

`nn_index`

  Matrix of k nearest neighbor indices. (cells \times k)

`dims`

  Column index for plotted dimensions. Can `character`, `numeric` or `logical`

`distance`

  Distance measure used in the nearest neighbor search. See `find_knn`

### See Also

Gene Relevance methods, Gene Relevance plotting: `plot_gradient_map`/`plot_gene_relevance`

### Examples

    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!

[Package destiny version 2.6.2 Index]