Skip to contents

This function creates a custom enzyme object, which can be used in all functions in this package that accept an enzyme argument. Most of the time, you can use enzyme() with a gene symbol to get a predefined enzyme, or just use the gene symbol directly in function arguments. Use this function only when you need to create an enzyme with custom rules. See the "Enzyme rules" section below for more details.

You can create regular glycosyltransferases (GTs), glycoside hydrolases (GHs), and sulfotransferases (STs) with this function. Special enzymes like starter GTs for glycosylation initiation are reserved for predefined enzymes.

Usage

make_enzyme(name, rules, type, species, glycan_type = NULL)

Arguments

name

The name of the enzyme.

rules

A list of enzyme rules, each rule being a list with the following fields:

type

The type of the enzyme: "GT", "GH", or "ST".

species

The species of the enzyme. Default is "human". Currently no validation is done on the species. This field is only used for information purposes.

glycan_type

NULL for an enzyme that can act on all glycan classes, or one or more of "N", "O", "lipid", and "free" for class-specific enzymes. Structures ending in Glc or Gal without a represented carrier are treated as compatible with both "lipid" and "free" enzymes.

Value

A glyenzy_enzyme object.

Enzyme rules

The enzyme rules are the core of an enzyme object. Each rule defines one possible reaction of an enzyme, and an enzyme can have multiple rules.

We now explain each field of an enzyme rule in detail.

acceptor

The acceptor is the glycan motif (substructure) that the enzyme recognizes. It can be as simple as a single residue, like Man(a1-, or a more complex motif, like Man(a1-3)[Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc(b1-. Note that the acceptor does not define where the enzyme acts on, which is determined collectively by the acceptor and product fields.

acceptor_alignment

Under the hood, the acceptor is detected by glymotif::match_motif(). To match a motif, we need to specify the alignment of the motif. Possible values are "substructure", "core", "terminal" and "whole". See glymotif::have_motif() for details.

rejects

Some enzymes are really picky. They will reject to act on certain glycans if some motifs are present, even if the acceptor is perfectly matched. For example, if we want to define an enzyme that adds a Neu5Ac residue to the Gal residue of a Gal(b1-4)GlcNAc(b1- motif, but only when there is no a1-3 Fuc on that GlcNAc, we can set "Gal(b1-4)GlcNAc(b1-" as the acceptor and "Fuc(a1-3)[Gal(b1-4)]GlcNAc(b1-" as the rejects. You can provide multiple rejects as a vector. For example, if we want to reject Gal(b1-4)GlcNAc(b1- with either a1-3 Fuc on GlcNAc or a1-2 Fuc on Gal, we can set c("Fuc(a1-3)[Gal(b1-4)]GlcNAc(b1-", "Fuc(a1-2)Gal(b1-4)GlcNAc(b1-") as the rejects.

Note that here are some restrictions on the rejects:

  • When acceptor_alignment is "whole", rejects cannot be set.

  • The acceptor must be the substructure of all rejects. For example, in the a1-3 Fuc example above, you cannot just set "Fuc(a1-3)GlcNAc(b1-" as the rejects, because "Gal(b1-4)GlcNAc(b1-" (the acceptor) is not the substructure of "Fuc(a1-3)GlcNAc(b1-" (the reject).

  • rejects cannot be the same structure as acceptor.

If rejects is NULL, it means the enzyme does not reject any motifs.

product

The product is what the acceptor is transformed into by the enzyme. For glycosyltransferases (GTs), the product should have exactly one more residue than the acceptor. For glycoside hydrolases (GHs), the product should have exactly one less residue than the acceptor. If you have multiple possible products, put them in different rules. Take the same example above, if we want to add a Neu5Ac residue to the Gal residue of a Gal(b1-4)GlcNAc(b1- motif, we can set "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-" as the product.

For sulfotransferases, the product must have the same residue and linkage topology as the acceptor and add exactly one sulfate substituent.

requires

requires provides optional context motifs. Each entry contains motif and alignment; requirements are OR-valued, so at least one must match. An empty list means no additional context is required. Requirement motifs use sulfate-subset semantics, so an unsulfated requirement also matches the same topology with additional sulfates. Acceptor and reject motifs remain exact with respect to substituents during enzyme application.

See also

Examples

library(glyrepr)

# Create a custom enzyme that adds a Neu5Ac residue to the Gal residue
make_enzyme(
  name = "MySiaT",
  rules = list(
    list(
      acceptor = "Gal(b1-4)GlcNAc(b1-",
      acceptor_alignment = "terminal",
      rejects = NULL,
      product = "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-"
    )
  ),
  type = "GT",
  species = "human"
)
#> 
#> ── Enzyme: MySiaT ──────────────────────────────────────────────────────────────
#>  Type: "GT" (Glycosyltransferase)
#>  Species: "human"
#>  Glycan type: "all"
#> 
#> ── Rules (1) ──
#> 
#> → Rule 1: terminal alignment
#> Acceptor: "Gal(b1-4)GlcNAc(b1-"
#> Product: "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-"

# Create a custom enzyme that removes a Gal residue from a Gal(b1-4)GlcNAc(b1-` motif
make_enzyme(
  name = "MyGalH",
  rules = list(
    list(
      acceptor = "Gal(b1-4)GlcNAc(b1-",
      acceptor_alignment = "terminal",
      rejects = NULL,
      product = "GlcNAc(b1-"
    )
  ),
  type = "GH",
  species = "human"
)
#> 
#> ── Enzyme: MyGalH ──────────────────────────────────────────────────────────────
#>  Type: "GH" (Glycoside hydrolase)
#>  Species: "human"
#>  Glycan type: "all"
#> 
#> ── Rules (1) ──
#> 
#> → Rule 1: terminal alignment
#> Acceptor: "Gal(b1-4)GlcNAc(b1-"
#> Product: "GlcNAc(b1-"

# Create a custom enzyme with rejects
make_enzyme(
  name = "MySiaT",
  rules = list(
    list(
      acceptor = "Gal(b1-4)GlcNAc(b1-",
      acceptor_alignment = "terminal",
      rejects = c(
        # Reject a1-3 Fuc on GlcNAc
        "Fuc(a1-3)[Gal(b1-4)]GlcNAc(b1-",
        # Reject a1-2 Fuc on Gal
        "Fuc(a1-2)Gal(b1-4)GlcNAc(b1-"
      ),
      product = "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-"
    )
  ),
  type = "GT",
  species = "human"
)
#> 
#> ── Enzyme: MySiaT ──────────────────────────────────────────────────────────────
#>  Type: "GT" (Glycosyltransferase)
#>  Species: "human"
#>  Glycan type: "all"
#> 
#> ── Rules (1) ──
#> 
#> → Rule 1: terminal alignment
#> Acceptor: "Gal(b1-4)GlcNAc(b1-"
#> Product: "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-"
#> Rejects:
#> "Fuc(a1-3)[Gal(b1-4)]GlcNAc(b1-"
#> "Fuc(a1-2)Gal(b1-4)GlcNAc(b1-"

# Create a custom enzyme with more than one rule
make_enzyme(
  name = "MySiaT",
  rules = list(
    list(
      acceptor = "Gal(b1-4)GlcNAc(b1-",
      acceptor_alignment = "terminal",
      rejects = NULL,
      product = "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-"
    ),
    # same acceptor, different product
    list(
      acceptor = "Gal(b1-4)GlcNAc(b1-",
      acceptor_alignment = "terminal",
      rejects = NULL,
      product = "Neu5Gc(a2-3)Gal(b1-4)GlcNAc(b1-"
    )
  ),
  type = "GT",
  species = "human"
)
#> 
#> ── Enzyme: MySiaT ──────────────────────────────────────────────────────────────
#>  Type: "GT" (Glycosyltransferase)
#>  Species: "human"
#>  Glycan type: "all"
#> 
#> ── Rules (2) ──
#> 
#> → Rule 1: terminal alignment
#> Acceptor: "Gal(b1-4)GlcNAc(b1-"
#> Product: "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-"
#> → Rule 2: terminal alignment
#> Acceptor: "Gal(b1-4)GlcNAc(b1-"
#> Product: "Neu5Gc(a2-3)Gal(b1-4)GlcNAc(b1-"