Glycome-DB HTTP Client¶
-
class
glypy.io.glycomedb.GlycomeDBSearchMatch(id, score, cross_reference, species_number, **kwargs)[source]¶ Bases:
objectA search match which carries information about the scored match and the id number for retrieving the
GlycanorGlycanRecord.-
get()[source]¶ Fetch the
Glycanreferenced by this search resultReturns: Glycan:
The
Glycanreferenced
-
get_record()[source]¶ Fetch the
GlycanRecordreferenced by this search resultReturns: GlycanRecord:
The
GlycanRecordreferenced by this search result
-
-
glypy.io.glycomedb.get(id)[source]¶ Get the structure for
idfrom GlycomeDB.GlycomeDB supplies a detailed schema link which allows
lxmlto easily pull out more than just the GlycoCT string. To download a more informative record, useget_record()Parameters: id: str or int Returns: Glycan
-
glypy.io.glycomedb.get_record(id)[source]¶ Get the complete record for
idfrom GlycomeDB.Returns: GlycanRecord
-
glypy.io.glycomedb.glycan_record_from_xml(xml_tree, id)[source]¶ Converts an XML document and the associated database into an instance of
GlycanRecord.Parameters: xml_tree: lxml.etree
XML document to consume
id:
GlycomeDB id number to assign this record
Returns: GlycanRecord:
Constructed record
-
glypy.io.glycomedb.make_entries(annotation)[source]¶ Helper method to create
Entryobjects from <entry></entry> tags inTaxonandAglyca.
-
glypy.io.glycomedb.search_by_species(tax_id)[source]¶ Select all structures which are associated with the provided taxonomy id, or one of its children.
Parameters: tax_id: int or str
The taxonomy id to search for
Yields: GlycomeDBSearchMatch
-
glypy.io.glycomedb.search_minimum_common_substructure(glycan_obj, minimum_residues=1)[source]¶ Select all structures which have a minimum common substructure of
minimum_residueswithglycan_obj.Parameters: glycan_obj: Glycan
The glycan structure to search for
minimum_residues: int
The minimum number of residues to match
Yields: GlycomeDBSearchMatch
-
glypy.io.glycomedb.search_substructure(glycan_obj)[source]¶ Select all structures which have contain
glycan_obj.Parameters: glycan_obj: Glycan
The glycan structure to search for
Yields: GlycomeDBSearchMatch
-
glypy.io.glycomedb.set_cache(path)[source]¶ Set the path to the current cache for use with this client. This will create an instance of
RecordDatabaseusing the path provided.Any record lookups will first check the cache for that identifier, and if found will return from there. Any records not found will be fetched from the remote database and saved in the cache before returning.