Skip to contents

Extract individual glycan structure graphs from a glycan structure vector.

Usage

get_structure_graphs(x, i = NULL)

Arguments

x

A glycan structure vector.

i

Index or indices of structures to extract.

Value

A list of glycan_structure (igraph) objects.

Examples

structures <- glycan_structure(o_glycan_core_1(), n_glycan_core())
get_structure_graphs(structures, 1)
#> IGRAPH 8b922f8 DN-- 2 1 -- 
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edge from 8b922f8 (vertex names):
#> [1] 1->2
get_structure_graphs(structures, c(1, 2))
#> [[1]]
#> IGRAPH 8b922f8 DN-- 2 1 -- 
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edge from 8b922f8 (vertex names):
#> [1] 1->2
#> 
#> [[2]]
#> IGRAPH df68b67 DN-- 5 4 -- 
#> + attr: anomer (g/c), alditol (g/l), name (v/c), mono (v/c), sub (v/c),
#> | linkage (e/c)
#> + edges from df68b67 (vertex names):
#> [1] 1->2 2->3 3->4 3->5
#>