list_motifs: Lists motifs of a given class or all motifs with a given...

Description Usage Arguments Value Examples

View source: R/count_motifs.R

Description

Returns a dataframe with one row for each instance of the motif specified by the given motif identifier string. If the identifier string specifies a motif class, e.g. 1,2[I.A], then only motifs of the given class are returned. If the identifier string specifies a signature, e.g. 1,2, then a full list of all motifs of this signature is returned. In the latter case, the dataframe contains an additional column stating the classes of the motifs. The naming scheme of the columns is as follows: Each column is called levelA_nodeB where A is the lvl_attr of the nodes in the column and B the index of the nodes among the nodes on the same level. This index stems from the internal order of the nodes and does not carry any specific meaning.

Usage

1
list_motifs(net, identifier, lvl_attr = "sesType", directed = NULL)

Arguments

net

network object

identifier

motif identifier string (with or without class, see above)

lvl_attr

character vector specifying the attribute name where level information is stored in net.

directed

whether the graph shall be treated as a directed graph. Per default (NULL), this is determined automatically using the structure of the provided network object

Value

data frame with one row for each motif

Examples

1
2
3
4
## Not run: 
head(list_motifs(ml_net, "1,2[I.C]", directed = FALSE))

## End(Not run)

motifr documentation built on Dec. 15, 2020, 5:23 p.m.