Composition Transformation¶
Derivatize and digest saccharides
-
glypy.composition.composition_transform._derivatize_monosaccharide(monosaccharide_obj, substituent, id_base=None)[source]¶ The internal worker for
derivatize(). It should not be called directly.Adds a copy of
substituentto every open position onmonosaccharide_objand its substituents and reducing endParameters: monosaccharide_obj: Monosaccharide
substituent: Substituent
id_base: function or None
Returns: monosaccharide_obj
-
glypy.composition.composition_transform.derivatize(saccharide, substituent)[source]¶ For each monosaccharide and viable substituent, attach the specified substituent.
Warning
This function mutates the input
saccharideobject, because copying objects is expensive. If you want to continue using the underivatized object, create a copy of it using the object’sclonemethod.When called on an instance of
SaccharideCollection, such asGlycanorGlycanComposition, that type’s_derivatizedmethod will be called for any special book-keeping that must be done. This is a NoOp forGlycanSee also
strip_derivitization()
-
glypy.composition.composition_transform.strip_derivatization(saccharide)[source]¶ For each monosaccharide and viable substituent, remove all substituents added by
derivatize().Warning
This function, like
derivatize(), will mutate the inputsaccharide.When called on an instance of
SaccharideCollection, such asGlycanorGlycanComposition, that type’s_strip_derivatizationmethod will be called for any special book-keeping that must be done. This is a NoOp forGlycanSee also