FEV_KEGG.KEGG.Organism module¶
-
class
FEV_KEGG.KEGG.Organism.Group(organismAbbreviations: Iterable[str] = None, searchString: any part of organism description = None, name=None, minimalSize=None)[source]¶ Bases:
objectA Group of
Organism.If both parameters, organismAbbreviations and searchString, are specified, both lists will be appended, forming this group’s list of organisms. If none of the parameters is specified, this Group has an empty organism list.
Parameters: - organismAbbreviations (Iterable[str], optional) – Abbreviations of the desired organisms. If != None, tries to find one
Organismfor each abbreviation in the list. - searchString (str, optional) – Any part of the desired organisms’ description. If != None, searches the list of all organisms known to KEGG for the passed string.
An example entry of the KEGG list of organisms looks as follows: “T00338 eci Escherichia coli O18:K1:H7 UTI89 (UPEC) Prokaryotes;Bacteria;Gammaproteobacteria - Enterobacteria;Escherichia”.
Any list entry matching the search string creates one
Organism, aggregated into this group. - name (str, optional) – Custom name of this group.
- minimalSize (int, optional) – If not None, incorporate only organisms with EC graphs with at least minimalSize edges. Can be useful to filter incompletely annotated organisms.
Variables: - self.searchString (str) –
- self.name (str) –
Raises: ValueError– If any organism does not exist at all in KEGG.URLError– If connection to KEGG fails.
-
_getGraphsParallelly(worker, organisms, noMultifunctional, debugText, minimalSize=None)[source]¶ Does the actual fetching and computing of the graphs in parallel.
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool.Warning
If you did not enable parallel computation by either enabling
FEV_KEGG.settings.automaticallyStartProcessPoolor providingFEV_KEGG.Util.Parallelism.processPool, this will fail with a TypeError.Note
If you enabled
FEV_KEGG.settings.automaticallyStartProcessPool, this will run parallelly in multiple processes with multiple threads in each, depending on your settings and computer.
-
collectiveEcGraph(noMultifunctional=True, addCount=False, keepOnHeap=True, addEcDescriptions=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ The collective of all SubstanceEcGraphs, by union operation, from all organisms in this group.
Nodes of the same Substance are merged, all edges of differing ECs with a unique pair of nodes survive.
Parameters: - noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- addCount (bool, optional) – If True, the returned graph contains extra dicts.
1
graph.nodeCounts[node]= number of organisms which contained this node. 2graph.edgeCounts[(node, node, element)]= number of organisms which contained this edge. 3graph.edgeElementCounts[element]= number of organisms which contained this element. Attention! These counter dictionaries are NOT updated if your add or remove a node/edge/element! - keepOnHeap (bool, optional) – Keeps a common graph in memory to speed up subsequent calls of this or other methods. This can take up a lot of memory! Once this object is garbage collected, the common graph will be, too.
Returns: The substance-EC graph composed of all this group’s organism’s substance-EC graphs.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
See also
FEV_KEGG.Graph.Models.CommonGraphApi.union()- Union operator.
-
collectiveEnzymeGraph(noMultifunctional=True, keepOnHeap=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The collective of all SubstanceEnzymeGraphs, by union operation, from all organisms in this group.
Nodes of the same Substance are merged, all edges of differing Enzymes with a unique pair of nodes survive. Enzymes are compared by their GeneID and should, thus, all be different!
Parameters: - noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- keepOnHeap (bool, optional) – Keeps a common graph in memory to speed up subsequent calls of this or other methods. This can take up a lot of memory! Once this object is garbage collected, the common graph will be, too.
Returns: The substance-enzyme graph composed of all this group’s organism’s substance-enzyme graphs.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
See also
FEV_KEGG.Graph.Models.CommonGraphApi.union()- Union operator.
-
collectiveEnzymeGraphByEcConsensus(noMultifunctional=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The collective SubstanceEnzymGraph, but containing only Enzymes whose EC numbers occur in the consensus of all SubstanceEcGraphs.
Parameters: noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
collectiveEnzymeGraphByEcMajority(majorityPercentage=80, majorityTotal=None, noMultifunctional=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The collective SubstanceEnzymGraph, but containing only Enzymes whose EC numbers occur in the majority of all SubstanceEcGraphs.
Parameters: - majorityPercentage (float, optional) – Majority percentage means ‘at least x%’ and is rounded up. For example 90% of 11 organisms would be ceiling(9,9) = 10 organisms.
- majorityTotal (int, optional) – If given (not None), majorityPercentage is ignored and the percentage of organisms for a majority is calculated from majorityTotal alone.
- noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
consensusEcGraph(noMultifunctional=True, keepOnHeap=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ The consensus of all SubstanceEcGraphs, by intersection operation, from all organisms in this group.
Afterwards, removes isolated nodes.
Parameters: - noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- keepOnHeap (bool, optional) – Keeps a common graph in memory to speed up subsequent calls of this or other methods. This can take up a lot of memory! Once this object is garbage collected, the common graph will be, too.
Returns: The substance-EC graph intersected of all this group’s organism’s substance-EC graphs.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
See also
FEV_KEGG.Graph.Models.CommonGraphApi.intersection()- Intersection operator.
-
ecGraphs(noMultifunctional=True, minimalSize=None) → List[FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph][source]¶ All substance-EC graphs of this group.
Parameters: - noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- minimalSize (int, optional) – If not None, return only EC graphs with at least minimalSize edges. Can be useful to filter incompletely annotated organisms.
Returns: Substance-EC graphs of all organisms in this group. Order is arbitrary.
Return type: List[SubstanceEcGraph]
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
enzymeGraphs(noMultifunctional=True) → List[FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph][source]¶ All substance-enzyme graphs of this group.
Parameters: noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
Returns: Substance-enzyme graphs of all organisms in this group. Order is arbitrary.
Return type: List[SubstanceEnzymeGraph]
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
freeHeap()[source]¶ Free heap of memory-cached data.
Removes objects kept on heap, i.e. which have a pointer kept in this object, because some function was called with keepOnHeap == True. Also calls garbage collector to break reference cycles in previously uncollected objects (generation 0).
Note
Instead of using this, you will most likely want to never use any of the group methods with keepOnHeap == True. Then, calling this method would be unnecessary, as it would have no effect.
-
majorityEcGraph(majorityPercentage=90, majorityTotal=None, noMultifunctional=True, keepOnHeap=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ The majority-consensus of all SubstanceEcGraphs, by majority-intersection operation, from all organisms in this group.
If the majority of organisms contains an edge, it is added to the majority-consensus. Afterwards, removes isolated nodes.
Parameters: - majorityPercentage (float, optional) – Majority percentage means ‘at least x%’ and is rounded up. For example 90% of 11 organisms would be ceiling(9,9) = 10 organisms.
- majorityTotal (int, optional) – If given (not None), majorityPercentage is ignored and the percentage of organisms for a majority is calculated from majorityTotal alone.
- noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- keepOnHeap (bool, optional) – Keeps a common graph in memory to speed up subsequent calls of this or other methods. This can take up a lot of memory! Once this object is garbage collected, the common graph will be, too.
Returns: The substance-EC graph majority-intersected of all this group’s organism’s substance-EC graphs.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. See_getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
See also
FEV_KEGG.Graph.Models.CommonGraphApi.majorityIntersection()- Majority intersection operator.
-
organisms¶ Organisms of this group.
Returns: The set of organisms which are part of this group. Order is arbitrary. Return type: Set[Organism]
-
organismsCount¶ Number of organisms of this group.
Returns: The number of organisms in the set of organisms of this group. Return type: int
- organismAbbreviations (Iterable[str], optional) – Abbreviations of the desired organisms. If != None, tries to find one
-
class
FEV_KEGG.KEGG.Organism.Organism(nameAbbreviation: eco, skipExistsCheck=False)[source]¶ Bases:
objectAn Organism as listed in KEGG, e.g. Escherichia coli K-12 MG1655 “eco”.
Checks whether the organism actually exists before creating the object.
Parameters: - nameAbbreviation (str) – The abbreviation of an organism as used in KEGG.
- skipExistsCheck (bool, optional) – If True, skips the check for existence of an organism identified by nameAbbreviation. Any subsequent method access may raise an error if the organism does not exist in KEGG!
Variables: self.nameAbbreviation (str) –
Raises: ValueError– If the organism does not exist at all in KEGG.URLError– If the connection to the KEGG server fails and the requested organism has not already been cached.
Note
All operations are cached via
FEV_KEGG.KEGG.Database. This includes any downloads and the calculations available directly via this class.-
GLOBAL_PATHWAY_PATTERN= re.compile('01[12][0-9]{2}')¶ Pattern defining a global/overview pathway.
These pathways should contain nothing more and nothing less than what is included in all non-global pathways. At least concerning metabolic pathways. Alas, they do not. Global/Overview pathways are often inconsistent with the union of all pathways. Also, they discard information about edge direction, containing only undirected edges.
-
classmethod
__initBulk__(nameAbbreviations: List[str]) → List[FEV_KEGG.KEGG.Organism.Organism][source]¶ Creates many
Organismobjects at once.Checking for existence is much faster when done this way, because it is parallelised. Pathologically non-existent organisms are automatically filtered, see
FEV_KEGG.quirks.NON_EXISTING_ORGANISMSParameters: nameAbbreviations (list[str]) – List of abbreviation strings which will be used to create an
Organism.Returns: List of
Organismobjects. Or None if none of the nameAbbreviations existed.Return type: List[Organism]
Raises: ValueError– If any organism does not exist at all in KEGG.URLError– If the connection to the KEGG server fails and the requested organism has not already been cached.
-
classmethod
_filterGlobalAndOverview(pathwayDescriptions: Set[str]) → Set[str][source]¶ Removes pathway descriptions of pathways belonging to global or overview maps.
Parameters: pathwayDescriptions (Set[str]) – The pathway descriptions to filter. Returns: Pathway descriptions, leaving only the ones not from a global/overview pathway. Return type: Set[str]
-
_filterNonMetabolic(pathwayDescriptions: Set[str]) → Set[str][source]¶ Removes pathway descriptions of pathways not belonging to metabolism.
Parameters: pathwayDescriptions (Set[str]) – The pathway descriptions to filter. Returns: Pathway descriptions, leaving only the ones from pathways belonging to metabolism. Return type: Set[str] See also
FEV_KEGG.quirks.METABOLIC_PATHWAYS()- List of names for all pathways belonging to metabolism.
-
getGene(gene: eco:b0004 or b0004) → FEV_KEGG.KEGG.DataTypes.Gene[source]¶ Get a certain gene object for this organism.
Automatically recognises format.
Parameters: gene (str) – Gene ID or name, e.g. ‘eco:b0004’ or ‘b0004’.
Returns: Gene object.
Return type: Raises: HTTPError– If gene does not exist.URLError– If connection to KEGG fails.
-
getGeneByID(geneID: eco:b0004) → FEV_KEGG.KEGG.DataTypes.Gene[source]¶ Get a certain gene object for this organism.
Does not check if the prefix matches this organism!
Parameters: geneID (str) – Gene name, e.g. ‘eco:b0004’.
Returns: Gene object.
Return type: Raises: HTTPError– If gene does not exist.URLError– If connection to KEGG fails.
-
getGeneByName(geneName: b0004) → FEV_KEGG.KEGG.DataTypes.Gene[source]¶ Get a certain gene object for this organism.
Automatically prepends organism, eg. ‘eco:’+geneName.
Parameters: geneName (str) – Gene name, e.g. ‘b0004’.
Returns: Gene object.
Return type: Raises: HTTPError– If gene does not exist.URLError– If connection to KEGG fails.
-
getGeneIDs(pathway: KGML_pathway.Pathway or 00260) → Set[str][source]¶ Get the set of all gene IDs of this organism in a certain pathway.
Automatically chooses
getGeneIDsByName()orgetGeneIDsByPathway(), depending on the type of pathway. Deduplicates original list.Parameters: pathway (Pathway or str) – The pathway to search, either as
FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathwayobject or its name as a string, e.g. ‘00260’.Returns: List of gene IDs in pathway, e.g. [‘eco:b0632’, ‘eco:b0839’, ‘eco:b2010’].
Return type: Set[str]
Raises: HTTPError– If name passed and pathway does not exist.URLError– If name passed and connection fails.
-
getGeneIDsByName(pathwayName: 00260) → Set[str][source]¶ Get the set of all gene IDs of this organism for a pathway name.
Deduplicates original list.
Parameters: pathwayName (str) – The pathway name to search, e.g. ‘00260’.
Returns: List of gene IDs in pathwayName, e.g. [‘eco:b0632’, ‘eco:b0839’, ‘eco:b2010’].
Return type: Set[str]
Raises: HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
getGeneIDsByPathway(pathway: FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathway) → Set[str][source]¶ Get the set of all gene IDs of this organism for a
FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathwayobject.Deduplicates original list.
Parameters: pathway (Pathway) – The pathway to search. Returns: List of gene IDs in pathway, e.g. [‘eco:b0632’, ‘eco:b0839’, ‘eco:b2010’]. Return type: Set[str]
-
getGenes(pathway: KGML_pathway.Pathway or 00260) → Set[FEV_KEGG.KEGG.DataTypes.Gene][source]¶ Get the set of all genes of this organism in a certain pathway.
Automatically chooses
getGenesByName()orgetGenesByPathway(), depending on the type of pathway. Deduplicates original list.Parameters: pathway (Pathway or str) – The pathway to search, either as
FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathwayobject or its name as a string, e.g. ‘00260’.Returns: List of gene IDs in pathway, e.g. [‘eco:b0632’, ‘eco:b0839’, ‘eco:b2010’].
Return type: Set[Gene]
Raises: HTTPError– If name passed and pathway does not exist.URLError– If name passed and connection fails.
-
getGenesByName(pathwayName: 00260) → Set[FEV_KEGG.KEGG.DataTypes.Gene][source]¶ Get the set of all genes of this organism for a pathway name.
Deduplicates original list.
Parameters: pathwayName (str) – The pathway name to search, e.g. ‘00260’.
Returns: List of gene IDs in pathwayName, e.g. [‘eco:b0632’, ‘eco:b0839’, ‘eco:b2010’].
Return type: Set[Gene]
Raises: HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
getGenesByPathway(pathway: FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathway) → Set[FEV_KEGG.KEGG.DataTypes.Gene][source]¶ Get the set of all genes of this organism for a
FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathwayobject.Deduplicates original list.
Parameters: pathway (Pathway) – The pathway to search. Returns: List of gene IDs in pathway, e.g. [‘eco:b0632’, ‘eco:b0839’, ‘eco:b2010’]. Return type: Set[Gene]
-
getMetabolicPathwayDescriptions(includeOverviewMaps=False) → Set[str][source]¶ Get descriptions of pathways that are part of metabolism.
Parameters: includeOverviewMaps (bool, optional) – Whether to include global/overview maps.
Returns: Set of pathway descriptions for all known metabolic pathways.
Return type: Set[str]
Raises: NoKnownPathwaysError– If the organism has no known pathways.HTTPError– If pathway description list should not exist. Which would be odd, if we are certain and tested that the organism itself exists.URLError– If connection to KEGG fails.
-
getMetabolicPathways(includeOverviewMaps=False) → Set[FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathway][source]¶ Gets a set of all metabolic pathway objects for this organism.
Parameters: includeOverviewMaps (bool, optional) – Whether to include global/overview maps.
Returns: Set of pathways objects for all known metabolic pathways.
Return type: Set[Pathway]
Raises: HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
getNumberOfGenes()[source]¶ Get the number of known genes within this genome.
Returns: Count of genes in this organism’s genome. These do not necessarily have to be mentioned in any pathway. Return type: int
-
getPathway(pathwayName: 00260) → FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathway[source]¶ Gets a certain pathway for this organism.
Parameters: pathwayName (str) – The name/number of the pathway, e.g. “00260”. This will be expanded with self.nameAbbreviation to, e.g. “eco:00260”.
Returns: The pathway object, or None if such a pathway does not exist.
Return type: Raises: HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
getPathwayDescriptions(includeOverviewMaps=False) → Set[str][source]¶ Get pathway descriptions for this organism.
Parameters: includeOverviewMaps (bool, optional) – Whether to include global/overview maps.
Returns: Set of pathway descriptions for all known pathways.
Return type: Set[str]
Raises: NoKnownPathwaysError– If the organism has no known pathways.HTTPError– If any other HTTP error occurs.URLError– If connection to KEGG fails.
-
getPathwayIDs(pathwayDescriptions: Set[str]) → Set[str][source]¶ Get pathway IDs from a set of descriptions.
A pathway ID is the occurence of a specific pathway in a specific organism, e.g. pathway ‘00260’ in ‘eco’ -> ‘eco00260’.
Parameters: pathwayDescriptions (Set[str]) – The pathway descriptions to be searched, e.g. ‘path:eco00260 Glycine, serine and threonine metabolism - Escherichia coli K-12 MG1655’. Returns: Pathway IDs, e.g. ‘eco00260’. Return type: Set[str]
-
getPathwayNames(pathwayIDs: Set[str]) → Set[str][source]¶ Get pathway names from a set of IDs.
A pathway name is a specific pathway, independent from any organism.
Parameters: pathwayDescriptions (Set[str]) – The pathway IDs to be searched, e.g. ‘eco00260’. Returns: Pathway name, e.g. ‘00260’. Return type: Set[str]
-
getPathways(includeOverviewMaps=False) → Set[FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathway][source]¶ Gets a set of all pathway objects for this organism.
Parameters: includeOverviewMaps (bool, optional) – Whether to include global/overview maps.
Returns: Set of pathways objects for all known pathways.
Return type: Set[Pathway]
Raises: NoKnownPathwaysError– If the organism has no known pathways.HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
getPathwaysFromNames(pathwayNameSet: Set[str]) → Set[FEV_KEGG.lib.Biopython.KEGG.KGML.KGML_pathway.Pathway][source]¶ Gets a set of pathway objects for this organism, based on a set of pathway names, eg. {‘00260’, ‘01100’}.
Parameters: pathwayNameSet (Set[str]) – The names/numbers of the pathways, e.g. ‘00260’. This will be expanded with self.nameAbbreviation to, e.g. ‘eco00260’.
Returns: Set of pathways objects for all pathways from pathwayNameSet. If pathway exists, but has no KGML format, the entry for this pathway is None.
Return type: Set[Pathway]
Raises: HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
metabolicPathways¶ Pathways of metabolism, without overview or global maps.
Returns: Set of pathways objects for all known metabolic pathways, excluding global/overview pathways.
Return type: Set[Pathway]
Raises: HTTPError– If pathway does not exist.URLError– If connection to KEGG fails.
-
substanceEcGraph(noMultifunctional=True, returnCacheEntry=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of this organism.
Parameters: - noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- returnCacheEntry (bool, optional) – If True, do not return the graph, but instead a
FEV_KEGG.KEGG.File.CacheEntry. This cache entry can be useful for parallel computation.
Returns: The graph has substrates/products as its nodes and EC numbers as the connecting edges. Edges have a direction.
Return type: Raises: HTTPError– If any gene or pathway does not exist.URLError– If connection to KEGG fails.
-
substanceEnzymeGraph(noMultifunctional=True, returnCacheEntry=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of this organism.
Parameters: - noMultifunctional (bool, optional) – If True, ignore enzymes with multiple EC numbers.
- returnCacheEntry (bool, optional) – If True, do not return the graph, but instead a
FEV_KEGG.KEGG.File.CacheEntry. This cache entry can be useful for parallel computation.
Returns: The graph has substrates/products as its nodes and enzymes as the connecting edges. Edges have a direction.
Return type: Raises: HTTPError– If any gene or pathway does not exist.URLError– If connection to KEGG fails.
-
substanceGeneGraph(returnCacheEntry=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceGeneGraph[source]¶ Substance-Gene graph of this organism.
Parameters: returnCacheEntry (bool, optional) – If True, do not return the graph, but instead a
FEV_KEGG.KEGG.File.CacheEntry. This cache entry can be useful for parallel computation.Returns: The graph has substrates/products as its nodes and genes as the connecting edges. Edges have a direction.
Return type: Raises: HTTPError– If any gene or pathway does not exist.URLError– If connection to KEGG fails.
-
substanceReactionGraph(returnCacheEntry=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceReactionGraph[source]¶ Substance-Reaction graph of this organism.
Parameters: returnCacheEntry (bool, optional) – If True, do not return the graph, but instead a
FEV_KEGG.KEGG.File.CacheEntry. This cache entry can be useful for parallel computation.Returns: The graph has substrates/products as its nodes and reactions as the connecting edges. Edges have a direction.
Return type: Raises: HTTPError– If any gene or pathway does not exist.URLError– If connection to KEGG fails.