Identity Testing For Monosaccharides¶
- glypy.io.nomenclature.identity.get_preferred_name(name, selector=<built-in function min>, key=<built-in function len>)[source]¶
Given a name, of its synonyms, find the name that satisfies the
selectorcriterion function (min()) based on somekeyfunction of the name (len())
- glypy.io.nomenclature.identity.identify(node, blacklist=None, tolerance=0, include_modifications=True, include_substituents=True, ignore_ring=True, **kwargs)[source]¶
Attempt to find a common usage name for the given
Monosaccharide,node. The name is determined by performing an incremental comparison of the traits ofnodewith each named residue in the database accessed atglypy.monosaccharides.Forwards all unmatched arguments to
monosaccharide_similarity()- Parameters:
node (Monosaccharide) – Object to be identified
blacklist (list) – The set of all monosaccharides to not attempt matching against, because they are too general.
tolerance (int) – The error tolerance for the search
include_modifications (bool) – Whether or not to include modifications in comparison. Defaults to
Trueinclude_substituents (bool) – Whether or not to include substituents in comparison. Defaults to
True
- Return type:
- Raises:
IdentifyException: – When a suitable name cannot be found.
See also
is_a,preferred_name,monosaccharide_similarity
- glypy.io.nomenclature.identity.is_a(node, target, tolerance=0, include_modifications=True, include_substituents=True, exact=True, short_circuit=False, ignore_ring=True, **kwargs)[source]¶
Perform a semi-fuzzy match between
nodeandtargetwhere node is the unqualified residue queried and target is the known residue to be matched against.Forwards all unmatched arguments to
monosaccharide_similarity()- Parameters:
node (Monosaccharide or Substituent) – Object to be identified
target (Monosaccharide, Substituent or str) – The reference type. May be a
strobject which is used to look up aMonosaccharideby name inglypy.monosaccharidestolerance (int) – The error tolerance for the search
include_modifications (bool) – Whether or not to include modifications in comparison. Defaults to
Trueinclude_substituents (bool) – Whether or not to include substituents in comparison. Defaults to
Trueexact (bool) – Whether or not to penalize for unmatched attachments. Defaults to
True
- Return type:
- glypy.io.nomenclature.identity.naive_name_monosaccharide(monosaccharide)[source]¶
Generate a generic name for
monosaccharide, based loosely on IUPAC naming schema without including information about linkage.The tendency for monosaccharides of superclass > 7 to have special names, which will be used preferentially if possible.
- Parameters:
monosaccharide (Monosaccharide)
- Returns:
A simple name based on
SuperClass, modifications, and substituents.- Return type: