Extract individual glycan structure graphs from a glycan structure vector.
A structure with floating parts is returned as one annotated, weakly
disconnected igraph: its main tree and floating components share the graph,
and the floating_parts graph attribute records each component's node
indices, virtual attachment, and candidate parents. See glycan_structure()
for the metadata schema.
A structure with floating substituents carries a floating_substituents
graph attribute containing their tokens and candidate parent indices.
Examples
structures <- c(o_glycan_core_1(), n_glycan_core())
get_structure_graphs(structures)
#> [[1]]
#> IGRAPH 54e0799 DN-- 2 1 --
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edge from 54e0799 (vertex names):
#> [1] 2->1
#>
#> [[2]]
#> IGRAPH 4c4b6f8 DN-- 5 4 --
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edges from 4c4b6f8 (vertex names):
#> [1] 3->1 3->2 4->3 5->4
#>
get_structure_graphs(structures)
#> [[1]]
#> IGRAPH 54e0799 DN-- 2 1 --
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edge from 54e0799 (vertex names):
#> [1] 2->1
#>
#> [[2]]
#> IGRAPH 4c4b6f8 DN-- 5 4 --
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edges from 4c4b6f8 (vertex names):
#> [1] 3->1 3->2 4->3 5->4
#>
