Learn R Programming

gglycan (version 0.0.3)

highlight_motif: Identify Motif in Glycan Graph

Description

Finds occurrences of a motif subsequence in the main glycan graph and marks them.

Usage

highlight_motif(graph, motif_str)

Value

An `igraph` object with an added `alpha` vertex attribute (1 for motif, 0.4 for others).

Arguments

graph

The main glycan graph (an `igraph` object).

motif_str

The motif string (IUPAC format).

Examples

Run this code
s <- "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-2)Man(a1-3)Man(b1-4)GlcNAc(b1-4)GlcNAc"
g <- read_glycan(s)
g <- highlight_motif(g, "Neu5Ac(a2-3)Gal(b1-4)GlcNAc")

Run the code above in your browser using DataLab