subgraphs: Extract Specific Motif Instances (Subgraphs)

View source: R/motifs-api.R

subgraphsR Documentation

Extract Specific Motif Instances (Subgraphs)

Description

Calls motifs(x, named_nodes = TRUE, ...). By default (strict = TRUE) the result has one row per node triple and labelled pattern: the shape and the direction of every arrow are fixed, so a cycle and its reverse are different rows. At individual level, observed counts the units in which the triple shows exactly that pattern, so one triple can occupy several rows. strict = FALSE pools the patterns of each MAN type into one row. One MAN type can also appear in many rows, each with its own z and p. Per-triple significance is plotted by plot(., type = "significance") and plot(., type = "triads"). The per-type plots ("types", "patterns") omit significance for instance results.

Usage

subgraphs(...)

Arguments

...

Arguments forwarded to motifs(), which documents them (x, actor, window, window_type, pattern, include, exclude, significance, n_perm, cores, min_count, edge_method, edge_threshold, min_transitions, top, seed, family, p_adjust, strict, count_repeats). named_nodes is fixed to TRUE and must not be supplied.

Details

The "triads" diagram draws the labelled pattern of each row (its pattern column) with node1 at the top, node2 bottom left and node3 bottom right, so the arrows show who sends to whom. With strict = FALSE it draws the most frequent pattern of the row, and when the row pools other patterns the caption gives how many units match the drawing, for example "n=21 (13 as drawn)".

Value

A cograph_motif_result object with named_nodes = TRUE, described in motifs(), or NULL with a message when no triple passes the filters. Its results table has the columns triad, node1, node2, node3, type, observed, pattern, pattern_n and pattern_code, and with significance = TRUE also expected, z, p, p_adj and sig. Its type_summary counts the node triples of each MAN type.

See Also

motifs()

Other motifs: extract_motifs(), extract_triads(), get_edge_list(), motif_census(), motifs(), triad_census()

Examples

subgraphs(regulation_net, significance = FALSE, min_count = 1)

cograph documentation built on Nov. 19, 2026, 5:07 p.m.