Create a specification for branch motif extraction.
This should be passed to the motifs argument of have_motifs(),
count_motifs(), match_motifs(), add_motifs_lgl(), or add_motifs_int().
Details
Passing branch_motifs() to the motifs argument of supported functions will:
Call
extract_branch_motif()withincluding_core = TRUEonglycansto get all branching motifs.Construct a
match_degreelist based on the motifs.Perform motif matching using the constructed
match_degreelist.
Specifically, setting including_core = TRUE will include an additional
"Hex(??-?)Hex(??-?)HexNAc(??-?)HexNAc(??-" suffix to each branching motif.
This suffix helps differentiate branching GlcNAc and bisecting GlcNAc.
Then, the match_degree is constructed so that the four residues in the suffix
do not have to match the node degree in the motif matching process.
Therefore, have_motifs(glycans, branch_motifs()) doesn't equal to
have_motifs(glycans, extract_branch_motif(glycans)).
Never use the results from extract_branch_motif() directly in these functions.
Examples
glycans <- c(
"GlcNAc(b1-2)Man(a1-3)[GlcNAc(b1-2)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1-",
"Gal(b1-4)GlcNAc(b1-2)Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1-"
)
have_motifs(glycans, branch_motifs())
#> GlcNAc(b1-
#> GlcNAc(b1-2)Man(a1-3)[GlcNAc(b1-2)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1- TRUE
#> Gal(b1-4)GlcNAc(b1-2)Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1- FALSE
#> Gal(b1-4)GlcNAc(b1-
#> GlcNAc(b1-2)Man(a1-3)[GlcNAc(b1-2)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1- FALSE
#> Gal(b1-4)GlcNAc(b1-2)Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1- TRUE
