Create a specification for dynamic motif extraction.
This should be passed to the motifs argument of have_motifs(),
count_motifs(), match_motifs(), add_motifs_lgl(), or add_motifs_int().
Arguments
- max_size
The maximum number of monosaccharides in the extracted motifs. Default is 3. Passed to
extract_motif().
Details
Passing dynamic_motifs() to the motifs argument of supported functions will:
Call
extract_motif()onglycansto get all dynamic motifs.Perform motif matching with
alignmentsas "substructure".
In fact, have_motifs(glycans, dynamic_motifs()) is just a syntatic sugar of
have_motifs(glycans, extract_motif(glycans)).
This function exists to align with the db_motifs() and branch_motifs() API.
Examples
library(glyrepr)
glycans <- c(o_glycan_core_1(), o_glycan_core_2())
have_motifs(glycans, dynamic_motifs())
#> Gal(b1- GalNAc(a1- Gal(b1-3)GalNAc(a1-
#> Gal(b1-3)GalNAc(a1- TRUE TRUE TRUE
#> Gal(b1-3)[GlcNAc(b1-6)]GalNAc(a1- TRUE TRUE TRUE
#> GlcNAc(b1- GlcNAc(b1-6)GalNAc(a1-
#> Gal(b1-3)GalNAc(a1- FALSE FALSE
#> Gal(b1-3)[GlcNAc(b1-6)]GalNAc(a1- TRUE TRUE
#> Gal(b1-3)[GlcNAc(b1-6)]GalNAc(a1-
#> Gal(b1-3)GalNAc(a1- FALSE
#> Gal(b1-3)[GlcNAc(b1-6)]GalNAc(a1- TRUE
