Gene-Relevance: Gene relevances for entire data set

Description Usage Arguments Value Slots See Also Examples

Description

The relevance map is cached insided of the DiffusionMap.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
gene_relevance(
  coords,
  exprs,
  ...,
  k = 20L,
  dims = 1:2,
  distance = NULL,
  smooth = TRUE,
  remove_outliers = FALSE,
  verbose = FALSE
)

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

## S4 method for signature 'matrix,dMatrixOrMatrix'
gene_relevance(
  coords,
  exprs,
  ...,
  pcs = NULL,
  knn_params = list(),
  weights = 1,
  k,
  dims,
  distance,
  smooth,
  remove_outliers,
  verbose
)

Arguments

coords

A DiffusionMap object or a cells \times dims matrix.

exprs

An cells \times genes matrix. Only provide if coords is no DiffusionMap.

...

Unused. All parameters to the right of the ... have to be specified by name.

k

Number of nearest neighbors to use

dims

Index into columns of coord

distance

Distance measure to use for the nearest neighbor search.

smooth

Smoothing parameters c(window, alpha) (see smth.gaussian). Alternatively TRUE to use the smoother defaults or FALSE to skip smoothing,

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 n_pcs matrix of principal components to use for the distances.

knn_params

A list of parameters for find_knn.

weights

Weights for the partial derivatives. A vector of the same length as dims.

Value

A GeneRelevance object:

Slots

coords

A cells \times dims matrix or sparseMatrix 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

smooth_window

Smoothing window used (see smth.gaussian)

smooth_alpha

Smoothing kernel width used (see smth.gaussian)

See Also

Gene Relevance methods, Gene Relevance plotting: plot_differential_map/plot_gene_relevance

Examples

1
2
3
4
5
6
7
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!

destiny documentation built on Nov. 8, 2020, 7:38 p.m.