-
Notifications
You must be signed in to change notification settings - Fork 2
1. Code examples
The Sugar Removal Utility is instantiated via the SugarRemovalUtility class. All settings are set to their default values. The new instance can then be used to remove circular, linear, or both types of sugar moieties from input molecules.
//instantiate SugarRemovalUtility with SilentChemObjectBuilder instance for building new AtomContainer objects
SugarRemovalUtility tmpSugarRemovalUtil = new SugarRemovalUtility(SilentChemObjectBuilder.getInstance());
//parsing input molecules
SmilesParser tmpSmiPar = new SmilesParser(SilentChemObjectBuilder.getInstance());
//CHEMBL56258
IAtomContainer tmpMolWithOneTerminalCircularSugar = tmpSmiPar.parseSmiles("CC(N)C(=O)NC(CCC(N)=O)C(=O)NOC1OC(O)C(O)C(O)C1O");
//CHEMBL168422
IAtomContainer tmpMolWithTwoTerminalCircularSugars =
tmpSmiPar.parseSmiles("CCCCCC=CC=CC(O)CC=CC=CC(=O)OC1C(O)C(C2=C(O)C=C(O)C=C2CO)OC(CO)C1OC1OC(C)C(O)C(O)C1OC1OC(O)C(O)C(O)C1O");
The two input molecules look like this:
//deglycosylation without cloning the input atom container
IAtomContainer tmpAglycone = tmpSugarRemovalUtil.removeCircularAndLinearSugars(tmpMolWithOneTerminalCircularSugar, false);
SmilesGenerator tmpSmiGen = new SmilesGenerator(SmiFlavor.Canonical);
System.out.println(tmpSmiGen.create(tmpAglycone));
tmpAglycone = tmpSugarRemovalUtil.removeCircularAndLinearSugars(tmpMolWithTwoTerminalCircularSugars, false);
System.out.println(tmpSmiGen.create(tmpAglycone));
Output:
O=C(N)CCC(NC(=O)C(N)C)C(=O)NO
O=C(OC1C(O)C(OC(CO)C1O)C=2C(O)=CC(O)=CC2CO)C=CC=CCC(O)C=CC=CCCCCC
From the first structure, the terminal circular sugar moiety was removed. The second structure had two terminal sugars which got removed but also one non-terminal sugar substructure which did not get removed, in accordance with the default settings.
Many more code examples can be found in the SugarRemovalUtilityTest class. All the settings are also described in detail in the SRU publication and the exact handling of the functionality can best be explored using the JavaDoc documentation.