structure_candidate_edges: List Potential Virtual Edges for Floating Parts

View source: R/structure-tables.R

structure_candidate_edgesR Documentation

List Potential Virtual Edges for Floating Parts

Description

structure_candidate_edges() represents every potential floating-part attachment as an explicit virtual edge. from_node is a candidate parent in another floating component or the main tree, and to_node is the root of the floating part.

The rows correspond one-to-one with the floating-part rows from structure_floating_candidates(). Floating substituents do not create virtual graph edges. For unrestricted ⁠{<floating>}⁠ parts, every feasible node outside the part's own component is returned and scope is "all". For explicitly restricted parts, only the declared parent nodes are returned and scope is "explicit".

Node indices refer to structure_nodes()$node_id for the same glycan. Missing structures and structures without floating parts contribute no rows. Duplicate structures are expanded to their original vector positions. For graph input, node indices are current numeric vertex positions and glycan_id is 1L. If vector input is named, the result also contains a glycan_name column.

Usage

structure_candidate_edges(x)

Arguments

x

A glycan structure vector or one glycan igraph.

Value

A tibble with columns glycan_id, part_id, from_node, to_node, linkage, and scope, plus glycan_name when x is named.

Examples

glycan <- as_glycan_structure(
  "{Neu5Ac(a2-6)|2,3}Gal(b1-3)GalNAc(a1-"
)
structure_candidate_edges(glycan)


glyrepr documentation built on Sept. 22, 2026, 5:09 p.m.