run_motif_embedding {motifcluster}R Documentation

Run motif embedding

Description

Calculate a motif adjacency matrix for a given motif and motif type, restrict it to its largest connected component, and then run Laplace embedding with specified Laplacian type and number of eigenvalues and eigenvectors.

Usage

run_motif_embedding(
  adj_mat,
  motif_name,
  motif_type = c("struc", "func"),
  mam_weight_type = c("unweighted", "mean", "product"),
  mam_method = c("sparse", "dense"),
  num_eigs = 2,
  type_lap = c("comb", "rw"),
  restrict = TRUE
)

Arguments

adj_mat

Adjacency matrix to be embedded.

motif_name

Motif used for the motif adjacency matrix.

motif_type

Type of motif adjacency matrix to use. One of "func" or "struc".

mam_weight_type

Weighting scheme for the motif adjacency matrix. One of "unweighted", "mean" or "product".

mam_method

The method to use for building the motif adjacency matrix. One of "sparse" or "dense".

num_eigs

Number of eigenvalues and eigenvectors for the embedding.

type_lap

Type of Laplacian for the embedding. One of "comb" or "rw".

restrict

Whether or not to restrict the motif adjacency matrix to its largest connected component before embedding.

Value

A list with 7 entries:

Examples

adj_mat <- matrix(c(1:9), nrow = 3)
run_motif_embedding(adj_mat, "M1", "func")

[Package motifcluster version 0.2.3 Index]