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 substituent to every open position on monosaccharide_obj and its substituents and reducing end

Parameters:

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 saccharide object, because copying objects is expensive. If you want to continue using the underivatized object, create a copy of it using the object’s clone method.

When called on an instance of SaccharideCollection, such as Glycan or GlycanComposition, that type’s _derivatized method will be called for any special book-keeping that must be done. This is a NoOp for Glycan

See 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 input saccharide.

When called on an instance of SaccharideCollection, such as Glycan or GlycanComposition, that type’s _strip_derivatization method will be called for any special book-keeping that must be done. This is a NoOp for Glycan

See also

derivatize()