FEV_KEGG.Evolution.Clade module¶
-
class
FEV_KEGG.Evolution.Clade.Clade(ncbiNames: e.g. Enterobacter or Proteobacteria/Gammaproteobacteria. Allows list of names, e.g. ["Gammaproteobacteria", "/Archaea"], excludeUnclassified=True, oneOrganismPerSpecies=True)[source]¶ Bases:
objectA clade in NCBI taxonomy, containing all leaf taxon’s KEGG organisms.
Parameters: - ncbiNames (str or Iterable[str]) – String(s) a taxon’s path must contain to be included in this clade.
- excludeUnclassified (bool, optional) – If True, ignore taxons with a path containing the string ‘unclassified’.
- oneOrganismPerSpecies (bool, optional) – If True, use only the first organism of each species.
Variables: - self.ncbiNames (Iterable[str]) – Part of the path of each leaf taxon to be included in this clade. A single string is wrapped in a list.
- self.group – The
FEV_KEGG.KEGG.Organism.Groupof KEGG organisms created from the found leaf taxons.
Raises: ValueError– If no clade with ncbiNames in its path could be found.Warning
It is possible to include organisms of several clades in the same Clade object! For example, if you were to search for ncbiNames == ‘Donaldus Duckus’, you would get every organism within ‘/Bacteria/Donaldus Duckus’ and ‘/Archaea/Order/Donaldus Duckus’. Use the slash (/) notation to make sure you only get the taxon you want, e.g. ‘Proteobacteria/Gammaproteobacteria’ or ‘/Archaea’.
-
collectiveMetabolism(excludeMultifunctionalEnzymes=True, addEcDescriptions=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ The Substance-EC graph representing the collective metabolic network, occuring in any organism of the clade.
This includes each and every EC number which occurs in any organism of this clade.
Parameters: excludeMultifunctionalEnzymes (bool, optional) – If True, ignore enzymes with more than one EC number.
Returns: Collective metabolic network of EC numbers, including counts of occurence in each of the clade’s organisms.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
collectiveMetabolismEnzymes(excludeMultifunctionalEnzymes=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The Substance-Enzyme graph representing the collective metabolic network, occuring in any organism of the clade.
This includes each and every enzyme of every organism of this clade.
Parameters: excludeMultifunctionalEnzymes (bool, optional) – If True, ignore enzymes with more than one EC number.
Returns: Collective metabolic network of enzymes.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
coreMetabolism(majorityPercentageCoreMetabolism=80, excludeMultifunctionalEnzymes=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ The Substance-EC graph representing the common metabolic network, shared among all organisms of the clade.
This includes only EC numbers which occur in at least majorityPercentageCoreMetabolism % of all organisms of this clade.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – A path (substance -> EC -> product) has to occur in majorityPercentageCoreMetabolism % of the clade’s organisms to be included.
- excludeMultifunctionalEnzymes (bool, optional) – If True, ignore enzymes with more than one EC number.
Returns: Core metabolic network of EC numbers.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
coreMetabolismEnzymes(majorityPercentageCoreMetabolism=80, excludeMultifunctionalEnzymes=True) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The Substance-Enzyme graph representing the common metabolic network, shared among all organisms of the clade.
This includes every Enzyme associated with an EC number occuring in core metabolism (see
substanceEcGraph()), no matter from which organism it stems.Parameters: - majorityPercentageCoreMetabolism (int, optional) – A path (substance -> EC -> product) has to occur in majorityPercentageCoreMetabolism % of the clade’s organisms to be included.
- excludeMultifunctionalEnzymes (bool, optional) – If True, ignore enzymes with more than one EC number.
Returns: Core metabolic network of enzymes.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
geneDuplicatedEnzymePairs(majorityPercentageCoreMetabolism=80) → Set[Tuple[FEV_KEGG.Graph.Elements.Enzyme, FEV_KEGG.Graph.Elements.Enzyme]][source]¶ All gene duplicated enzymes of the core metabolism, paired with each of their duplicates.
If enzyme A is a duplicate of enzyme B and vice versa, this does not return duplicates, but returns only one pair, with the “smaller” enzyme as the first value. An enzyme is “smaller” if its gene ID string is “smaller”.
Parameters: majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
Returns: Set of gene-duplicated enzymes, broken down into pairs of enzymes. Can obviously create many duplicates left and right.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
geneDuplicatedEnzymes(majorityPercentageCoreMetabolism=80, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The substance-Enzyme graph of all gene duplicated enzymes of the core metabolism.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
- colour (bool, optional) – If True, colours the gene-duplicated enzyme edges in green. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Alternatively, you can specify a
Export.Colour.
Returns: Substance-Enzyme graph containing all gene-duplicated enzymes, and nothing else. If colour == True, returns the full core metabolism enzyme graph, colouring gene-duplicated enzymes green.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
geneDuplicatedEnzymesDict(majorityPercentageCoreMetabolism=80) → Dict[FEV_KEGG.Graph.Elements.Enzyme, Set[FEV_KEGG.Graph.Elements.GeneID]][source]¶ All gene duplicated enzymes of the core metabolism, pointing to all their duplicates.
Parameters: majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
Returns: Each gene ID on the right usually has an entry of its own, as an enzyme object, on the left, because they are each others homologs.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
neofunctionalisations(majorityPercentageCoreMetabolism=80, eValue=1e-15, considerOnlyECs=None) → Set[FEV_KEGG.Evolution.Events.Neofunctionalisation][source]¶ Get neofunctionalisation events of all enzymes in the core metabolism.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
- eValue (float, optional) – Threshold for the statistical expectation value (E-value), below which a sequence alignment is considered significant.
- considerOnlyECs (Iterable[EcNumber], optional) – If given, only enzymes with an EC number in considerOnlyECs are tested for neofunctionalisation.
Returns: Set of possible neofunctionalisation events.
Return type: Set[Neofunctionalisation]
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
neofunctionalisationsForFunctionChange(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0, eValue=1e-15, considerOnlyECs=None) → Dict[FEV_KEGG.Evolution.Events.FunctionChange, Set[FEV_KEGG.Evolution.Events.Neofunctionalisation]][source]¶ Get neofunctionalisation events of all enzymes in the core metabolism, grouped by each possible function change event.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
- majorityPercentageNeofunctionalisation (int, optional) – Every EC number considered for neofunctionalisation has to be associated with a function change of neofunctionalisations whose enzymes involve at least majorityPercentageNeofunctionalisation % of of the clade’s organisms. A high majorityPercentageNeofunctionalisation disallows us to detect neofunctionalisations which happened a long time ago, with their genes having diverged significantly; or only recently, with not all organisms of the child clade having picked up the new function, yet.
- eValue (float, optional) – Threshold for the statistical expectation value (E-value), below which a sequence alignment is considered significant.
- considerOnlyECs (Iterable[EcNumber], optional) – If given, only enzymes with an EC number in considerOnlyECs are tested for neofunctionalisation.
Returns: Dictionary of function changes, pointing to a set of neofunctionalisations which might have caused them.
Since an enzyme of a neofunctionalisation can have multiple EC numbers, all combinations of the two enzymes’ EC numbers are formed and treated as separate possible function changes. The neofunctionalisation is then saved again for each function change, which obviously leads to duplicated neofunctionalisation objects.
Return type: Dict[FunctionChange, Set[Neofunctionalisation]]
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
neofunctionalisedECs(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0, colour=False, eValue=1e-15, considerOnlyECs=None) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ The substance-EC graph of EC numbers belonging to function changes of neofunctionalised enzymes of the core metabolism.
Only EC numbers which could have actually taken part in a function change are reported. This is because enzymes can have multiple EC numbers, while only some might be eligible for a function change. For example, consider enzyme A (1.2.3.4, 6.5.4.3) and enzyme B (1.2.3.4, 4.5.6.7). 1.2.3.4 can never change its function to itself, which leaves 1.2.3.4 <-> 6.5.4.3, 1.2.3.4 <-> 4.5.6.7, and 4.5.6.7 <-> 6.5.4.3 as possible function changes. This obviously requires a function to change to a single other function, without splitting or merging, which might be biologically inacurate. However, this should happen rarely, plus one could exclude all enzymes with multiple functions from the core metabolism in the first place.
The maximum expectation value (e-value) necessary for a sequence alignment to constitute a “similar sequence” can be changed via
defaultEValue.Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
- majorityPercentageNeofunctionalisation (int, optional) – Every EC number considered for neofunctionalisation has to be associated with a function change of neofunctionalisations whose enzymes involve at least majorityPercentageNeofunctionalisation % of of the clade’s organisms. A high majorityPercentageNeofunctionalisation disallows us to detect neofunctionalisations which happened a long time ago, with their genes having diverged significantly; or only recently, with not all organisms of the child clade having picked up the new function, yet.
- colour (bool, optional) – If True, colours the neofunctionalised EC edges in green. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Alternatively, you can specify a
Export.Colour. - eValue (float, optional) – Threshold for the statistical expectation value (E-value), below which a sequence alignment is considered significant.
- considerOnlyECs (Iterable[EcNumber], optional) – If given, only enzymes with an EC number in considerOnlyECs are tested for neofunctionalisation.
Returns: The substance-EC graph representing the metabolic network which was probably affected due to neofunctionalisations of the core metabolism of the clade. If colour == True, returns the full union of parent and child, colouring neofunctionalised ECs green.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
neofunctionalisedEnzymes(majorityPercentageCoreMetabolism=80, colour=False, eValue=1e-15, considerOnlyECs=None) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ The substance-Enzyme graph of all neofunctionalised enzymes of the core metabolism.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
- colour (bool, optional) – If True, colours the neofunctionalised enzyme edges in green. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Alternatively, you can specify a
Export.Colour. - eValue (float, optional) – Threshold for the statistical expectation value (E-value), below which a sequence alignment is considered significant.
- considerOnlyECs (Iterable[EcNumber], optional) – If given, only enzymes with an EC number in considerOnlyECs are tested for neofunctionalisation.
Returns: Substance-Enzyme graph containing all neofunctionalised enzymes, and nothing else. If colour == True, returns the full core metabolism enzyme graph, colouring neofunctionalised enzymes green.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
organismsCount¶ The number of organisms (leaf taxons) in this clade.
Returns: The number of organisms (leaf taxons) in this clade. Return type: int
-
redundantECsForContributingNeofunctionalisation(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0, eValue=1e-15, redundancyType: RedundancyType = None, considerOnlyECs=None) → Dict[FEV_KEGG.Evolution.Events.Neofunctionalisation, Set[FEV_KEGG.Graph.Elements.EcNumber]][source]¶ Get neofunctionalisation events of all enzymes in the core metabolism, which contribute to redundancy, pointing to the EC numbers their function changes’ EC numbers provides redundancy for.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism.
- majorityPercentageNeofunctionalisation (int, optional) – Every EC number considered for neofunctionalisation has to be associated with a function change of neofunctionalisations whose enzymes involve at least majorityPercentageNeofunctionalisation % of of the clade’s organisms. A high majorityPercentageNeofunctionalisation disallows us to detect neofunctionalisations which happened a long time ago, with their genes having diverged significantly; or only recently, with not all organisms of the child clade having picked up the new function, yet.
- eValue (float, optional) – Threshold for the statistical expectation value (E-value), below which a sequence alignment is considered significant.
- redundancyType (RedundancyType) – Definition of redundancy for which to check the neofunctionalisation’s contribution. Default to RedundancyType.default.
- considerOnlyECs (Iterable[EcNumber], optional) – If given, only enzymes with an EC number in considerOnlyECs are tested for neofunctionalisation.
Returns: Dictionary of function changes, pointing to a set of neofunctionalisations which might have caused them.
Since an enzyme of a neofunctionalisation can have multiple EC numbers, all combinations of the two enzymes’ EC numbers are formed and treated as separate possible function changes. The neofunctionalisation is then saved again for each function change, which obviously leads to duplicated neofunctionalisation objects.
Return type: Dict[FunctionChange, Set[Neofunctionalisation]]
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
class
FEV_KEGG.Evolution.Clade.CladePair(parent, child, excludeUnclassified=True, oneOrganismPerSpecies=True)[source]¶ Bases:
objectTwo clades in NCBI taxonomy, ‘child’ is assumed younger than ‘parent’.
Does not check if the child taxon is actually a child of the parent taxon. Therefore, it would be possible to pass a list of NCBI names to the underlying
Cladeobjects by instantiating parent = List[str] and/or child = List[str]. This is useful when comparing groups of organisms which are, according to NCBI, not related.Parameters: - parent (str or List[str] or Clade) – Path(s) of the parent clade’s taxon, as defined by NCBI taxonomy, e.g. ‘Proteobacteria/Gammaproteobacteria’. Or a ready
Cladeobject. - child (str or List[str] or Clade) – Path(s) of the child clade’s taxon, as defined by NCBI taxonomy, e.g. ‘Enterobacter’. Or a ready
Cladeobject. - excludeUnclassified (bool, optional) – If True, ignore taxons with a path containing the string ‘unclassified’. Only used if one of parent and/or child is not already a
Clade. - oneOrganismPerSpecies (bool, optional) – If True, use only the first organism of each species.
Variables: -
addedMetabolism(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of the added core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism. This is individually true for both parent clade and child clade. The parent clade fully includes the child clade, therefore, the occurence of a substance-EC-product edge in the child clade’s core metabolism counts towards the percentage for the parent clade’s core metabolism. Meaning: if an EC number does not occur in the child clade’s core metabolism, it is unlikely that it will occur in the parent clade’s core metabolism, unless majorityPercentageCoreMetabolism is consecutively lowered towards 0.
Returns: The substance-EC graph representing the metabolic network which was added to the core metabolism of the parent (assumed older) on the way to the core metabolism of the child (assumed younger).
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
addedMetabolismEnzymes(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph derived from the added core metabolism, see
addedMetabolism().First, the added core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the child’s enzyme metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
addedMetabolism().Returns: Substance-Enzyme graph of enzymes from the child clade. Calculated using the added EC numbers found by
addedMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
addedMetabolismGeneDuplicatedEnzymePairs(majorityPercentageCoreMetabolism=80) → Set[Tuple[FEV_KEGG.Graph.Elements.Enzyme, FEV_KEGG.Graph.Elements.Enzyme]][source]¶ Pairs of gene-duplicated enzymes, derived from the added core metabolism.
First, the added core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the child’s enzyme metabolism. Then the gene-duplicated enzymes are calculated. Finally, the gene-duplicated enzyme pairs of the conserved core metabolism enzymes are reported.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
addedMetabolism().Returns: Pairs of enzymes from the child clade. Calculated using the added EC numbers found by
addedMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
addedMetabolismGeneDuplicatedEnzymes(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of gene-duplicated enzymes, derived from the added core metabolism.
First, the added core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the child’s enzyme metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
addedMetabolism().Returns: Substance-Enzyme graph of enzymes from the child clade. Calculated using the added EC numbers found by
addedMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
addedMetabolismNeofunctionalisedECs(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of “neofunctionalised” EC numbers, derived from the added core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
addedMetabolism().Returns: Substance-EC graph of ECs from the child clade. Calculated using the added EC numbers found by
addedMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
addedMetabolismNeofunctionalisedEnzymes(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of neofunctionalised enzymes, derived from the added core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
addedMetabolism().Returns: Substance-Enzyme graph of enzymes from the child clade. Calculated using the added EC numbers found by
addedMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
childNCBInames¶ All names/paths in NCBI taxonomy used to create the child clade.
-
conservedMetabolism(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of the conserved core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism. This is individually true for both parent clade and child clade. The parent clade fully includes the child clade, therefore, the occurence of a substance-EC-product edge in the child clade’s core metabolism counts towards the percentage for the parent clade’s core metabolism. Meaning: if an EC number does not occur in the child clade’s core metabolism, it is unlikely that it will occur in the parent clade’s core metabolism, unless majorityPercentageCoreMetabolism is consecutively lowered towards 0.
Returns: The substance-EC graph representing the metabolic network which stayed the same between the core metabolism of the parent (assumed older) and the core metabolism of the child (assumed younger).
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
conservedMetabolismEnzymes(majorityPercentageCoreMetabolism=80, colour=False)[source]¶ Two Substance-Enzyme graphs derived from the conserved core metabolism, see
conservedMetabolism().First, the conserved core metabolism is calculated. Then, the enzymes associated with the conserved EC numbers are extracted from the collective parent’s and child’s metabolism individually.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the enzyme edges from the parent in blue, and from the child in red. When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-Enzyme graphs calculated using the conserved EC numbers found by
conservedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-Enzyme graph, coloured blue for parent and red for child.Return type: Tuple[SubstanceEnzymeGraph, SubstanceEnzymeGraph] or SubstanceEnzymeGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
conservedMetabolismGeneDuplicatedEnzymePairs(majorityPercentageCoreMetabolism=80) → Tuple[Set[Tuple[FEV_KEGG.Graph.Elements.Enzyme, FEV_KEGG.Graph.Elements.Enzyme]]][source]¶ Pairs of gene-duplicated enzymes, derived from the conserved core metabolism.
First, the conserved core metabolism is calculated. Then, the enzymes associated with the conserved EC numbers are extracted from the collective parent’s and child’s metabolism individually. Then, for parent and child, the gene-duplicated enzyme pairs are calculated. Finally, the gene-duplicated enzymes where both enzymes are in the conserved core metabolism are reported.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism().Returns: Tuple of two sets of tuples of gene-duplicated enzyme pairs calculated using the conserved EC numbers found by
conservedMetabolism(). The first set is from the parent clade, the second set from the child clade.Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
conservedMetabolismGeneDuplicatedEnzymes(majorityPercentageCoreMetabolism=80, colour=False)[source]¶ Two Substance-Enzyme graphs of gene-duplicated enzymes, derived from the conserved core metabolism.
First, the conserved core metabolism is calculated. Then, the enzymes associated with the conserved EC numbers are extracted from the collective parent’s and child’s metabolism individually. Then, for parent and child, the gene-duplicated enzymes are calculated. Finally, the gene-duplicated enzymes of the conserved core metabolism enzymes are reported.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the enzyme edges from the parent in blue, and from the child in red. Gene-duplicated enzyme edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-Enzyme graphs calculated using the conserved EC numbers found by
conservedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-Enzyme graph.Return type: Tuple[SubstanceEnzymeGraph, SubstanceEnzymeGraph] or SubstanceEnzymeGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
conservedMetabolismNeofunctionalisedECs(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0, colour=False)[source]¶ Two Substance-EC graphs of “neofunctionalised” EC numbers, derived from the conserved core metabolism.
First, the conserved core metabolism is calculated. Then, the enzymes associated with the conserved EC numbers are extracted from the collective parent’s and child’s metabolism individually. Then, for parent and child, the gene-duplicated enzymes are calculated. Then, the gene-duplicated enzymes of the conserved core metabolism enzymes are identified. Then, the pairs of enzymes in which EC numbers differ are identified. Finally, the EC numbers which are part of these function changes are reported.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the EC edges from the parent in blue, and from the child in red. “Neofunctionalised” EC edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEcGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-EC graphs calculated using the conserved EC numbers found by
conservedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-EC graph.Return type: Tuple[SubstanceEcGraph, SubstanceEcGraph] or SubstanceEcGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
conservedMetabolismNeofunctionalisedEnzymes(majorityPercentageCoreMetabolism=80, colour=False)[source]¶ Two Substance-Enzyme graphs of neofunctionalised enzymes, derived from the conserved core metabolism.
First, the conserved core metabolism is calculated. Then, the enzymes associated with the conserved EC numbers are extracted from the collective parent’s and child’s metabolism individually. Then, for parent and child, the gene-duplicated enzymes are calculated. Then, the gene-duplicated enzymes of the conserved core metabolism enzymes are identified. Finally, the pairs of enzymes in which EC numbers differ are reported.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the enzyme edges from the parent in blue, and from the child in red. Neofunctionalised enzyme edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-Enzyme graphs calculated using the conserved EC numbers found by
conservedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-Enzyme graph.Return type: Tuple[SubstanceEnzymeGraph, SubstanceEnzymeGraph] or SubstanceEnzymeGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
divergedMetabolism(majorityPercentageCoreMetabolism=80, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of the diverged core metabolism.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism. This is individually true for both parent clade and child clade. The parent clade fully includes the child clade, therefore, the occurence of a substance-EC-product edge in the child clade’s core metabolism counts towards the percentage for the parent clade’s core metabolism. Meaning: if an EC number does not occur in the child clade’s core metabolism, it is unlikely that it will occur in the parent clade’s core metabolism, unless majorityPercentageCoreMetabolism is consecutively lowered towards 0.
- colour (bool, optional) – If True, colours the lost EC edges in blue, and the added EC edges in red. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: The substance-EC graph representing the metabolic network which changed between the core metabolism of the parent (assumed older) and the core metabolism of the child (assumed younger).
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
divergedMetabolismEnzymes(majorityPercentageCoreMetabolism=80, colour=False)[source]¶ Two Substance-Enzyme graphs derived from the diverged core metabolism, see
divergedMetabolism().First, the diverged core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the collective parent’s and child’s metabolism individually.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
divergedMetabolism(). - colour (bool, optional) – If True, colours the lost enzyme edges in blue, and the added enzyme edges in red. When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-Enzyme graphs calculated using the diverged EC numbers found by
divergedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-Enzyme graph, coloured blue for parent and red for child.Return type: Tuple[SubstanceEnzymeGraph, SubstanceEnzymeGraph] or SubstanceEnzymeGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
divergedMetabolismGeneDuplicatedEnzymePairs(majorityPercentageCoreMetabolism=80) → Set[Tuple[FEV_KEGG.Graph.Elements.Enzyme, FEV_KEGG.Graph.Elements.Enzyme]][source]¶ Pairs of gene-duplicated enzymes, derived from the diverged core metabolism.
First, the diverged core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the collective parent’s and child’s metabolism individually. Then, for parent and child, the gene-duplicated enzyme pairs are calculated. Finally, the gene-duplicated enzymes where both enzymes are in the conserved core metabolism are reported.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
divergedMetabolism(). - colour (bool, optional) – If True, colours the lost enzyme edges in blue, and the added enzyme edges in red. Gene-duplicated enzyme edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Sets of tuples of gene-duplicated enzyme pairs calculated using the diverged EC numbers found by
divergedMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
divergedMetabolismGeneDuplicatedEnzymes(majorityPercentageCoreMetabolism=80, colour=False)[source]¶ Two Substance-Enzyme graphs of gene-duplicated enzymes, derived from the diverged core metabolism.
First, the diverged core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the collective parent’s and child’s metabolism individually.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
divergedMetabolism(). - colour (bool, optional) – If True, colours the lost enzyme edges in blue, and the added enzyme edges in red. Gene-duplicated enzyme edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-Enzyme graphs calculated using the diverged EC numbers found by
divergedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-Enzyme graph, coloured blue for parent and red for child.Return type: Tuple[SubstanceEnzymeGraph, SubstanceEnzymeGraph] or SubstanceEnzymeGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
divergedMetabolismNeofunctionalisedECs(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0, colour=False)[source]¶ Two Substance-EC graphs of “neofunctionalised” EC numbers, derived from the diverged core metabolism.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
divergedMetabolism(). - colour (bool, optional) – If True, colours the lost EC edges in blue, and the added EC edges in red. “Neofunctionalised” EC edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEcGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-EC graphs calculated using the diverged EC numbers found by
divergedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-EC graph, coloured blue for parent and red for child.Return type: Tuple[SubstanceEcGraph, SubstanceEcGraph] or SubstanceEcGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
divergedMetabolismNeofunctionalisedEnzymes(majorityPercentageCoreMetabolism=80, colour=False)[source]¶ Two Substance-Enzyme graphs of neofunctionalised enzymes, derived from the diverged core metabolism.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
divergedMetabolism(). - colour (bool, optional) – If True, colours the lost enzyme edges in blue, and the added enzyme edges in red. Neofunctionalised enzyme edges of the parent are coloured in green, the ones of the child in yellow.
When doing so, a single
SubstanceEnzymeGraphis returned, not aTuple. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: Tuple of two Substance-Enzyme graphs calculated using the diverged EC numbers found by
divergedMetabolism(). The first graph is from the parent clade, the second graph from the child clade. If colour == True, returns a single Substance-Enzyme graph, coloured blue for parent and red for child.Return type: Tuple[SubstanceEnzymeGraph, SubstanceEnzymeGraph] or SubstanceEnzymeGraph
Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
lostMetabolism(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of the lost core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – Every substance-EC-product edge has to occur in majorityPercentageCoreMetabolism % of organisms constituting the clade, to be included in the core metabolism. This is individually true for both parent clade and child clade. The parent clade fully includes the child clade, therefore, the occurence of a substance-EC-product edge in the child clade’s core metabolism counts towards the percentage for the parent clade’s core metabolism. Meaning: if an EC number does not occur in the child clade’s core metabolism, it is unlikely that it will occur in the parent clade’s core metabolism, unless majorityPercentageCoreMetabolism is consecutively lowered towards 0.
Returns: The substance-EC graph representing the metabolic network which got lost from the core metabolism of the parent (assumed older) on the way to the core metabolism of the child (assumed younger).
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
lostMetabolismEnzymes(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph derived from the lost core metabolism, see
lostMetabolism().First, the lost core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the parent’s enzyme metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
lostMetabolism().Returns: Substance-Enzyme graph of enzymes from the parent clade. Calculated using the lost EC numbers found by
lostMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
lostMetabolismGeneDuplicatedEnzymePairs(majorityPercentageCoreMetabolism=80) → Set[Tuple[FEV_KEGG.Graph.Elements.Enzyme, FEV_KEGG.Graph.Elements.Enzyme]][source]¶ Pairs of gene-duplicated enzymes, derived from the lost core metabolism.
First, the lost core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the parent’s enzyme metabolism. Then the gene-duplicated enzymes are calculated. Finally, the gene-duplicated enzyme pairs of the conserved core metabolism enzymes are reported.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
lostMetabolism().Returns: Pairs of enzymes from the parent clade. Calculated using the lost EC numbers found by
lostMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
lostMetabolismGeneDuplicatedEnzymes(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of gene-duplicated enzymes, derived from the lost core metabolism.
First, the lost core metabolism is calculated. Then, the enzymes associated with the added EC numbers are extracted from the parent’s enzyme metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
lostMetabolism().Returns: Substance-Enzyme graph of enzymes from the parent clade. Calculated using the lost EC numbers found by
lostMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
lostMetabolismNeofunctionalisedECs(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of “neofunctionalised” EC numbers, derived from the lost core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
lostMetabolism().Returns: Substance-EC graph of ECs from the parent clade. Calculated using the lost EC numbers found by
lostMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
lostMetabolismNeofunctionalisedEnzymes(majorityPercentageCoreMetabolism=80) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of neofunctionalised enzymes, derived from the lost core metabolism.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
lostMetabolism().Returns: Substance-Enzyme graph of enzymes from the parent clade. Calculated using the lost EC numbers found by
lostMetabolism().Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
parentNCBInames¶ All names/paths in NCBI taxonomy used to create the parent clade.
-
unifiedMetabolism(majorityPercentageCoreMetabolism=80, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of the unified core metabolisms.
The lost metabolism of the parent is coloured in blue, the conserved metabolism of both in red, and the added metabolism of the child in pink. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the parent’s EC edges in blue, the child’s EC edges in red, and the shared EC edges in pink. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: The substance-EC graph representing the combined metabolic networks of both, child and parent. If colour == True, coloured differently for the lost, conserved, and added edges. Nodes are not coloured.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
See also
FEV_KEGG.Drawing.Export- Export the graph into a file, e.g. for visualisation in Cytoscape.
- majorityPercentageCoreMetabolism (int, optional) – See
-
unifiedMetabolismEnzymes(majorityPercentageCoreMetabolism=80, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph derived from the unified core metabolisms.
The lost metabolism of the parent is coloured in blue, the conserved metabolism of both in red, and the added metabolism of the child in pink. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the parent’s enzyme edges in blue, and the child’s enzyme edges in red. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: The substance-Enzyme graph representing the combined metabolic networks of both, child and parent. If colour == True, coloured differently for the lost, conserved, and added edges. Nodes are not coloured.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
unifiedMetabolismGeneDuplicatedEnzymePairs(majorityPercentageCoreMetabolism=80) → Set[Tuple[FEV_KEGG.Graph.Elements.Enzyme, FEV_KEGG.Graph.Elements.Enzyme]][source]¶ Pairs of gene-duplicated enzymes, derived from the unified core metabolisms.
Parameters: majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism().Returns: Set of enzyme pairs representing the gene-duplicated enzymes of the combined metabolic networks of both, child and parent.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
-
unifiedMetabolismGeneDuplicatedEnzymes(majorityPercentageCoreMetabolism=80, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of gene-duplicated enzymes, derived from the unified core metabolisms.
The lost metabolism of the parent is coloured in blue, the conserved metabolism of both in red, and the added metabolism of the child in pink. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the parent’s enzyme edges in blue, and the child’s enzyme edges in red. Gene-duplicated enzyme edges of the parent are coloured in green, the ones of the child in yellow. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: The substance-Enzyme graph representing the combined metabolic networks of both, child and parent. If colour == True, coloured differently for the lost, conserved, and added edges. Nodes are not coloured.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
unifiedMetabolismNeofunctionalisedECs(majorityPercentageCoreMetabolism=80, majorityPercentageNeofunctionalisation=0, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEcGraph[source]¶ Substance-EC graph of “neofunctionalised” EC numbers, derived from the unified core metabolisms.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the parent’s EC edges in blue, and the child’s EC edges in red. “Neofunctionalised” EC edges of the parent are coloured in green, the ones of the child in yellow. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: The substance-EC graph representing the combined metabolic networks of both, child and parent. If colour == True, coloured differently for the lost, conserved, and added edges. Nodes are not coloured.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
-
unifiedMetabolismNeofunctionalisedEnzymes(majorityPercentageCoreMetabolism=80, colour=False) → FEV_KEGG.Graph.SubstanceGraphs.SubstanceEnzymeGraph[source]¶ Substance-Enzyme graph of neofunctionalised enzymes, derived from the unified core metabolisms.
Parameters: - majorityPercentageCoreMetabolism (int, optional) – See
conservedMetabolism(). - colour (bool, optional) – If True, colours the parent’s enzyme edges in blue, and the child’s enzyme edges in red. Neofunctionalised enzyme edges of the parent are coloured in green, the ones of the child in yellow. The colouring is realised by adding a ‘colour’ attribute to each edge. Nodes are not coloured.
Returns: The substance-Enzyme graph representing the combined metabolic networks of both, child and parent. If colour == True, coloured differently for the lost, conserved, and added edges. Nodes are not coloured.
Return type: Raises: TypeError– If you failed to enableFEV_KEGG.settings.automaticallyStartProcessPoolor to provide aFEV_KEGG.Util.Parallelism.processPool. SeeFEV_KEGG.KEGG.Organism.Group._getGraphsParallelly().HTTPError– If fetching any of the underlying graphs fails.URLError– If connection to KEGG fails.
- majorityPercentageCoreMetabolism (int, optional) – See
- parent (str or List[str] or Clade) – Path(s) of the parent clade’s taxon, as defined by NCBI taxonomy, e.g. ‘Proteobacteria/Gammaproteobacteria’. Or a ready
-
class
FEV_KEGG.Evolution.Clade.NestedCladePair(parent, child, excludeUnclassified=True)[source]¶ Bases:
FEV_KEGG.Evolution.Clade.CladePairTwo clades in NCBI taxonomy, ‘child’ is assumed younger and must be nested somewhere inside ‘parent’.
This only checks nestedness for the first node found in taxonomy, by the first parent’s/child’s NCBI name, respectively. The latter being relevant if you pass a
Clade, which has a list of NCBI names, or a list of NCBI names itself.Parameters: - parent (str or List[str] or Clade) – Path(s) of the parent clade’s taxon, as defined by NCBI taxonomy, e.g. ‘Proteobacteria/Gammaproteobacteria’. Or a ready
Cladeobject. - child (str or List[str] or Clade) – Path(s) of the child clade’s taxon, as defined by NCBI taxonomy, e.g. ‘Enterobacter’. Or a ready
Cladeobject. - excludeUnclassified (bool, optional) – If True, ignore taxons with a path containing the string ‘unclassified’.
Variables: Raises: ValueError– If parent or child are unknown taxons. Or if the child taxon is not actually a child of the parent taxon.- parent (str or List[str] or Clade) – Path(s) of the parent clade’s taxon, as defined by NCBI taxonomy, e.g. ‘Proteobacteria/Gammaproteobacteria’. Or a ready
-
FEV_KEGG.Evolution.Clade.defaultEValue= 1e-15¶ Default threshold for the statistical expectation value (E-value), below which a sequence alignment is considered significant.
-
FEV_KEGG.Evolution.Clade.defaultExcludeMultifunctionalEnzymes= True¶ If True, ignore enzymes with more than one EC number. This can be overridden in each relevant method’s excludeMultifunctionalEnzymes parameter in this module.
-
FEV_KEGG.Evolution.Clade.defaultExcludeUnclassified= True¶ If True, ignore taxons with a path containing the string ‘unclassified’. This can be overridden in each relevant method’s excludeUnclassified parameter in this module.
-
FEV_KEGG.Evolution.Clade.defaultMajorityPercentageCoreMetabolism= 80¶ Default percentage of organisms in the clade, which have to possess an EC number, for it to be included in the core metabolism of the clade. See
FEV_KEGG.KEGG.Organism.Group.majorityEcGraph(). This can be overridden in each relevant method’s majorityPercentageCoreMetabolism parameter in this module.
-
FEV_KEGG.Evolution.Clade.defaultMajorityPercentageNeofunctionalisation= 0¶ Default percentage of organisms in the clade, which have to possess the same “neofunctionalised” EC number, for it to be included in the set of “neofunctionalised” EC numbers of the clade. See
FEV_KEGG.KEGG.Evolution.Events.NeofunctionalisedECs. This can be overridden in each relevant method’s majorityPercentageNeofunctionalisation parameter in this module.
-
FEV_KEGG.Evolution.Clade.defaultOneOrganismPerSpecies= True¶ Default descision whether to use only the first organism for each species in NCBI taxonomy.