Ejemplo n.º 1
0
    def __init__(self, **kwargs):
        if not self.DB:
            raise TypeError("Cannot make an instance of abstract base "
                            "class %r." % type(self).__name__)

        self.api = api.CachedKeggApi()
        self._info = None
        # TODO invalidate cache by KEGG release
        # self.api.set_default_release(self.info.release)
        self._keys = []
Ejemplo n.º 2
0
 def __init__(self, org):
     self.org_code = self.organism_name_search(org)
     self.api = api.CachedKeggApi()
Ejemplo n.º 3
0
 def _get_kgml(self):
     """
     Return an open kgml file for the pathway.
     """
     kegg = api.CachedKeggApi()
     return io.BytesIO(kegg.get(self.pathway_id + "/kgml"))
Ejemplo n.º 4
0
 def list(cls, organism):
     """
     List all pathways for KEGG organism code `organism`.
     """
     kegg = api.CachedKeggApi()
     return kegg.list_pathways(organism)