HydrolaseHydrolyzingNGlycosylCompounds

Definition

hydrolase hydrolyzing N-glycosyl compounds

Examples:
- Adenosine nucleosidase: adenosine + H2O → adenine + ribose
- Inosine nucleosidase: inosine + H2O → hypoxanthine + ribose
- Uridine nucleosidase: uridine + H2O → uracil + ribose
- Purine nucleosidase: purine nucleoside + H2O → purine base + ribose

Performance Metrics

0.774
F1 Score
0.923
Precision
0.667
Recall
0.998
Accuracy
0.784
MCC
1.000
Specificity

Confusion Matrix

12
True Positives
1
False Positives
6
False Negatives
3465
True Negatives

Classification Code

hydrolase_hydrolyzing_n_glycosyl_compounds.py:34
Class-level declarative context used by the classifier, including identifiers, evidence requirements, and pattern definitions.
GO_ID = "GO:0016799"  # hydrolase activity, hydrolyzing N-glycosyl compounds

    EC_NUMBER_PREFIX = "3.2.2.-"  # Hydrolysing N-glycosyl compounds

    PATTERNS: list[Reaction] = [
        # General nucleosidase: nucleoside + H2O → nucleobase + sugar
        var("nucleoside") + p(water) >> var("nucleobase") + var("sugar") + optional(h_plus),
        # Adenosine nucleosidase: adenosine + H2O → adenine + ribose
        var("adenosine") + p(water) >> var("adenine") + var("ribose") + optional(h_plus),
        # Purine nucleosidase: purine nucleoside + H2O → purine + sugar
        var("purine_nucleoside") + p(water) >> var("purine") + var("ribose") + optional(h_plus),
        # Pyrimidine nucleosidase: pyrimidine nucleoside + H2O → pyrimidine + sugar
        var("pyrimidine_nucleoside") + p(water) >> var("pyrimidine") + var("ribose") + optional(h_plus),
    ]
hydrolase_hydrolyzing_n_glycosyl_compounds.py:49
Imperative membership logic. This often calls the declarative class attributes shown above.
    def check_membership_impl(self, reaction: Reaction) -> ClassificationResult:
        """Check if reaction is a nucleosidase (N-glycosyl hydrolase).

        Strategy:
        1. Must be a hydrolase (parent class)
        2. Must use water for hydrolysis (already checked by parent)
        3. Must produce ribose/deoxyribose products OR have N-glycosyl cleavage pattern
        4. Exclude reactions that are clearly not nucleosidases

        NOTE: Many nucleosides in RHEA lack ChEBI IDs, so we detect by:
        - Ribose/deoxyribose product (with expanded ChEBI variants)
        - SMARTS patterns for purine/pyrimidine bases
        """
        # Use RHEA label for pattern matching (not p.name which has ChEBI generic names)
        label_lower = reaction.label.lower() if reaction.label else ""
        label_parts = label_lower.split("=")
        label_parts[0] if label_parts else ""
        product_str = label_parts[1] if len(label_parts) > 1 else ""

        # First check if it's a hydrolase
        parent_result = super().check_membership_impl(reaction)
        if not parent_result.is_member:
            return ClassificationResult(
                is_member=False,
                explanation=f"Not a hydrolase: {parent_result.explanation}",
            )

        # Expanded ribose/deoxyribose ChEBI IDs (including charged forms)
        sugar_chebi = {
            "CHEBI:33942",  # ribose (generic)
            "CHEBI:47013",  # D-ribofuranose
            "CHEBI:28816",  # 2-deoxyribose
            "CHEBI:17634",  # D-ribose
            "CHEBI:47014",  # L-ribofuranose
            "CHEBI:78346",  # D-ribofuranose 5-phosphate(2-)
            "CHEBI:58273",  # D-ribose 5-phosphate(2-)
        }

        # Nucleobase ChEBI IDs (expanded with common variants)
        nucleobase_chebi = {
            "CHEBI:16708",  # adenine
            "CHEBI:16235",  # guanine
            "CHEBI:16040",  # cytosine
            "CHEBI:17568",  # uracil
            "CHEBI:17821",  # thymine
            "CHEBI:17368",  # hypoxanthine
            "CHEBI:17712",  # xanthine
            "CHEBI:27468",  # 7-methylxanthine (from methylated nucleosides)
            "CHEBI:17802",  # nicotinamide (from NAD+)
        }

        # Check for ribose product
        has_sugar_product = any(
            p.chebi_id in sugar_chebi
            for p in reaction.right_participants
        )

        # Check for nucleobase product
        has_nucleobase_product = any(
            p.chebi_id in nucleobase_chebi
            for p in reaction.right_participants
        )

        # SMARTS-based detection for purine/pyrimidine products (when ChEBI ID missing)
        # Purine core: imidazole fused to pyrimidine
        # Pyrimidine core: 6-membered ring with 2 nitrogens

        def has_base_smarts(participant) -> bool:
            """Check if participant has purine or pyrimidine base pattern."""
            if not participant.smiles:
                return False
            # Simple substring check for nucleobase patterns
            smiles = participant.smiles
            # Imidazole-pyrimidine fusion (purine)
            if "c1ncnc2" in smiles.lower() or "c1nc2" in smiles.lower():
                return True
            # Pyrimidine ring (check for characteristic patterns)
            if "NC(=O)" in smiles and "N=C" in smiles:
                return True
            return False

        any(
            has_base_smarts(p)
            for p in reaction.right_participants
        )

        # Exclude common hexose sugars (glucose, galactose, etc.) - these are glycosidase, not nucleosidase
        hexose_chebi = {
            "CHEBI:4167",   # D-glucose
            "CHEBI:17634",  # D-ribose (already in sugar_chebi, this is good)
            "CHEBI:12965",  # beta-D-glucose
            "CHEBI:28061",  # alpha-D-glucose
            "CHEBI:4139",   # D-galactose
            "CHEBI:28260",  # beta-D-galactose
            "CHEBI:17118",  # D-fructose
            "CHEBI:48095",  # D-glucose 6-phosphate
            "CHEBI:17925",  # alpha-D-glucose 6-phosphate
        }

        has_hexose_product = any(
            p.chebi_id in hexose_chebi
            for p in reaction.right_participants
        ) or any(sugar in product_str for sugar in ["glucose", "galactose", "fructose", "mannose", "fucose"])

        # Exclude CoA reactions (acyl hydrolases, not nucleosidases)
        has_coa = any(
            p.chebi_id and "57287" in p.chebi_id  # CoA ChEBI ID
            for p in reaction.left_participants + reaction.right_participants
        ) or "coa" in label_lower

        if has_coa:
            return ClassificationResult(
                is_member=False,
                explanation="CoA involvement - acyl hydrolase, not nucleosidase"
            )

        # For nucleosidase, we need STRONG evidence: ribose ChEBI ID + base evidence
        # OR base ChEBI ID + some ribose evidence
        # Weak SMARTS matching alone is not sufficient

        has_strong_sugar = has_sugar_product
        has_strong_base = has_nucleobase_product

        # Must have at least one strong indicator (ChEBI-verified)
        if not (has_strong_sugar or has_strong_base):
            return ClassificationResult(
                is_member=False,
                explanation="No ribose/nucleobase products - not N-glycosyl hydrolysis"
            )

        # If we have hexose products, this is glycosidase not nucleosidase
        if has_hexose_product and not (has_strong_sugar and has_strong_base):
            return ClassificationResult(
                is_member=False,
                explanation="Hexose product (glucose/galactose) - glycosidase, not nucleosidase"
            )

        # Exclude reactions involving proteins/peptides (ADP-ribosyl hydrolases are separate)
        has_protein = "protein" in label_lower or "peptide" in label_lower

        if has_protein:
            return ClassificationResult(
                is_member=False,
                explanation="Protein involvement - ADP-ribosyl hydrolase, not simple nucleosidase"
            )

        # Exclude reactions with asparagine (beta-aspartyl-glucosaminidase)
        has_asparagine = "asparagine" in label_lower

        if has_asparagine:
            return ClassificationResult(
                is_member=False,
                explanation="Asparagine involvement - aspartylglucosaminidase, not nucleosidase"
            )

        # Build explanation
        explanation = "N-glycosyl hydrolase"
        if has_sugar_product:
            explanation += " (ribose product detected)"
        if has_nucleobase_product:
            explanation += " (nucleobase product detected)"

        return ClassificationResult(is_member=True, explanation=explanation)

Detailed Results

▶ True Positives 12
RHEA:10880 [GO:0016799]: 7-methylxanthosine + H2O = 7-methylxanthine + D-ribose + H(+)
N-glycosyl hydrolase (ribose product detected)
RHEA:12865 [GO:0016799]: 1-methyladenosine + H2O = 1-methyladenine + D-ribose
N-glycosyl hydrolase (ribose product detected)
RHEA:13617 [GO:0016799]: S-methyl-5'-thioadenosine + H2O = 5-(methylsulfanyl)-D-ribose + adenine
N-glycosyl hydrolase (nucleobase product detected)
RHEA:15577 [GO:0016799]: uridine + H2O = D-ribose + uracil
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:16657 [GO:0016799]: inosine + H2O = hypoxanthine + D-ribose
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:17805 [GO:0016799]: S-adenosyl-L-homocysteine + H2O = S-(5-deoxy-D-ribos-5-yl)-L-homocysteine + adenine
N-glycosyl hydrolase (nucleobase product detected)
RHEA:18669 [GO:0016799]: adenosine + H2O = D-ribose + adenine
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:20129 [GO:0016799]: AMP + H2O = adenine + D-ribose 5-phosphate
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:20469 [GO:0016799]: IMP + H2O = hypoxanthine + D-ribose 5-phosphate
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:23140 [GO:0016799]: beta-nicotinamide D-ribonucleotide + H2O = D-ribose 5-phosphate + nicotinamide + H(+)
N-glycosyl hydrolase (ribose product detected)
RHEA:27994 [GO:0016799]: xanthosine + H2O = D-ribose + xanthine
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:33079 [GO:0016799]: 6-amino-6-deoxyfutalosine + H2O = dehypoxanthine futalosine + adenine
N-glycosyl hydrolase (nucleobase product detected)
▶ False Positives 1
RHEA:10944 [GO:0016799]: psi-UMP + H2O = pseudouridine + phosphate
N-glycosyl hydrolase (nucleobase product detected)
▶ False Negatives 6
RHEA:12324 [GO:0016799]: N(4)-(beta-N-acetyl-D-glucosaminyl)-L-asparagine + H2O = N-acetyl-D-glucosamine + L-asparagine
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:14493 [GO:0016799]: N(omega)-alpha-(ADP-D-ribosyl)-L-arginyl-[dinitrogen reductase] + H2O = L-arginyl-[dinitrogen reductase] + ADP-D-ribose
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:14885 [GO:0016799]: N(omega)-(ADP-D-ribosyl)-L-arginyl-[protein] + H2O = ADP-D-ribose + L-arginyl-[protein]
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:16301 [GO:0016799]: NAD(+) + H2O = ADP-D-ribose + nicotinamide + H(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:19849 [GO:0016799]: NADP(+) + H2O = ADP-D-ribose 2'-phosphate + nicotinamide + H(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:20784 [GO:0016799]: N(omega)-(ADP-D-ribosyl)-L-arginine + H2O = ADP-D-ribose + L-arginine
No ribose/nucleobase products - not N-glycosyl hydrolysis
▶ True Negatives 3465
RHEA:10000 [GO:0016799]: pentanamide + H2O = pentanoate + NH4(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10008 [GO:0016799]: a hydroperoxide + [protein]-dithiol = [protein]-disulfide + an alcohol + H2O
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10012 [GO:0016799]: (R)-6-hydroxynicotine + O2 + H2O = 6-hydroxypseudooxynicotine + H2O2
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10016 [GO:0016799]: O-sinapoylcholine + H2O = (E)-sinapate + choline + H(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10020 [GO:0016799]: L-saccharopine + NADP(+) + H2O = (S)-2-amino-6-oxohexanoate + L-glutamate + NADPH + H(+)
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10024 [GO:0016799]: L-lysyl-[histone] + S-adenosyl-L-methionine = N(6)-methyl-L-lysyl-[histone] + S-adenosyl-L-homocysteine + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10028 [GO:0016799]: D-glutamate + O2 + H2O = H2O2 + 2-oxoglutarate + NH4(+)
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10032 [GO:0016799]: [protein]-C-terminal-L-glutamine + H2O = [protein]-C-terminal-L-glutamate + NH4(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10036 [GO:0016799]: 4-hydroxy-3-methoxy-benzenemethanol + O2 = vanillin + H2O2
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10040 [GO:0016799]: adenosine 3',5'-bisphosphate + H2O = AMP + phosphate
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10044 [GO:0016799]: cyclohexanol + NAD(+) = cyclohexanone + NADH + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10048 [GO:0016799]: O-acetyl-L-homoserine + methanethiol = L-methionine + acetate + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10052 [GO:0016799]: (2R)-hydroxy-4-methylpentanoate + NAD(+) = 4-methyl-2-oxopentanoate + NADH + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10056 [GO:0016799]: (3S)-3-aminobutanoyl-CoA = (2E)-butenoyl-CoA + NH4(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10060 [GO:0016799]: D-tryptophan + acetyl-CoA = N-acetyl-D-tryptophan + CoA + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10064 [GO:0016799]: (6R)-5,10-methylene-5,6,7,8-tetrahydrofolate + D-alanine + H2O = 2-methylserine + (6S)-5,6,7,8-tetrahydrofolate
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10072 [GO:0016799]: N,N-dimethylglycine + S-adenosyl-L-methionine = glycine betaine + S-adenosyl-L-homocysteine + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10076 [GO:0016799]: lactose + H2O = beta-D-galactose + D-glucose
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10080 [GO:0016799]: dihydrophloroglucinol + NADP(+) = 1,3,5-trihydroxybenzene + NADPH
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10084 [GO:0016799]: 3,4-dihydroxybenzoate + O2 = 3-carboxy-cis,cis-muconate + 2 H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10088 [GO:0016799]: sucrose + UDP-alpha-D-galactose = 6(F)-alpha-D-galactosylsucrose + UDP + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10092 [GO:0016799]: a 2'-deoxyribonucleoside 3'-phosphate + H2O = a 2'-deoxyribonucleoside + phosphate
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10104 [GO:0016799]: gibberellin A20 + 2-oxoglutarate + O2 = gibberellin A1 + succinate + CO2
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10108 [GO:0016799]: (7S)-salutaridinol + NADP(+) = salutaridine + NADPH + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10112 [GO:0016799]: L-homocysteine + L-serine = L,L-cystathionine + H2O
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10116 [GO:0016799]: 6-phospho-D-gluconate + NADP(+) = D-ribulose 5-phosphate + CO2 + NADPH
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10124 [GO:0016799]: phenylacetone + NADPH + O2 + H(+) = benzyl acetate + NADP(+) + H2O
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10128 [GO:0016799]: all-trans-violaxanthin = all-trans-neoxanthin
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10132 [GO:0016799]: benzoate + ATP + CoA = benzoyl-CoA + AMP + diphosphate
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10136 [GO:0016799]: 2 glyoxylate + H(+) = 2-hydroxy-3-oxopropanoate + CO2
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10140 [GO:0016799]: prostaglandin F2alpha + NADP(+) = prostaglandin D2 + NADPH + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10148 [GO:0016799]: blasticidin S + H2O + H(+) = deaminohydroxyblasticidin S + NH4(+)
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10152 [GO:0016799]: hydrogencarbonate + NH4(+) + ATP = carbamoyl phosphate + ADP + H2O + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10156 [GO:0016799]: dihydrochelirubine + reduced [NADPH--hemoprotein reductase] + O2 = 12-hydroxydihydrochelirubine + oxidized [NADPH--hemoprotein reductase] + H2O + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10160 [GO:0016799]: L-iditol + NAD(+) = keto-L-sorbose + NADH + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10164 [GO:0016799]: (2R)-2-phosphoglycerate = phosphoenolpyruvate + H2O
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10168 [GO:0016799]: 15,16-dihydrobiliverdin + oxidized 2[4Fe-4S]-[ferredoxin] = biliverdin IXalpha + reduced 2[4Fe-4S]-[ferredoxin] + 2 H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10172 [GO:0016799]: (3R)-hydroxybutanoate dimer + H2O = 2 (R)-3-hydroxybutanoate + H(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10180 [GO:0016799]: (6R)-10-formyltetrahydrofolate + NADP(+) + H2O = (6S)-5,6,7,8-tetrahydrofolate + CO2 + NADPH + H(+)
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10184 [GO:0016799]: (4,5-dihydro-5-oxofuran-2-yl)-acetate + H2O = 3-oxoadipate + H(+)
No ribose/nucleobase products - not N-glycosyl hydrolysis
RHEA:10188 [GO:0016799]: acetoacetyl-CoA + acetyl-CoA + H2O = (3S)-3-hydroxy-3-methylglutaryl-CoA + CoA + H(+)
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10192 [GO:0016799]: sulfate(out) + ATP + H2O = sulfate(in) + ADP + phosphate + H(+)
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10196 [GO:0016799]: (1R,6R)-6-hydroxy-2-succinyl-cyclohexa-2,4-diene-1-carboxylate = 2-succinylbenzoate + H2O
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10200 [GO:0016799]: butanoate + NAD(+) = (2E)-2-butenoate + NADH + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10204 [GO:0016799]: dimethylamine + oxidized [electron-transfer flavoprotein] + H2O + H(+) = methylamine + reduced [electron-transfer flavoprotein] + formaldehyde
Not a hydrolase: Pattern doesn't match expected hydrolysis transformation
RHEA:10208 [GO:0016799]: an N-terminal L-alpha-aminoacyl-[protein] + L-arginyl-tRNA(Arg) = an N-terminal L-arginyl-L-aminoacyl-[protein] + tRNA(Arg) + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10212 [GO:0016799]: 5-aminopentanoate + 2-oxoglutarate = 5-oxopentanoate + L-glutamate
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10216 [GO:0016799]: [DNA-directed RNA polymerase] + ATP = phospho-[DNA-directed RNA polymerase] + ADP + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10220 [GO:0016799]: tRNA(Tyr) + L-tyrosine + ATP = L-tyrosyl-tRNA(Tyr) + AMP + diphosphate + H(+)
Not a hydrolase: No water reactant - not hydrolysis
RHEA:10224 [GO:0016799]: pyridoxal + ATP = pyridoxal 5'-phosphate + ADP + H(+)
Not a hydrolase: No water reactant - not hydrolysis
... and 3415 more (showing 50 of 3465)

Positives Without Direct GO Support

Positive rule matches on reactions without direct GO support for this class. These matches are partitioned into truly unannotated candidates, EC-backed reactions already consistent with this class, and EC-backed reactions that conflict with this class.
▶ EC-backed, GO-missing positives supporting this class 4
These reactions lack direct GO support in the benchmark, but their EC annotations already support this class.
RHEA:25904: futalosine + H2O = dehypoxanthine futalosine + hypoxanthine
EC annotation: EC:3.2.2.26
N-glycosyl hydrolase (nucleobase product detected)
RHEA:27958: cytidine + H2O = cytosine + D-ribose
EC annotation: EC:3.2.2.8
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)
RHEA:29859: 5'-deoxyadenosine + H2O = 5-deoxy-D-ribose + adenine
EC annotation: EC:3.2.2.9
N-glycosyl hydrolase (nucleobase product detected)
RHEA:30075: CMP + H2O = cytosine + D-ribose 5-phosphate
EC annotation: EC:3.2.2.10
N-glycosyl hydrolase (ribose product detected) (nucleobase product detected)