{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b4e01d14-77b9-49f5-a71e-ba1cee49ff09",
   "metadata": {
    "id": "b4e01d14-77b9-49f5-a71e-ba1cee49ff09"
   },
   "source": [
    "```\n",
    "---\n",
    "title: Enrichment analysis of proteins based on their GeneOntology annotations\n",
    "tags: GeneOntology, UniProt, enrichmentAnalysis, SPARQL\n",
    "lang: en\n",
    "version: 1.5\n",
    "date: 2026-04-01\n",
    "---\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "eYZ55aBKUrgg",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "eYZ55aBKUrgg",
    "outputId": "3aa54091-1d77-4e03-87f6-e7169a025b8b"
   },
   "outputs": [],
   "source": [
    "# if necessary extract the required files\n",
    "# !tar zxvf companionDirectories.tgz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "v3wh0oKWNz4V",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "v3wh0oKWNz4V",
    "outputId": "5217c2f5-397d-42c9-e42f-ee7486dfc8ea"
   },
   "outputs": [],
   "source": [
    "#!pip install graphviz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "5d895b04-463c-4169-b2f1-9a02dee2bb6b",
   "metadata": {
    "id": "5d895b04-463c-4169-b2f1-9a02dee2bb6b"
   },
   "outputs": [],
   "source": [
    "import graphviz\n",
    "import gzip\n",
    "#import importlib\n",
    "import IPython\n",
    "#import json\n",
    "import math\n",
    "#import matplotlib.pyplot as plt\n",
    "#import networkx as nx\n",
    "#import os\n",
    "import pandas as pd\n",
    "#import rdflib\n",
    "#import rdflib.namespace\n",
    "import scipy.stats as stats\n",
    "#import sparqldataframe\n",
    "#from SPARQLWrapper import SPARQLWrapper, JSON, POST\n",
    "#import sparqldataframe\n",
    "#import sys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "54b5fdfa-e0bc-4914-b10f-e2398a15423c",
   "metadata": {
    "id": "54b5fdfa-e0bc-4914-b10f-e2398a15423c"
   },
   "outputs": [],
   "source": [
    "taxon = {\"id\":\"9606\", \"name\":\"human\"}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "41451973-4d77-4e93-a2d6-402665dff035",
   "metadata": {
    "id": "41451973-4d77-4e93-a2d6-402665dff035"
   },
   "source": [
    "# 1. Setup your environment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "354c836f-9004-494a-9397-f85f91975174",
   "metadata": {
    "id": "354c836f-9004-494a-9397-f85f91975174"
   },
   "outputs": [],
   "source": [
    "#specify no max value for the column width\n",
    "pd.set_option('display.max_colwidth', None)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9b472bba-e425-4d58-87aa-cac80bdbc1b0",
   "metadata": {
    "id": "9b472bba-e425-4d58-87aa-cac80bdbc1b0"
   },
   "source": [
    "## 1.1 Utility functions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "d1c1f1df-85f3-4f1c-adf8-1737a27f7bda",
   "metadata": {
    "id": "d1c1f1df-85f3-4f1c-adf8-1737a27f7bda"
   },
   "outputs": [],
   "source": [
    "def getColor(pvalue, lowestPvalue):\n",
    "    val = int((1. - (math.log(pvalue, 10)/math.log(lowestPvalue, 10))) * 255)\n",
    "    #return '0xff{:02x}{:02x}'.format(val, val)\n",
    "    return '#ff{:02x}{:02x}'.format(val, val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "5afca51e-a095-4a8c-b608-48c08e2e710b",
   "metadata": {
    "id": "5afca51e-a095-4a8c-b608-48c08e2e710b"
   },
   "outputs": [],
   "source": [
    "def addAnnotationAncestors(goIdent, dfAnnotationsColors, dfAnnotationsLabel, dfAnnotationsParents, dfAnnotationsAncestors, graph=None):\n",
    "    if graph is None:\n",
    "        graph = Digraph(graph_attr={'rankdir': 'BT'}, strict=True)\n",
    "    for ancestorID in dfAnnotationsAncestors[dfAnnotationsAncestors['goID'] == goIdent]['goAncestorID'].tolist() + [goIdent]:\n",
    "        nodeColor = \"white\"\n",
    "        borderColor = \"black\"\n",
    "        if ancestorID in dfAnnotationsColors.index:\n",
    "            nodeColor = dfAnnotationsColors[\"rgb\"][ancestorID]\n",
    "            borderColor = \"red\"\n",
    "        ancestorIDnumber = ancestorID.replace(\"http://purl.obolibrary.org/obo/GO_\", \"\")\n",
    "        graph.node(\"go\"+ancestorIDnumber, label=\"go:{}\\n{}\".format(ancestorIDnumber, dfAnnotationsLabel.loc[ancestorID, 'goLabel']), shape=\"box\", style=\"filled\", fillcolor=nodeColor, color=borderColor)\n",
    "\n",
    "        for ancestorParentID in dfAnnotationsParents[dfAnnotationsParents['goID'] == ancestorID]['goParentID'].tolist():\n",
    "            nodeColor = \"white\"\n",
    "            borderColor = \"black\"\n",
    "            if ancestorParentID in dfAnnotationsColors.index:\n",
    "                nodeColor = dfAnnotationsColors[\"rgb\"][ancestorParentID]\n",
    "                borderColor = \"red\"\n",
    "            ancestorParentIDnumber = ancestorParentID.replace(\"http://purl.obolibrary.org/obo/GO_\", \"\")\n",
    "            graph.node(\"go\"+ancestorParentIDnumber, label=\"go:{}\\n{}\".format(ancestorParentIDnumber, dfAnnotationsLabel.loc[ancestorParentID, 'goLabel']), shape=\"box\", style=\"filled\", fillcolor=nodeColor, color=borderColor)\n",
    "            graph.edge(\"go\"+ancestorIDnumber, \"go\"+ancestorParentIDnumber, arrowhead=\"onormal\")\n",
    "    return graph"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "11f0c9bb-ca0f-4b9b-96c9-a914e31d4413",
   "metadata": {
    "id": "11f0c9bb-ca0f-4b9b-96c9-a914e31d4413"
   },
   "source": [
    "## 1.2 Load precomputed data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4f969855-dfc1-4a44-bc74-e4a561b5e931",
   "metadata": {
    "id": "4f969855-dfc1-4a44-bc74-e4a561b5e931"
   },
   "source": [
    "<div class=\"alert alert-block alert-info\">\n",
    "<b>Tip:</b> use notebook enrichmentAnalysisGO-preprocess.ipynb to generate them\n",
    "</div>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "4fe7defa-6e02-49f6-8df7-5b069f39462d",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 235
    },
    "id": "4fe7defa-6e02-49f6-8df7-5b069f39462d",
    "outputId": "a0406480-0777-4ba9-e623-5e76f5ec0c76"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>goLabel</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>goID</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0070549</th>\n",
       "      <td>siRNA-mediated gene silencing by inhibition of translation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0070542</th>\n",
       "      <td>response to fatty acid</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0070541</th>\n",
       "      <td>response to platinum ion</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0070543</th>\n",
       "      <td>response to linoleic acid</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0070545</th>\n",
       "      <td>PeBoW complex</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                                              goLabel\n",
       "goID                                                                                                 \n",
       "http://purl.obolibrary.org/obo/GO_0070549  siRNA-mediated gene silencing by inhibition of translation\n",
       "http://purl.obolibrary.org/obo/GO_0070542                                      response to fatty acid\n",
       "http://purl.obolibrary.org/obo/GO_0070541                                    response to platinum ion\n",
       "http://purl.obolibrary.org/obo/GO_0070543                                   response to linoleic acid\n",
       "http://purl.obolibrary.org/obo/GO_0070545                                               PeBoW complex"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dfGOlabel = pd.read_csv(\"results/GeneOntology_label.tsv.gz\", compression='gzip', delimiter='\\t', names=[\"goID\", \"goLabel\"], index_col=\"goID\")\n",
    "dfGOlabel.drop_duplicates(subset=None, keep='first', inplace=True)\n",
    "dfGOlabel.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "e8e8ef49-97a9-452c-aca4-6970586e62fc",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 204
    },
    "id": "e8e8ef49-97a9-452c-aca4-6970586e62fc",
    "outputId": "a4018a0e-94c2-4fb5-8637-2a9cffc8fa59"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>goID</th>\n",
       "      <th>goParentID</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0040007</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0008150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0040007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080191</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080117</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080193</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        goID  \\\n",
       "0  http://purl.obolibrary.org/obo/GO_0040007   \n",
       "1  http://purl.obolibrary.org/obo/GO_0080190   \n",
       "2  http://purl.obolibrary.org/obo/GO_0080191   \n",
       "3  http://purl.obolibrary.org/obo/GO_0080117   \n",
       "4  http://purl.obolibrary.org/obo/GO_0080193   \n",
       "\n",
       "                                  goParentID  \n",
       "0  http://purl.obolibrary.org/obo/GO_0008150  \n",
       "1  http://purl.obolibrary.org/obo/GO_0040007  \n",
       "2  http://purl.obolibrary.org/obo/GO_0080190  \n",
       "3  http://purl.obolibrary.org/obo/GO_0080190  \n",
       "4  http://purl.obolibrary.org/obo/GO_0080190  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dfGOparents = pd.read_csv(\"results/GeneOntology_parents.tsv.gz\", compression='gzip', delimiter='\\t', names=[\"goID\", \"goParentID\"])\n",
    "dfGOparents.drop_duplicates(subset=None, keep='first', inplace=True)\n",
    "dfGOparents.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "87df30e2-cd5b-4a16-96c7-c0f68f50bd29",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 204
    },
    "id": "87df30e2-cd5b-4a16-96c7-c0f68f50bd29",
    "outputId": "25bc1414-2783-427a-fca8-4c811e8d9dd0"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>goID</th>\n",
       "      <th>goAncestorID</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0040007</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0008150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0040007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0008150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080191</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0080191</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0040007</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        goID  \\\n",
       "0  http://purl.obolibrary.org/obo/GO_0040007   \n",
       "1  http://purl.obolibrary.org/obo/GO_0080190   \n",
       "2  http://purl.obolibrary.org/obo/GO_0080190   \n",
       "3  http://purl.obolibrary.org/obo/GO_0080191   \n",
       "4  http://purl.obolibrary.org/obo/GO_0080191   \n",
       "\n",
       "                                goAncestorID  \n",
       "0  http://purl.obolibrary.org/obo/GO_0008150  \n",
       "1  http://purl.obolibrary.org/obo/GO_0040007  \n",
       "2  http://purl.obolibrary.org/obo/GO_0008150  \n",
       "3  http://purl.obolibrary.org/obo/GO_0080190  \n",
       "4  http://purl.obolibrary.org/obo/GO_0040007  "
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dfGOancestors = pd.read_csv(\"results/GeneOntology_ancestors.tsv.gz\", compression='gzip', delimiter='\\t', names=[\"goID\", \"goAncestorID\"])\n",
    "dfGOancestors.drop_duplicates(subset=None, keep='first', inplace=True)\n",
    "dfGOancestors.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "ecbf4b22-8a52-4bff-bedc-ef474fdcadb3",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 204
    },
    "id": "ecbf4b22-8a52-4bff-bedc-ef474fdcadb3",
    "outputId": "11a8a4fd-5ebe-4901-8f35-f9f160bba9a5"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>uniprotID</th>\n",
       "      <th>goID</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>http://purl.uniprot.org/uniprot/Q12774</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0035556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>http://purl.uniprot.org/uniprot/Q12774</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0007165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>http://purl.uniprot.org/uniprot/Q12774</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0009987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>http://purl.uniprot.org/uniprot/Q12774</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0008150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>http://purl.uniprot.org/uniprot/Q12774</td>\n",
       "      <td>http://purl.obolibrary.org/obo/GO_0050794</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                uniprotID  \\\n",
       "0  http://purl.uniprot.org/uniprot/Q12774   \n",
       "1  http://purl.uniprot.org/uniprot/Q12774   \n",
       "2  http://purl.uniprot.org/uniprot/Q12774   \n",
       "3  http://purl.uniprot.org/uniprot/Q12774   \n",
       "4  http://purl.uniprot.org/uniprot/Q12774   \n",
       "\n",
       "                                        goID  \n",
       "0  http://purl.obolibrary.org/obo/GO_0035556  \n",
       "1  http://purl.obolibrary.org/obo/GO_0007165  \n",
       "2  http://purl.obolibrary.org/obo/GO_0009987  \n",
       "3  http://purl.obolibrary.org/obo/GO_0008150  \n",
       "4  http://purl.obolibrary.org/obo/GO_0050794  "
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dfProteinGO = pd.read_csv(\"results/\" + taxon[\"name\"] + \"_Proteins_annotations.tsv.gz\", compression='gzip', delimiter='\\t', names=[\"uniprotID\", \"goID\"])\n",
    "dfProteinGO.drop_duplicates(subset=None, keep='first', inplace=True)\n",
    "dfProteinGO.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "36e364b7-f118-4388-a983-62981dc248e8",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "36e364b7-f118-4388-a983-62981dc248e8",
    "outputId": "985cbdb6-b09c-4652-91a1-a6374bb424ba"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "19700"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nbUniprotReference = len(dfProteinGO[\"uniprotID\"].unique())\n",
    "nbUniprotReference"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "69a26487-0f18-400b-bc99-9d5f12e91684",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 450
    },
    "id": "69a26487-0f18-400b-bc99-9d5f12e91684",
    "outputId": "f6f2adb2-ae81-48bd-f350-afa424e548ee"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>nbUniprotReference</th>\n",
       "      <th>goLabel</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>goID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0005575</th>\n",
       "      <td>19019</td>\n",
       "      <td>cellular_component</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0110165</th>\n",
       "      <td>18893</td>\n",
       "      <td>cellular anatomical structure</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0003674</th>\n",
       "      <td>18290</td>\n",
       "      <td>molecular_function</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0008150</th>\n",
       "      <td>17801</td>\n",
       "      <td>biological_process</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0005488</th>\n",
       "      <td>16553</td>\n",
       "      <td>binding</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0035212</th>\n",
       "      <td>1</td>\n",
       "      <td>cell competition in a multicellular organism</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0120322</th>\n",
       "      <td>1</td>\n",
       "      <td>lipid modification by small protein conjugation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0120323</th>\n",
       "      <td>1</td>\n",
       "      <td>lipid ubiquitination</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0005175</th>\n",
       "      <td>1</td>\n",
       "      <td>CD27 receptor binding</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0004325</th>\n",
       "      <td>1</td>\n",
       "      <td>ferrochelatase activity</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20658 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                           nbUniprotReference  \\\n",
       "goID                                                            \n",
       "http://purl.obolibrary.org/obo/GO_0005575               19019   \n",
       "http://purl.obolibrary.org/obo/GO_0110165               18893   \n",
       "http://purl.obolibrary.org/obo/GO_0003674               18290   \n",
       "http://purl.obolibrary.org/obo/GO_0008150               17801   \n",
       "http://purl.obolibrary.org/obo/GO_0005488               16553   \n",
       "...                                                       ...   \n",
       "http://purl.obolibrary.org/obo/GO_0035212                   1   \n",
       "http://purl.obolibrary.org/obo/GO_0120322                   1   \n",
       "http://purl.obolibrary.org/obo/GO_0120323                   1   \n",
       "http://purl.obolibrary.org/obo/GO_0005175                   1   \n",
       "http://purl.obolibrary.org/obo/GO_0004325                   1   \n",
       "\n",
       "                                                                                   goLabel  \n",
       "goID                                                                                        \n",
       "http://purl.obolibrary.org/obo/GO_0005575                               cellular_component  \n",
       "http://purl.obolibrary.org/obo/GO_0110165                    cellular anatomical structure  \n",
       "http://purl.obolibrary.org/obo/GO_0003674                               molecular_function  \n",
       "http://purl.obolibrary.org/obo/GO_0008150                               biological_process  \n",
       "http://purl.obolibrary.org/obo/GO_0005488                                          binding  \n",
       "...                                                                                    ...  \n",
       "http://purl.obolibrary.org/obo/GO_0035212     cell competition in a multicellular organism  \n",
       "http://purl.obolibrary.org/obo/GO_0120322  lipid modification by small protein conjugation  \n",
       "http://purl.obolibrary.org/obo/GO_0120323                             lipid ubiquitination  \n",
       "http://purl.obolibrary.org/obo/GO_0005175                            CD27 receptor binding  \n",
       "http://purl.obolibrary.org/obo/GO_0004325                          ferrochelatase activity  \n",
       "\n",
       "[20658 rows x 2 columns]"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "occurrencesGOreference = dfProteinGO[\"goID\"].value_counts()\n",
    "occurrencesGOreference.rename(\"nbUniprotReference\", inplace=True)\n",
    "occurrencesGOreference = occurrencesGOreference.to_frame()\n",
    "occurrencesGOreference = occurrencesGOreference.merge(dfGOlabel, left_index=True, right_index=True)\n",
    "\n",
    "occurrencesGOreference"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "91902ef5-2185-4313-b0b9-fadcd149e272",
   "metadata": {
    "id": "91902ef5-2185-4313-b0b9-fadcd149e272"
   },
   "source": [
    "# 2. Enrichment analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "a180c9b7-648e-49f7-956b-0de55c1c7ef3",
   "metadata": {
    "id": "a180c9b7-648e-49f7-956b-0de55c1c7ef3"
   },
   "outputs": [],
   "source": [
    "#adjPvalueMethod = \"None\"\n",
    "adjPvalueMethod = \"Bonferroni\"\n",
    "#adjPvalueMethod = \"Benjamini-Hochberg\"\n",
    "\n",
    "\n",
    "adjPvalueThreshold = 0.05\n",
    "\n",
    "moduleName = \"geneSet_1\"\n",
    "#moduleName = \"geneSet_random\"\n",
    "\n",
    "#moduleName = \"module-mRNA-black\"\n",
    "#moduleName = \"module-mRNA-blue\"\n",
    "#moduleName = \"module-mRNA-brown\"\n",
    "#moduleName = \"module-mRNA-red\"\n",
    "#moduleName = \"module-mRNA-yellow\"\n",
    "##moduleName = \"module-mRNA-turquoise\"\n",
    "###moduleName = \"module-mRNA-green\"\n",
    "###moduleName = \"module-mRNA-grey\"\n",
    "###moduleName = \"module-mRNA-pink\"\n",
    "\n",
    "useDefaultBackgound = True\n",
    "#useDefaultBackgound = False\n",
    "\n",
    "if not useDefaultBackgound:\n",
    "    #backgroundSetName = \"moduleProtein-reference\"\n",
    "    backgroundSetName = \"module-mRNA-reference\"\n",
    "\n",
    "multipleTestsPValue = \"adjPvalue\" if adjPvalueMethod == \"Benjamini-Hochberg\" else \"Evalue\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "373fa01c-a0e1-4717-ae89-ae77441b21c5",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 526
    },
    "id": "373fa01c-a0e1-4717-ae89-ae77441b21c5",
    "outputId": "c726f305-c3f7-4257-8ac5-bb6709b4806b"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "File: geneSet_1\n",
      "nbUniprotInSet: 11\n",
      "nbGOInSet: 259\n",
      "nbUniprotReference: 19700\n",
      "Multiple tests correction method: Bonferroni\n",
      "Nb significantly enriched annotations: 41\n",
      "Rendering\n",
      "Top-10 enriched GO terms\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>nbUniprotModule</th>\n",
       "      <th>nbUniprotReference</th>\n",
       "      <th>goLabel</th>\n",
       "      <th>pValue</th>\n",
       "      <th>Evalue</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>goID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0006784</th>\n",
       "      <td>10</td>\n",
       "      <td>10</td>\n",
       "      <td>heme A biosynthetic process</td>\n",
       "      <td>4.544495e-36</td>\n",
       "      <td>1.177024e-33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0006783</th>\n",
       "      <td>11</td>\n",
       "      <td>29</td>\n",
       "      <td>heme biosynthetic process</td>\n",
       "      <td>7.985131e-33</td>\n",
       "      <td>2.068149e-30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0006779</th>\n",
       "      <td>11</td>\n",
       "      <td>31</td>\n",
       "      <td>porphyrin-containing compound biosynthetic process</td>\n",
       "      <td>1.954256e-32</td>\n",
       "      <td>5.061522e-30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0033014</th>\n",
       "      <td>11</td>\n",
       "      <td>31</td>\n",
       "      <td>tetrapyrrole biosynthetic process</td>\n",
       "      <td>1.954256e-32</td>\n",
       "      <td>5.061522e-30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0046501</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>protoporphyrinogen IX metabolic process</td>\n",
       "      <td>4.474283e-32</td>\n",
       "      <td>1.158839e-29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0006785</th>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>heme B biosynthetic process</td>\n",
       "      <td>4.473874e-31</td>\n",
       "      <td>1.158733e-28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0046148</th>\n",
       "      <td>11</td>\n",
       "      <td>44</td>\n",
       "      <td>pigment biosynthetic process</td>\n",
       "      <td>1.770100e-30</td>\n",
       "      <td>4.584560e-28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0042168</th>\n",
       "      <td>11</td>\n",
       "      <td>47</td>\n",
       "      <td>heme metabolic process</td>\n",
       "      <td>4.019913e-30</td>\n",
       "      <td>1.041157e-27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0006778</th>\n",
       "      <td>11</td>\n",
       "      <td>50</td>\n",
       "      <td>porphyrin-containing compound metabolic process</td>\n",
       "      <td>8.621325e-30</td>\n",
       "      <td>2.232923e-27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>http://purl.obolibrary.org/obo/GO_0033013</th>\n",
       "      <td>11</td>\n",
       "      <td>59</td>\n",
       "      <td>tetrapyrrole metabolic process</td>\n",
       "      <td>6.459502e-29</td>\n",
       "      <td>1.673011e-26</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                           nbUniprotModule  \\\n",
       "goID                                                         \n",
       "http://purl.obolibrary.org/obo/GO_0006784               10   \n",
       "http://purl.obolibrary.org/obo/GO_0006783               11   \n",
       "http://purl.obolibrary.org/obo/GO_0006779               11   \n",
       "http://purl.obolibrary.org/obo/GO_0033014               11   \n",
       "http://purl.obolibrary.org/obo/GO_0046501                9   \n",
       "http://purl.obolibrary.org/obo/GO_0006785                9   \n",
       "http://purl.obolibrary.org/obo/GO_0046148               11   \n",
       "http://purl.obolibrary.org/obo/GO_0042168               11   \n",
       "http://purl.obolibrary.org/obo/GO_0006778               11   \n",
       "http://purl.obolibrary.org/obo/GO_0033013               11   \n",
       "\n",
       "                                           nbUniprotReference  \\\n",
       "goID                                                            \n",
       "http://purl.obolibrary.org/obo/GO_0006784                  10   \n",
       "http://purl.obolibrary.org/obo/GO_0006783                  29   \n",
       "http://purl.obolibrary.org/obo/GO_0006779                  31   \n",
       "http://purl.obolibrary.org/obo/GO_0033014                  31   \n",
       "http://purl.obolibrary.org/obo/GO_0046501                   9   \n",
       "http://purl.obolibrary.org/obo/GO_0006785                  10   \n",
       "http://purl.obolibrary.org/obo/GO_0046148                  44   \n",
       "http://purl.obolibrary.org/obo/GO_0042168                  47   \n",
       "http://purl.obolibrary.org/obo/GO_0006778                  50   \n",
       "http://purl.obolibrary.org/obo/GO_0033013                  59   \n",
       "\n",
       "                                                                                      goLabel  \\\n",
       "goID                                                                                            \n",
       "http://purl.obolibrary.org/obo/GO_0006784                         heme A biosynthetic process   \n",
       "http://purl.obolibrary.org/obo/GO_0006783                           heme biosynthetic process   \n",
       "http://purl.obolibrary.org/obo/GO_0006779  porphyrin-containing compound biosynthetic process   \n",
       "http://purl.obolibrary.org/obo/GO_0033014                   tetrapyrrole biosynthetic process   \n",
       "http://purl.obolibrary.org/obo/GO_0046501             protoporphyrinogen IX metabolic process   \n",
       "http://purl.obolibrary.org/obo/GO_0006785                         heme B biosynthetic process   \n",
       "http://purl.obolibrary.org/obo/GO_0046148                        pigment biosynthetic process   \n",
       "http://purl.obolibrary.org/obo/GO_0042168                              heme metabolic process   \n",
       "http://purl.obolibrary.org/obo/GO_0006778     porphyrin-containing compound metabolic process   \n",
       "http://purl.obolibrary.org/obo/GO_0033013                      tetrapyrrole metabolic process   \n",
       "\n",
       "                                                 pValue        Evalue  \n",
       "goID                                                                   \n",
       "http://purl.obolibrary.org/obo/GO_0006784  4.544495e-36  1.177024e-33  \n",
       "http://purl.obolibrary.org/obo/GO_0006783  7.985131e-33  2.068149e-30  \n",
       "http://purl.obolibrary.org/obo/GO_0006779  1.954256e-32  5.061522e-30  \n",
       "http://purl.obolibrary.org/obo/GO_0033014  1.954256e-32  5.061522e-30  \n",
       "http://purl.obolibrary.org/obo/GO_0046501  4.474283e-32  1.158839e-29  \n",
       "http://purl.obolibrary.org/obo/GO_0006785  4.473874e-31  1.158733e-28  \n",
       "http://purl.obolibrary.org/obo/GO_0046148  1.770100e-30  4.584560e-28  \n",
       "http://purl.obolibrary.org/obo/GO_0042168  4.019913e-30  1.041157e-27  \n",
       "http://purl.obolibrary.org/obo/GO_0006778  8.621325e-30  2.232923e-27  \n",
       "http://purl.obolibrary.org/obo/GO_0033013  6.459502e-29  1.673011e-26  "
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. load set of proteins of interest\n",
    "dfSet = pd.read_csv(\"data/{}.txt\".format(moduleName), delimiter='\\t', names=[\"uniprotCURIE\"])\n",
    "dfSet[\"uniprotID\"] = dfSet[\"uniprotCURIE\"].str.replace(\"uniprot:\", \"http://purl.uniprot.org/uniprot/\")\n",
    "dfSet = dfSet[\"uniprotID\"].to_frame()\n",
    "dfSet = dfSet.sort_values(by=['uniprotID'], ascending=True).drop_duplicates(subset='uniprotID', ignore_index=True)\n",
    "dfSet.set_index(\"uniprotID\", inplace=True)\n",
    "nbUniprotInSet = len(dfSet)\n",
    "print(\"File: {}\".format(moduleName))\n",
    "print(\"nbUniprotInSet: {}\".format(nbUniprotInSet))\n",
    "\n",
    "\n",
    "# 2. count GO annotation frequencies among the set of proteins of interest\n",
    "dfProteinGOSet = dfProteinGO.merge(dfSet, left_on=\"uniprotID\", right_on=\"uniprotID\")\n",
    "occurrencesGOSet = dfProteinGOSet[\"goID\"].value_counts()\n",
    "occurrencesGOSet.rename(\"nbUniprotModule\", inplace=True)\n",
    "nbGOInSet = len(dfProteinGOSet[\"goID\"].unique())\n",
    "print(\"nbGOInSet: {}\".format(nbGOInSet))\n",
    "\n",
    "imageFileName = None\n",
    "\n",
    "# 3. count GO annotation frequencies among the set of background proteins\n",
    "if useDefaultBackgound:\n",
    "    nbUniprotReference = len(dfProteinGO[\"uniprotID\"].unique())\n",
    "    occurrencesGOreference = dfProteinGO[\"goID\"].value_counts()\n",
    "    occurrencesGOreference.rename(\"nbUniprotReference\", inplace=True)\n",
    "    occurrencesGOreference = occurrencesGOreference.to_frame()\n",
    "    occurrencesGOreference = occurrencesGOreference.merge(dfGOlabel, left_index=True, right_index=True)\n",
    "else:\n",
    "    dfReferenceCustom = pd.read_csv(\"data/{}.txt\".format(backgroundSetName), delimiter='\\t', names=[\"uniprotCURIE\"])\n",
    "    dfReferenceCustom[\"uniprotID\"] = dfReferenceCustom[\"uniprotCURIE\"].str.replace(\"uniprot:\", \"http://purl.uniprot.org/uniprot/\")\n",
    "    dfReferenceCustom = dfReferenceCustom[\"uniprotID\"].to_frame()\n",
    "    dfReferenceCustom = dfReferenceCustom.sort_values(by=['uniprotID'], ascending=True).drop_duplicates(subset='uniprotID', ignore_index=True)\n",
    "    dfReferenceCustom.set_index(\"uniprotID\", inplace=True)\n",
    "\n",
    "    dfProteinGOreferenceCustom = dfProteinGO.merge(dfReferenceCustom, left_on=\"uniprotID\", right_on=\"uniprotID\")\n",
    "    nbUniprotReference = len(dfProteinGOreferenceCustom['uniprotID'].unique())\n",
    "\n",
    "    occurrencesGOreference = dfProteinGOreferenceCustom[\"goID\"].value_counts()\n",
    "    occurrencesGOreference.rename(\"nbUniprotReference\", inplace=True)\n",
    "    occurrencesGOreference = occurrencesGOreference.to_frame()\n",
    "    occurrencesGOreference = occurrencesGOreference.merge(dfGOlabel, left_index=True, right_index=True)\n",
    "    occurrencesGOreference.head()\n",
    "print(\"nbUniprotReference: {}\".format(nbUniprotReference))\n",
    "\n",
    "# 4. compute enrichment\n",
    "occurrencesGO = pd.merge(occurrencesGOSet, occurrencesGOreference, right_index = True, left_index = True)\n",
    "occurrencesGO[\"pValue\"] = stats.hypergeom.sf(occurrencesGO['nbUniprotModule']-1, nbUniprotReference, occurrencesGO['nbUniprotReference'], nbUniprotInSet)\n",
    "if adjPvalueMethod == \"Benjamini-Hochberg\":\n",
    "    occurrencesGO[\"adjPvalue\"] = stats.false_discovery_control(occurrencesGO[\"pValue\"]) # Benjamini-Hochberg\n",
    "elif adjPvalueMethod == \"Bonferroni\":\n",
    "    occurrencesGO[multipleTestsPValue] = occurrencesGO[\"pValue\"] * nbGOInSet # Bonferroni\n",
    "else:\n",
    "    occurrencesGO[multipleTestsPValue] = occurrencesGO[\"pValue\"]\n",
    "\n",
    "print(\"Multiple tests correction method: {}\".format(adjPvalueMethod))\n",
    "annotationsWithColors = occurrencesGO[occurrencesGO[multipleTestsPValue] < adjPvalueThreshold].sort_values(by=multipleTestsPValue)\n",
    "if len(annotationsWithColors) == 0:\n",
    "    print(\"No significantly enriched annotation\")\n",
    "else:\n",
    "    print(\"Nb significantly enriched annotations: {}\".format(len(annotationsWithColors)))\n",
    "    #print(annotationsWithColors)\n",
    "    minPval = annotationsWithColors[multipleTestsPValue].min()\n",
    "    maxPval = annotationsWithColors[multipleTestsPValue].max()\n",
    "    annotationsWithColors[\"rgb\"] = annotationsWithColors[multipleTestsPValue].map(lambda x: getColor(x, minPval))\n",
    "\n",
    "    filteredGraph = graphviz.graphs.Digraph(graph_attr={'rankdir': 'BT'}, strict=True)\n",
    "    for currentGO in annotationsWithColors.index:\n",
    "        addAnnotationAncestors(currentGO, annotationsWithColors, dfGOlabel, dfGOparents, dfGOancestors, filteredGraph)\n",
    "    print(\"Rendering\")\n",
    "    imageFileName = \"results/{}-reduced_background-{}_multipleTests-{}\".format(moduleName, \"default\" if useDefaultBackgound else \"custom\", adjPvalueMethod)\n",
    "    filteredGraph.render(imageFileName, cleanup=True, format='svg')\n",
    "\n",
    "# for examining the GO terms enrichment\n",
    "print(\"Top-10 enriched GO terms\")\n",
    "occurrencesGO.sort_values(by=multipleTestsPValue).head(10)\n",
    "#\n",
    "# for examining a specific GO term\n",
    "#occurrencesGO.loc[\"http://purl.obolibrary.org/obo/GO_0008150\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "c6b8ca6d-20f3-4472-bae6-eaf867bf4d0b",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 1000
    },
    "id": "c6b8ca6d-20f3-4472-bae6-eaf867bf4d0b",
    "outputId": "5ef0c773-0ee2-4ecd-c9a4-3f97b73ce0e2"
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"4566pt\" height=\"600pt\" viewBox=\"0.00 0.00 4566.00 600.00\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 596)\">\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-596 4561.5,-596 4561.5,4 -4,4\"/>\n",
       "<!-- go0006783 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>go0006783</title>\n",
       "<polygon fill=\"#ff1919\" stroke=\"red\" points=\"442.62,-121 236.12,-121 236.12,-78.5 442.62,-78.5 442.62,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"339.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006783</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"339.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">heme biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0046148 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>go0046148</title>\n",
       "<polygon fill=\"#ff2b2b\" stroke=\"red\" points=\"226.75,-199.5 0,-199.5 0,-157 226.75,-157 226.75,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"113.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0046148</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"113.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">pigment biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0006783&#45;&gt;go0046148 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>go0006783-&gt;go0046148</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M278.22,-121.45C249.58,-131.15 215.26,-142.76 185.37,-152.88\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"184.37,-149.52 176.02,-156.05 186.61,-156.16 184.37,-149.52\"/>\n",
       "</g>\n",
       "<!-- go0006779 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>go0006779</title>\n",
       "<polygon fill=\"#ff1c1c\" stroke=\"red\" points=\"847.12,-199.5 451.62,-199.5 451.62,-157 847.12,-157 847.12,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"649.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006779</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"649.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">porphyrin-containing compound biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0006783&#45;&gt;go0006779 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>go0006783-&gt;go0006779</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M423.27,-121.45C463.76,-131.44 512.52,-143.48 554.37,-153.81\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"553.4,-157.17 563.95,-156.17 555.08,-150.37 553.4,-157.17\"/>\n",
       "</g>\n",
       "<!-- go0042168 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>go0042168</title>\n",
       "<polygon fill=\"#ff2e2e\" stroke=\"red\" points=\"433.62,-199.5 245.12,-199.5 245.12,-157 433.62,-157 433.62,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"339.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0042168</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"339.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">heme metabolic process</text>\n",
       "</g>\n",
       "<!-- go0006783&#45;&gt;go0042168 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>go0006783-&gt;go0042168</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M339.38,-121.25C339.38,-128.63 339.38,-137.13 339.38,-145.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"335.88,-145.18 339.38,-155.18 342.88,-145.18 335.88,-145.18\"/>\n",
       "</g>\n",
       "<!-- go0042440 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>go0042440</title>\n",
       "<polygon fill=\"#ff3e3e\" stroke=\"red\" points=\"420.75,-278 212,-278 212,-235.5 420.75,-235.5 420.75,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"316.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0042440</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"316.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">pigment metabolic process</text>\n",
       "</g>\n",
       "<!-- go0046148&#45;&gt;go0042440 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>go0046148-&gt;go0042440</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M168.31,-199.95C193.7,-209.52 224.05,-220.96 250.64,-230.98\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"249.39,-234.25 259.98,-234.5 251.86,-227.7 249.39,-234.25\"/>\n",
       "</g>\n",
       "<!-- go0033014 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>go0033014</title>\n",
       "<polygon fill=\"#ff1c1c\" stroke=\"red\" points=\"1088.62,-278 834.12,-278 834.12,-235.5 1088.62,-235.5 1088.62,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"961.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0033014</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"961.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">tetrapyrrole biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0006779&#45;&gt;go0033014 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>go0006779-&gt;go0033014</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M733.81,-199.95C774.56,-209.94 823.63,-221.98 865.76,-232.31\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"864.86,-235.69 875.41,-234.67 866.53,-228.89 864.86,-235.69\"/>\n",
       "</g>\n",
       "<!-- go0006778 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>go0006778</title>\n",
       "<polygon fill=\"#ff3030\" stroke=\"red\" points=\"816.12,-278 438.62,-278 438.62,-235.5 816.12,-235.5 816.12,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"627.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006778</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"627.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">porphyrin-containing compound metabolic process</text>\n",
       "</g>\n",
       "<!-- go0006779&#45;&gt;go0006778 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>go0006779-&gt;go0006778</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M643.48,-199.75C641.31,-207.3 638.8,-216.03 636.41,-224.32\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"633.11,-223.16 633.71,-233.74 639.83,-225.1 633.11,-223.16\"/>\n",
       "</g>\n",
       "<!-- go0042168&#45;&gt;go0042440 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>go0042168-&gt;go0042440</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M333.21,-199.75C330.94,-207.3 328.32,-216.03 325.83,-224.32\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"322.52,-223.16 322.99,-233.74 329.22,-225.17 322.52,-223.16\"/>\n",
       "</g>\n",
       "<!-- go0042168&#45;&gt;go0006778 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>go0042168-&gt;go0006778</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M417.31,-199.95C454.77,-209.9 499.84,-221.87 538.62,-232.17\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"537.35,-235.46 547.91,-234.64 539.15,-228.69 537.35,-235.46\"/>\n",
       "</g>\n",
       "<!-- go0008152 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>go0008152</title>\n",
       "<polygon fill=\"#fff3f3\" stroke=\"red\" points=\"1205.88,-435 1060.88,-435 1060.88,-392.5 1205.88,-392.5 1205.88,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1133.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0008152</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1133.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">metabolic process</text>\n",
       "</g>\n",
       "<!-- go0042440&#45;&gt;go0008152 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>go0042440-&gt;go0008152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M380.37,-278.48C451.46,-300.78 570.02,-335.83 674.38,-356.5 804.03,-382.18 956.75,-398.09 1049.25,-406.18\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1048.74,-409.65 1059,-407.02 1049.34,-402.68 1048.74,-409.65\"/>\n",
       "</g>\n",
       "<!-- go0008150 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>go0008150</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1298.25,-592 1152.5,-592 1152.5,-549.5 1298.25,-549.5 1298.25,-592\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1225.38\" y=\"-574.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0008150</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1225.38\" y=\"-557.45\" font-family=\"Times,serif\" font-size=\"14.00\">biological_process</text>\n",
       "</g>\n",
       "<!-- go0008152&#45;&gt;go0008150 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>go0008152-&gt;go0008150</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1170.41,-435.45C1183.7,-444.66 1197.56,-456.7 1206.38,-471 1218.78,-491.13 1223.37,-517.6 1224.95,-538.06\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1221.45,-538.02 1225.49,-547.81 1228.44,-537.64 1221.45,-538.02\"/>\n",
       "</g>\n",
       "<!-- go0009987 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>go0009987</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1197.62,-513.5 1069.12,-513.5 1069.12,-471 1197.62,-471 1197.62,-513.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1133.38\" y=\"-496.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0009987</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1133.38\" y=\"-478.95\" font-family=\"Times,serif\" font-size=\"14.00\">cellular process</text>\n",
       "</g>\n",
       "<!-- go0008152&#45;&gt;go0009987 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>go0008152-&gt;go0009987</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1133.38,-435.25C1133.38,-442.63 1133.38,-451.13 1133.38,-459.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1129.88,-459.18 1133.38,-469.18 1136.88,-459.18 1129.88,-459.18\"/>\n",
       "</g>\n",
       "<!-- go0009987&#45;&gt;go0008150 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>go0009987-&gt;go0008150</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1158.03,-513.75C1168.44,-522.41 1180.74,-532.63 1191.95,-541.96\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1189.56,-544.52 1199.49,-548.23 1194.04,-539.14 1189.56,-544.52\"/>\n",
       "</g>\n",
       "<!-- go0009058 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>go0009058</title>\n",
       "<polygon fill=\"#ffdbdb\" stroke=\"red\" points=\"1100.88,-356.5 937.88,-356.5 937.88,-314 1100.88,-314 1100.88,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1019.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0009058</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1019.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0033014&#45;&gt;go0009058 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>go0033014-&gt;go0009058</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M976.92,-278.25C983.09,-286.4 990.32,-295.92 997.04,-304.78\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"994.04,-306.63 1002.87,-312.49 999.62,-302.4 994.04,-306.63\"/>\n",
       "</g>\n",
       "<!-- go0033013 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>go0033013</title>\n",
       "<polygon fill=\"#ff3737\" stroke=\"red\" points=\"919.62,-356.5 683.12,-356.5 683.12,-314 919.62,-314 919.62,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"801.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0033013</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"801.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">tetrapyrrole metabolic process</text>\n",
       "</g>\n",
       "<!-- go0033014&#45;&gt;go0033013 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>go0033014-&gt;go0033013</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M918.08,-278.45C898.6,-287.76 875.42,-298.85 854.87,-308.67\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"853.59,-305.41 846.07,-312.88 856.6,-311.72 853.59,-305.41\"/>\n",
       "</g>\n",
       "<!-- go0006778&#45;&gt;go0033013 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>go0006778-&gt;go0033013</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M674.46,-278.45C695.84,-287.85 721.31,-299.05 743.81,-308.94\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"742.3,-312.1 752.86,-312.92 745.12,-305.69 742.3,-312.1\"/>\n",
       "</g>\n",
       "<!-- go0009058&#45;&gt;go0008152 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>go0009058-&gt;go0008152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1050.23,-356.95C1063.4,-365.8 1078.97,-376.24 1093.04,-385.68\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1090.99,-388.52 1101.24,-391.19 1094.89,-382.71 1090.99,-388.52\"/>\n",
       "</g>\n",
       "<!-- go0033013&#45;&gt;go0008152 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>go0033013-&gt;go0008152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M891.22,-356.95C940.48,-368.3 1001.16,-382.29 1049.46,-393.41\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1048.51,-396.79 1059.04,-395.62 1050.08,-389.96 1048.51,-396.79\"/>\n",
       "</g>\n",
       "<!-- go0006784 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>go0006784</title>\n",
       "<polygon fill=\"#ff0000\" stroke=\"red\" points=\"330.75,-42.5 110,-42.5 110,0 330.75,0 330.75,-42.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"220.38\" y=\"-25.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006784</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"220.38\" y=\"-7.95\" font-family=\"Times,serif\" font-size=\"14.00\">heme A biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0006784&#45;&gt;go0006783 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>go0006784-&gt;go0006783</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M252.58,-42.95C266.47,-51.88 282.89,-62.44 297.7,-71.96\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"295.57,-74.75 305.87,-77.21 299.35,-68.86 295.57,-74.75\"/>\n",
       "</g>\n",
       "<!-- go0046501 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>go0046501</title>\n",
       "<polygon fill=\"#ff1e1e\" stroke=\"red\" points=\"1177.5,-199.5 865.25,-199.5 865.25,-157 1177.5,-157 1177.5,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1021.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0046501</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1021.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">protoporphyrinogen IX metabolic process</text>\n",
       "</g>\n",
       "<!-- go0046501&#45;&gt;go0006778 -->\n",
       "<g id=\"edge19\" class=\"edge\">\n",
       "<title>go0046501-&gt;go0006778</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M914.75,-199.95C862.3,-210.14 798.94,-222.44 745.07,-232.9\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"744.72,-229.4 735.57,-234.74 746.05,-236.27 744.72,-229.4\"/>\n",
       "</g>\n",
       "<!-- go0006785 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>go0006785</title>\n",
       "<polygon fill=\"#ff2626\" stroke=\"red\" points=\"570.12,-42.5 348.62,-42.5 348.62,0 570.12,0 570.12,-42.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"459.38\" y=\"-25.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006785</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"459.38\" y=\"-7.95\" font-family=\"Times,serif\" font-size=\"14.00\">heme B biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0006785&#45;&gt;go0006783 -->\n",
       "<g id=\"edge20\" class=\"edge\">\n",
       "<title>go0006785-&gt;go0006783</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M426.9,-42.95C412.89,-51.88 396.33,-62.44 381.4,-71.96\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"379.7,-68.89 373.15,-77.22 383.46,-74.79 379.7,-68.89\"/>\n",
       "</g>\n",
       "<!-- go0006782 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>go0006782</title>\n",
       "<polygon fill=\"#ff3c3c\" stroke=\"red\" points=\"1000.5,-121 670.25,-121 670.25,-78.5 1000.5,-78.5 1000.5,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"835.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006782</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"835.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">protoporphyrinogen IX biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0006782&#45;&gt;go0006779 -->\n",
       "<g id=\"edge22\" class=\"edge\">\n",
       "<title>go0006782-&gt;go0006779</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M785.04,-121.45C761.99,-130.93 734.46,-142.25 710.25,-152.21\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"709.07,-148.92 701.15,-155.96 711.73,-155.39 709.07,-148.92\"/>\n",
       "</g>\n",
       "<!-- go0006782&#45;&gt;go0046501 -->\n",
       "<g id=\"edge21\" class=\"edge\">\n",
       "<title>go0006782-&gt;go0046501</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M885.71,-121.45C908.76,-130.93 936.29,-142.25 960.5,-152.21\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"959.02,-155.39 969.6,-155.96 961.68,-148.92 959.02,-155.39\"/>\n",
       "</g>\n",
       "<!-- go0010038 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>go0010038</title>\n",
       "<polygon fill=\"#ffecec\" stroke=\"red\" points=\"2620.62,-356.5 2450.12,-356.5 2450.12,-314 2620.62,-314 2620.62,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2535.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0010038</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2535.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">response to metal ion</text>\n",
       "</g>\n",
       "<!-- go0042221 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>go0042221</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"2176.75,-435 2010,-435 2010,-392.5 2176.75,-392.5 2176.75,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2093.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0042221</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2093.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to chemical</text>\n",
       "</g>\n",
       "<!-- go0010038&#45;&gt;go0042221 -->\n",
       "<g id=\"edge23\" class=\"edge\">\n",
       "<title>go0010038-&gt;go0042221</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2449.86,-354.87C2447,-355.43 2444.16,-355.97 2441.38,-356.5 2355.88,-372.61 2258.04,-388.17 2187.92,-398.83\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2187.77,-395.31 2178.41,-400.27 2188.82,-402.23 2187.77,-395.31\"/>\n",
       "</g>\n",
       "<!-- go0050896 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>go0050896</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1711,-513.5 1545.75,-513.5 1545.75,-471 1711,-471 1711,-513.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1628.38\" y=\"-496.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0050896</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1628.38\" y=\"-478.95\" font-family=\"Times,serif\" font-size=\"14.00\">response to stimulus</text>\n",
       "</g>\n",
       "<!-- go0042221&#45;&gt;go0050896 -->\n",
       "<g id=\"edge24\" class=\"edge\">\n",
       "<title>go0042221-&gt;go0050896</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2009.71,-428.52C1928.96,-441.8 1806.9,-461.88 1722.73,-475.73\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1722.17,-472.27 1712.87,-477.35 1723.3,-479.18 1722.17,-472.27\"/>\n",
       "</g>\n",
       "<!-- go0050896&#45;&gt;go0008150 -->\n",
       "<g id=\"edge25\" class=\"edge\">\n",
       "<title>go0050896-&gt;go0008150</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1545.36,-509.01C1476.5,-522.08 1379,-540.59 1309.76,-553.73\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1309.13,-550.29 1299.96,-555.59 1310.43,-557.17 1309.13,-550.29\"/>\n",
       "</g>\n",
       "<!-- go0070541 -->\n",
       "<g id=\"node20\" class=\"node\">\n",
       "<title>go0070541</title>\n",
       "<polygon fill=\"#ffc5c5\" stroke=\"red\" points=\"2881.25,-278 2687.5,-278 2687.5,-235.5 2881.25,-235.5 2881.25,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2784.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0070541</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2784.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to platinum ion</text>\n",
       "</g>\n",
       "<!-- go0070541&#45;&gt;go0010038 -->\n",
       "<g id=\"edge26\" class=\"edge\">\n",
       "<title>go0070541-&gt;go0010038</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2716.99,-278.45C2685.02,-288.27 2646.63,-300.07 2613.4,-310.28\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2612.79,-306.8 2604.26,-313.09 2614.85,-313.5 2612.79,-306.8\"/>\n",
       "</g>\n",
       "<!-- go0019866 -->\n",
       "<g id=\"node21\" class=\"node\">\n",
       "<title>go0019866</title>\n",
       "<polygon fill=\"#ffd0d0\" stroke=\"red\" points=\"3442.25,-121 3236.5,-121 3236.5,-78.5 3442.25,-78.5 3442.25,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3339.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0019866</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3339.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">organelle inner membrane</text>\n",
       "</g>\n",
       "<!-- go0031090 -->\n",
       "<g id=\"node22\" class=\"node\">\n",
       "<title>go0031090</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3421.25,-199.5 3257.5,-199.5 3257.5,-157 3421.25,-157 3421.25,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3339.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0031090</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3339.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">organelle membrane</text>\n",
       "</g>\n",
       "<!-- go0019866&#45;&gt;go0031090 -->\n",
       "<g id=\"edge27\" class=\"edge\">\n",
       "<title>go0019866-&gt;go0031090</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3339.38,-121.25C3339.38,-128.63 3339.38,-137.13 3339.38,-145.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3335.88,-145.18 3339.38,-155.18 3342.88,-145.18 3335.88,-145.18\"/>\n",
       "</g>\n",
       "<!-- go0016020 -->\n",
       "<g id=\"node23\" class=\"node\">\n",
       "<title>go0016020</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3373.75,-278 3273,-278 3273,-235.5 3373.75,-235.5 3373.75,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3323.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016020</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3323.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">membrane</text>\n",
       "</g>\n",
       "<!-- go0031090&#45;&gt;go0016020 -->\n",
       "<g id=\"edge28\" class=\"edge\">\n",
       "<title>go0031090-&gt;go0016020</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3335.09,-199.75C3333.53,-207.21 3331.72,-215.83 3330.01,-224.03\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3326.61,-223.21 3327.98,-233.71 3333.46,-224.64 3326.61,-223.21\"/>\n",
       "</g>\n",
       "<!-- go0110165 -->\n",
       "<g id=\"node24\" class=\"node\">\n",
       "<title>go0110165</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3232.88,-356.5 3009.88,-356.5 3009.88,-314 3232.88,-314 3232.88,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0110165</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">cellular anatomical structure</text>\n",
       "</g>\n",
       "<!-- go0016020&#45;&gt;go0110165 -->\n",
       "<g id=\"edge29\" class=\"edge\">\n",
       "<title>go0016020-&gt;go0110165</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3272.66,-276.96C3246.55,-286.85 3214.41,-299.02 3186.48,-309.59\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3185.54,-306.21 3177.42,-313.02 3188.01,-312.76 3185.54,-306.21\"/>\n",
       "</g>\n",
       "<!-- go0005575 -->\n",
       "<g id=\"node25\" class=\"node\">\n",
       "<title>go0005575</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3198.75,-435 3044,-435 3044,-392.5 3198.75,-392.5 3198.75,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0005575</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">cellular_component</text>\n",
       "</g>\n",
       "<!-- go0110165&#45;&gt;go0005575 -->\n",
       "<g id=\"edge30\" class=\"edge\">\n",
       "<title>go0110165-&gt;go0005575</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3121.38,-356.75C3121.38,-364.13 3121.38,-372.63 3121.38,-380.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3117.88,-380.68 3121.38,-390.68 3124.88,-380.68 3117.88,-380.68\"/>\n",
       "</g>\n",
       "<!-- go0031966 -->\n",
       "<g id=\"node26\" class=\"node\">\n",
       "<title>go0031966</title>\n",
       "<polygon fill=\"#ffd8d8\" stroke=\"red\" points=\"3656.38,-121 3460.38,-121 3460.38,-78.5 3656.38,-78.5 3656.38,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3558.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0031966</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3558.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">mitochondrial membrane</text>\n",
       "</g>\n",
       "<!-- go0031966&#45;&gt;go0031090 -->\n",
       "<g id=\"edge31\" class=\"edge\">\n",
       "<title>go0031966-&gt;go0031090</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3499.11,-121.45C3471.48,-131.1 3438.4,-142.66 3409.53,-152.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3408.4,-149.43 3400.12,-156.03 3410.71,-156.04 3408.4,-149.43\"/>\n",
       "</g>\n",
       "<!-- go0005743 -->\n",
       "<g id=\"node27\" class=\"node\">\n",
       "<title>go0005743</title>\n",
       "<polygon fill=\"#ffcece\" stroke=\"red\" points=\"3567.38,-42.5 3329.38,-42.5 3329.38,0 3567.38,0 3567.38,-42.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3448.38\" y=\"-25.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0005743</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3448.38\" y=\"-7.95\" font-family=\"Times,serif\" font-size=\"14.00\">mitochondrial inner membrane</text>\n",
       "</g>\n",
       "<!-- go0005743&#45;&gt;go0019866 -->\n",
       "<g id=\"edge32\" class=\"edge\">\n",
       "<title>go0005743-&gt;go0019866</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3418.88,-42.95C3406.28,-51.8 3391.4,-62.24 3377.94,-71.68\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3376.31,-68.55 3370.13,-77.16 3380.33,-74.28 3376.31,-68.55\"/>\n",
       "</g>\n",
       "<!-- go0005743&#45;&gt;go0031966 -->\n",
       "<g id=\"edge33\" class=\"edge\">\n",
       "<title>go0005743-&gt;go0031966</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3478.14,-42.95C3490.86,-51.8 3505.88,-62.24 3519.46,-71.68\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3517.13,-74.33 3527.34,-77.17 3521.13,-68.58 3517.13,-74.33\"/>\n",
       "</g>\n",
       "<!-- go0043231 -->\n",
       "<g id=\"node28\" class=\"node\">\n",
       "<title>go0043231</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"2940.38,-121 2618.38,-121 2618.38,-78.5 2940.38,-78.5 2940.38,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2779.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0043231</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2779.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">intracellular membrane-bounded organelle</text>\n",
       "</g>\n",
       "<!-- go0043227 -->\n",
       "<g id=\"node29\" class=\"node\">\n",
       "<title>go0043227</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"2844.25,-199.5 2614.5,-199.5 2614.5,-157 2844.25,-157 2844.25,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2729.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0043227</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2729.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">membrane-bounded organelle</text>\n",
       "</g>\n",
       "<!-- go0043231&#45;&gt;go0043227 -->\n",
       "<g id=\"edge34\" class=\"edge\">\n",
       "<title>go0043231-&gt;go0043227</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2765.98,-121.25C2760.76,-129.23 2754.69,-138.52 2749,-147.22\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2746.18,-145.14 2743.64,-155.43 2752.04,-148.97 2746.18,-145.14\"/>\n",
       "</g>\n",
       "<!-- go0043229 -->\n",
       "<g id=\"node30\" class=\"node\">\n",
       "<title>go0043229</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3036.88,-199.5 2861.88,-199.5 2861.88,-157 3036.88,-157 3036.88,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2949.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0043229</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2949.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">intracellular organelle</text>\n",
       "</g>\n",
       "<!-- go0043231&#45;&gt;go0043229 -->\n",
       "<g id=\"edge35\" class=\"edge\">\n",
       "<title>go0043231-&gt;go0043229</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2825.38,-121.45C2846.17,-130.81 2870.93,-141.95 2892.84,-151.81\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2891.4,-155 2901.95,-155.91 2894.27,-148.61 2891.4,-155\"/>\n",
       "</g>\n",
       "<!-- go0043226 -->\n",
       "<g id=\"node31\" class=\"node\">\n",
       "<title>go0043226</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"2999.75,-278 2899,-278 2899,-235.5 2999.75,-235.5 2999.75,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2949.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0043226</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2949.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">organelle</text>\n",
       "</g>\n",
       "<!-- go0043227&#45;&gt;go0043226 -->\n",
       "<g id=\"edge36\" class=\"edge\">\n",
       "<title>go0043227-&gt;go0043226</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2788.91,-199.95C2819.64,-210.64 2857.09,-223.66 2888.08,-234.43\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2886.72,-237.67 2897.32,-237.65 2889.02,-231.06 2886.72,-237.67\"/>\n",
       "</g>\n",
       "<!-- go0043229&#45;&gt;go0043226 -->\n",
       "<g id=\"edge38\" class=\"edge\">\n",
       "<title>go0043229-&gt;go0043226</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2949.38,-199.75C2949.38,-207.13 2949.38,-215.63 2949.38,-223.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2945.88,-223.68 2949.38,-233.68 2952.88,-223.68 2945.88,-223.68\"/>\n",
       "</g>\n",
       "<!-- go0043226&#45;&gt;go0110165 -->\n",
       "<g id=\"edge37\" class=\"edge\">\n",
       "<title>go0043226-&gt;go0110165</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2995.92,-278.45C3017.05,-287.85 3042.23,-299.05 3064.47,-308.94\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3062.85,-312.05 3073.41,-312.92 3065.69,-305.65 3062.85,-312.05\"/>\n",
       "</g>\n",
       "<!-- go0005739 -->\n",
       "<g id=\"node32\" class=\"node\">\n",
       "<title>go0005739</title>\n",
       "<polygon fill=\"#ffdede\" stroke=\"red\" points=\"2839.12,-42.5 2719.62,-42.5 2719.62,0 2839.12,0 2839.12,-42.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2779.38\" y=\"-25.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0005739</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2779.38\" y=\"-7.95\" font-family=\"Times,serif\" font-size=\"14.00\">mitochondrion</text>\n",
       "</g>\n",
       "<!-- go0005739&#45;&gt;go0043231 -->\n",
       "<g id=\"edge39\" class=\"edge\">\n",
       "<title>go0005739-&gt;go0043231</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2779.38,-42.75C2779.38,-50.13 2779.38,-58.63 2779.38,-66.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2775.88,-66.68 2779.38,-76.68 2782.88,-66.68 2775.88,-66.68\"/>\n",
       "</g>\n",
       "<!-- go0016749 -->\n",
       "<g id=\"node33\" class=\"node\">\n",
       "<title>go0016749</title>\n",
       "<polygon fill=\"#ffdede\" stroke=\"red\" points=\"4398.25,-121 4168.5,-121 4168.5,-78.5 4398.25,-78.5 4398.25,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4283.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016749</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4283.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">N-succinyltransferase activity</text>\n",
       "</g>\n",
       "<!-- go0016748 -->\n",
       "<g id=\"node34\" class=\"node\">\n",
       "<title>go0016748</title>\n",
       "<polygon fill=\"#ffe2e2\" stroke=\"red\" points=\"4278,-199.5 4064.75,-199.5 4064.75,-157 4278,-157 4278,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4171.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016748</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4171.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">succinyltransferase activity</text>\n",
       "</g>\n",
       "<!-- go0016749&#45;&gt;go0016748 -->\n",
       "<g id=\"edge40\" class=\"edge\">\n",
       "<title>go0016749-&gt;go0016748</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4253.07,-121.45C4240.12,-130.3 4224.83,-140.74 4211,-150.18\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4209.24,-147.15 4202.96,-155.68 4213.19,-152.93 4209.24,-147.15\"/>\n",
       "</g>\n",
       "<!-- go0016410 -->\n",
       "<g id=\"node35\" class=\"node\">\n",
       "<title>go0016410</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"4496.62,-199.5 4296.12,-199.5 4296.12,-157 4496.62,-157 4496.62,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4396.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016410</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4396.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">N-acyltransferase activity</text>\n",
       "</g>\n",
       "<!-- go0016749&#45;&gt;go0016410 -->\n",
       "<g id=\"edge41\" class=\"edge\">\n",
       "<title>go0016749-&gt;go0016410</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4313.95,-121.45C4327.02,-130.3 4342.44,-140.74 4356.39,-150.18\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4354.27,-152.98 4364.52,-155.68 4358.2,-147.18 4354.27,-152.98\"/>\n",
       "</g>\n",
       "<!-- go0016747 -->\n",
       "<g id=\"node36\" class=\"node\">\n",
       "<title>go0016747</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"4557.5,-278 4011.25,-278 4011.25,-235.5 4557.5,-235.5 4557.5,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4284.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016747</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4284.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">acyltransferase activity, transferring groups other than amino-acyl groups</text>\n",
       "</g>\n",
       "<!-- go0016748&#45;&gt;go0016747 -->\n",
       "<g id=\"edge42\" class=\"edge\">\n",
       "<title>go0016748-&gt;go0016747</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4201.95,-199.95C4215.02,-208.8 4230.44,-219.24 4244.39,-228.68\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4242.27,-231.48 4252.52,-234.18 4246.2,-225.68 4242.27,-231.48\"/>\n",
       "</g>\n",
       "<!-- go0016410&#45;&gt;go0016747 -->\n",
       "<g id=\"edge47\" class=\"edge\">\n",
       "<title>go0016410-&gt;go0016747</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4366.07,-199.95C4353.12,-208.8 4337.83,-219.24 4324,-228.68\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4322.24,-225.65 4315.96,-234.18 4326.19,-231.43 4322.24,-225.65\"/>\n",
       "</g>\n",
       "<!-- go0016746 -->\n",
       "<g id=\"node37\" class=\"node\">\n",
       "<title>go0016746</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"4312.38,-356.5 4128.38,-356.5 4128.38,-314 4312.38,-314 4312.38,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4220.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016746</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4220.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">acyltransferase activity</text>\n",
       "</g>\n",
       "<!-- go0016747&#45;&gt;go0016746 -->\n",
       "<g id=\"edge43\" class=\"edge\">\n",
       "<title>go0016747-&gt;go0016746</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4267.22,-278.25C4260.34,-286.48 4252.27,-296.12 4244.79,-305.06\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4242.28,-302.62 4238.54,-312.53 4247.65,-307.11 4242.28,-302.62\"/>\n",
       "</g>\n",
       "<!-- go0016740 -->\n",
       "<g id=\"node38\" class=\"node\">\n",
       "<title>go0016740</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"4105.12,-435 3949.62,-435 3949.62,-392.5 4105.12,-392.5 4105.12,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4027.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016740</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4027.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">transferase activity</text>\n",
       "</g>\n",
       "<!-- go0016746&#45;&gt;go0016740 -->\n",
       "<g id=\"edge44\" class=\"edge\">\n",
       "<title>go0016746-&gt;go0016740</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4168.15,-356.95C4144.12,-366.48 4115.41,-377.85 4090.21,-387.84\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4089.06,-384.54 4081.05,-391.47 4091.64,-391.04 4089.06,-384.54\"/>\n",
       "</g>\n",
       "<!-- go0003824 -->\n",
       "<g id=\"node39\" class=\"node\">\n",
       "<title>go0003824</title>\n",
       "<polygon fill=\"#ffe3e3\" stroke=\"red\" points=\"3749.62,-513.5 3615.12,-513.5 3615.12,-471 3749.62,-471 3749.62,-513.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3682.38\" y=\"-496.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0003824</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3682.38\" y=\"-478.95\" font-family=\"Times,serif\" font-size=\"14.00\">catalytic activity</text>\n",
       "</g>\n",
       "<!-- go0016740&#45;&gt;go0003824 -->\n",
       "<g id=\"edge45\" class=\"edge\">\n",
       "<title>go0016740-&gt;go0003824</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3949.52,-432.01C3893.25,-444.49 3817.53,-461.28 3761.07,-473.8\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3760.53,-470.34 3751.52,-475.92 3762.04,-477.17 3760.53,-470.34\"/>\n",
       "</g>\n",
       "<!-- go0003674 -->\n",
       "<g id=\"node40\" class=\"node\">\n",
       "<title>go0003674</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3683.25,-592 3531.5,-592 3531.5,-549.5 3683.25,-549.5 3683.25,-592\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3607.38\" y=\"-574.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0003674</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3607.38\" y=\"-557.45\" font-family=\"Times,serif\" font-size=\"14.00\">molecular_function</text>\n",
       "</g>\n",
       "<!-- go0003824&#45;&gt;go0003674 -->\n",
       "<g id=\"edge46\" class=\"edge\">\n",
       "<title>go0003824-&gt;go0003674</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3662.28,-513.75C3654.04,-522.15 3644.36,-532.03 3635.44,-541.12\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3633.09,-538.52 3628.59,-548.11 3638.09,-543.42 3633.09,-538.52\"/>\n",
       "</g>\n",
       "<!-- go0003870 -->\n",
       "<g id=\"node41\" class=\"node\">\n",
       "<title>go0003870</title>\n",
       "<polygon fill=\"#ffdede\" stroke=\"red\" points=\"4418.12,-42.5 4148.62,-42.5 4148.62,0 4418.12,0 4418.12,-42.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4283.38\" y=\"-25.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0003870</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"4283.38\" y=\"-7.95\" font-family=\"Times,serif\" font-size=\"14.00\">5-aminolevulinate synthase activity</text>\n",
       "</g>\n",
       "<!-- go0003870&#45;&gt;go0016749 -->\n",
       "<g id=\"edge48\" class=\"edge\">\n",
       "<title>go0003870-&gt;go0016749</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4283.38,-42.75C4283.38,-50.13 4283.38,-58.63 4283.38,-66.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"4279.88,-66.68 4283.38,-76.68 4286.88,-66.68 4279.88,-66.68\"/>\n",
       "</g>\n",
       "<!-- go0046685 -->\n",
       "<g id=\"node42\" class=\"node\">\n",
       "<title>go0046685</title>\n",
       "<polygon fill=\"#ffdfdf\" stroke=\"red\" points=\"1968.12,-356.5 1656.62,-356.5 1656.62,-314 1968.12,-314 1968.12,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1812.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0046685</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1812.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">response to arsenic-containing substance</text>\n",
       "</g>\n",
       "<!-- go0046685&#45;&gt;go0042221 -->\n",
       "<g id=\"edge49\" class=\"edge\">\n",
       "<title>go0046685-&gt;go0042221</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1888.42,-356.95C1924.81,-366.86 1968.57,-378.77 2006.29,-389.04\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2005.24,-392.38 2015.81,-391.63 2007.08,-385.63 2005.24,-392.38\"/>\n",
       "</g>\n",
       "<!-- go0020027 -->\n",
       "<g id=\"node43\" class=\"node\">\n",
       "<title>go0020027</title>\n",
       "<polygon fill=\"#ffe6e6\" stroke=\"red\" points=\"1594.75,-199.5 1362,-199.5 1362,-157 1594.75,-157 1594.75,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1478.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0020027</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1478.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">hemoglobin metabolic process</text>\n",
       "</g>\n",
       "<!-- go0019538 -->\n",
       "<g id=\"node44\" class=\"node\">\n",
       "<title>go0019538</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1601,-278 1399.75,-278 1399.75,-235.5 1601,-235.5 1601,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1500.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0019538</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1500.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">protein metabolic process</text>\n",
       "</g>\n",
       "<!-- go0020027&#45;&gt;go0019538 -->\n",
       "<g id=\"edge50\" class=\"edge\">\n",
       "<title>go0020027-&gt;go0019538</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1484.27,-199.75C1486.44,-207.3 1488.95,-216.03 1491.34,-224.32\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1487.92,-225.1 1494.04,-233.74 1494.64,-223.16 1487.92,-225.1\"/>\n",
       "</g>\n",
       "<!-- go0044238 -->\n",
       "<g id=\"node45\" class=\"node\">\n",
       "<title>go0044238</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1600.62,-356.5 1394.12,-356.5 1394.12,-314 1600.62,-314 1600.62,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1497.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0044238</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1497.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">primary metabolic process</text>\n",
       "</g>\n",
       "<!-- go0019538&#45;&gt;go0044238 -->\n",
       "<g id=\"edge51\" class=\"edge\">\n",
       "<title>go0019538-&gt;go0044238</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1499.57,-278.25C1499.28,-285.63 1498.95,-294.13 1498.63,-302.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1495.14,-302.05 1498.24,-312.18 1502.13,-302.33 1495.14,-302.05\"/>\n",
       "</g>\n",
       "<!-- go0043170 -->\n",
       "<g id=\"node46\" class=\"node\">\n",
       "<title>go0043170</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1376.12,-356.5 1118.62,-356.5 1118.62,-314 1376.12,-314 1376.12,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1247.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0043170</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1247.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">macromolecule metabolic process</text>\n",
       "</g>\n",
       "<!-- go0019538&#45;&gt;go0043170 -->\n",
       "<g id=\"edge52\" class=\"edge\">\n",
       "<title>go0019538-&gt;go0043170</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1431.91,-278.45C1399.43,-288.27 1360.42,-300.07 1326.66,-310.28\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1325.9,-306.85 1317.34,-313.09 1327.93,-313.55 1325.9,-306.85\"/>\n",
       "</g>\n",
       "<!-- go0044238&#45;&gt;go0008152 -->\n",
       "<g id=\"edge53\" class=\"edge\">\n",
       "<title>go0044238-&gt;go0008152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1398.87,-356.95C1342.04,-368.9 1271.35,-383.75 1217.2,-395.13\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1216.8,-391.64 1207.74,-397.12 1218.24,-398.49 1216.8,-391.64\"/>\n",
       "</g>\n",
       "<!-- go0043170&#45;&gt;go0008152 -->\n",
       "<g id=\"edge54\" class=\"edge\">\n",
       "<title>go0043170-&gt;go0008152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1216.52,-356.95C1203.35,-365.8 1187.78,-376.24 1173.71,-385.68\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1171.86,-382.71 1165.51,-391.19 1175.76,-388.52 1171.86,-382.71\"/>\n",
       "</g>\n",
       "<!-- go0009059 -->\n",
       "<g id=\"node47\" class=\"node\">\n",
       "<title>go0009059</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1382.12,-278 1106.62,-278 1106.62,-235.5 1382.12,-235.5 1382.12,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1244.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0009059</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1244.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">macromolecule biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0009059&#45;&gt;go0009058 -->\n",
       "<g id=\"edge55\" class=\"edge\">\n",
       "<title>go0009059-&gt;go0009058</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1183.49,-278.45C1154.97,-288.15 1120.81,-299.76 1091.06,-309.88\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1090.09,-306.51 1081.74,-313.04 1092.34,-313.14 1090.09,-306.51\"/>\n",
       "</g>\n",
       "<!-- go0009059&#45;&gt;go0043170 -->\n",
       "<g id=\"edge56\" class=\"edge\">\n",
       "<title>go0009059-&gt;go0043170</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1245.18,-278.25C1245.47,-285.63 1245.8,-294.13 1246.12,-302.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1242.62,-302.33 1246.51,-312.18 1249.61,-302.05 1242.62,-302.33\"/>\n",
       "</g>\n",
       "<!-- go0042541 -->\n",
       "<g id=\"node48\" class=\"node\">\n",
       "<title>go0042541</title>\n",
       "<polygon fill=\"#ffe5e5\" stroke=\"red\" points=\"1510.75,-121 1260,-121 1260,-78.5 1510.75,-78.5 1510.75,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1385.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0042541</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1385.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">hemoglobin biosynthetic process</text>\n",
       "</g>\n",
       "<!-- go0042541&#45;&gt;go0020027 -->\n",
       "<g id=\"edge57\" class=\"edge\">\n",
       "<title>go0042541-&gt;go0020027</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1410.3,-121.25C1420.83,-129.91 1433.25,-140.13 1444.59,-149.46\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1442.27,-152.08 1452.22,-155.73 1446.72,-146.68 1442.27,-152.08\"/>\n",
       "</g>\n",
       "<!-- go0042541&#45;&gt;go0009059 -->\n",
       "<g id=\"edge58\" class=\"edge\">\n",
       "<title>go0042541-&gt;go0009059</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1366.65,-121.33C1342,-148.43 1298.53,-196.22 1270.61,-226.91\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1268.33,-224.21 1264.19,-233.96 1273.51,-228.92 1268.33,-224.21\"/>\n",
       "</g>\n",
       "<!-- go0031974 -->\n",
       "<g id=\"node49\" class=\"node\">\n",
       "<title>go0031974</title>\n",
       "<polygon fill=\"#ffe6e6\" stroke=\"red\" points=\"3225.38,-278 3017.38,-278 3017.38,-235.5 3225.38,-235.5 3225.38,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0031974</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">membrane-enclosed lumen</text>\n",
       "</g>\n",
       "<!-- go0031974&#45;&gt;go0110165 -->\n",
       "<g id=\"edge59\" class=\"edge\">\n",
       "<title>go0031974-&gt;go0110165</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3121.38,-278.25C3121.38,-285.63 3121.38,-294.13 3121.38,-302.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3117.88,-302.18 3121.38,-312.18 3124.88,-302.18 3117.88,-302.18\"/>\n",
       "</g>\n",
       "<!-- go0043233 -->\n",
       "<g id=\"node50\" class=\"node\">\n",
       "<title>go0043233</title>\n",
       "<polygon fill=\"#ffe6e6\" stroke=\"red\" points=\"3187.12,-199.5 3055.62,-199.5 3055.62,-157 3187.12,-157 3187.12,-199.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-182.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0043233</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3121.38\" y=\"-164.95\" font-family=\"Times,serif\" font-size=\"14.00\">organelle lumen</text>\n",
       "</g>\n",
       "<!-- go0043233&#45;&gt;go0031974 -->\n",
       "<g id=\"edge60\" class=\"edge\">\n",
       "<title>go0043233-&gt;go0031974</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3121.38,-199.75C3121.38,-207.13 3121.38,-215.63 3121.38,-223.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3117.88,-223.68 3121.38,-233.68 3124.88,-223.68 3117.88,-223.68\"/>\n",
       "</g>\n",
       "<!-- go0070013 -->\n",
       "<g id=\"node51\" class=\"node\">\n",
       "<title>go0070013</title>\n",
       "<polygon fill=\"#ffe6e6\" stroke=\"red\" points=\"3218.25,-121 2994.5,-121 2994.5,-78.5 3218.25,-78.5 3218.25,-121\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3106.38\" y=\"-103.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0070013</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3106.38\" y=\"-86.45\" font-family=\"Times,serif\" font-size=\"14.00\">intracellular organelle lumen</text>\n",
       "</g>\n",
       "<!-- go0070013&#45;&gt;go0043233 -->\n",
       "<g id=\"edge61\" class=\"edge\">\n",
       "<title>go0070013-&gt;go0043233</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3110.39,-121.25C3111.86,-128.71 3113.55,-137.33 3115.16,-145.53\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3111.69,-146.07 3117.05,-155.21 3118.56,-144.72 3111.69,-146.07\"/>\n",
       "</g>\n",
       "<!-- go0006950 -->\n",
       "<g id=\"node52\" class=\"node\">\n",
       "<title>go0006950</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"1702,-435 1554.75,-435 1554.75,-392.5 1702,-392.5 1702,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1628.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0006950</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1628.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to stress</text>\n",
       "</g>\n",
       "<!-- go0006950&#45;&gt;go0050896 -->\n",
       "<g id=\"edge62\" class=\"edge\">\n",
       "<title>go0006950-&gt;go0050896</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1628.38,-435.25C1628.38,-442.63 1628.38,-451.13 1628.38,-459.25\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1624.88,-459.18 1628.38,-469.18 1631.88,-459.18 1624.88,-459.18\"/>\n",
       "</g>\n",
       "<!-- go0009636 -->\n",
       "<g id=\"node53\" class=\"node\">\n",
       "<title>go0009636</title>\n",
       "<polygon fill=\"#ffecec\" stroke=\"red\" points=\"2200.75,-356.5 1986,-356.5 1986,-314 2200.75,-314 2200.75,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2093.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0009636</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2093.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">response to toxic substance</text>\n",
       "</g>\n",
       "<!-- go0009636&#45;&gt;go0042221 -->\n",
       "<g id=\"edge63\" class=\"edge\">\n",
       "<title>go0009636-&gt;go0042221</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2093.38,-356.75C2093.38,-364.13 2093.38,-372.63 2093.38,-380.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2089.88,-380.68 2093.38,-390.68 2096.88,-380.68 2089.88,-380.68\"/>\n",
       "</g>\n",
       "<!-- go0009635 -->\n",
       "<g id=\"node54\" class=\"node\">\n",
       "<title>go0009635</title>\n",
       "<polygon fill=\"#ffe6e6\" stroke=\"red\" points=\"1958.62,-278 1788.12,-278 1788.12,-235.5 1958.62,-235.5 1958.62,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1873.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0009635</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"1873.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to herbicide</text>\n",
       "</g>\n",
       "<!-- go0009635&#45;&gt;go0006950 -->\n",
       "<g id=\"edge64\" class=\"edge\">\n",
       "<title>go0009635-&gt;go0006950</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1787.91,-269.33C1732.37,-278.61 1666.81,-293.49 1647.38,-314 1630.66,-331.64 1626.5,-359.3 1626.19,-380.86\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"1622.69,-380.65 1626.34,-390.6 1629.69,-380.55 1622.69,-380.65\"/>\n",
       "</g>\n",
       "<!-- go0009635&#45;&gt;go0009636 -->\n",
       "<g id=\"edge65\" class=\"edge\">\n",
       "<title>go0009635-&gt;go0009636</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1932.91,-278.45C1960.79,-288.15 1994.19,-299.76 2023.29,-309.88\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2021.77,-313.06 2032.36,-313.03 2024.07,-306.44 2021.77,-313.06\"/>\n",
       "</g>\n",
       "<!-- go0051597 -->\n",
       "<g id=\"node55\" class=\"node\">\n",
       "<title>go0051597</title>\n",
       "<polygon fill=\"#ffe6e6\" stroke=\"red\" points=\"2432,-356.5 2218.75,-356.5 2218.75,-314 2432,-314 2432,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2325.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0051597</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2325.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">response to methylmercury</text>\n",
       "</g>\n",
       "<!-- go0051597&#45;&gt;go0042221 -->\n",
       "<g id=\"edge66\" class=\"edge\">\n",
       "<title>go0051597-&gt;go0042221</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2262.59,-356.95C2233.06,-366.69 2197.66,-378.36 2166.88,-388.51\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2166.05,-385.1 2157.65,-391.56 2168.24,-391.75 2166.05,-385.1\"/>\n",
       "</g>\n",
       "<!-- go0016829 -->\n",
       "<g id=\"node56\" class=\"node\">\n",
       "<title>go0016829</title>\n",
       "<polygon fill=\"#ffe7e7\" stroke=\"red\" points=\"3655.62,-435 3545.12,-435 3545.12,-392.5 3655.62,-392.5 3655.62,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3600.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016829</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3600.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">lyase activity</text>\n",
       "</g>\n",
       "<!-- go0016829&#45;&gt;go0003824 -->\n",
       "<g id=\"edge67\" class=\"edge\">\n",
       "<title>go0016829-&gt;go0003824</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3622.35,-435.25C3631.45,-443.74 3642.16,-453.73 3651.99,-462.9\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3649.53,-465.4 3659.23,-469.66 3654.31,-460.28 3649.53,-465.4\"/>\n",
       "</g>\n",
       "<!-- go0016491 -->\n",
       "<g id=\"node57\" class=\"node\">\n",
       "<title>go0016491</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3856.62,-435 3674.12,-435 3674.12,-392.5 3856.62,-392.5 3856.62,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3765.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016491</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3765.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">oxidoreductase activity</text>\n",
       "</g>\n",
       "<!-- go0016491&#45;&gt;go0003824 -->\n",
       "<g id=\"edge68\" class=\"edge\">\n",
       "<title>go0016491-&gt;go0003824</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3743.13,-435.25C3733.92,-443.74 3723.09,-453.73 3713.13,-462.9\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3710.77,-460.32 3705.79,-469.67 3715.52,-465.46 3710.77,-460.32\"/>\n",
       "</g>\n",
       "<!-- go0016627 -->\n",
       "<g id=\"node58\" class=\"node\">\n",
       "<title>go0016627</title>\n",
       "<polygon fill=\"#ffe8e8\" stroke=\"red\" points=\"3983.75,-356.5 3529,-356.5 3529,-314 3983.75,-314 3983.75,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3756.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016627</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3756.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">oxidoreductase activity, acting on the CH-CH group of donors</text>\n",
       "</g>\n",
       "<!-- go0016627&#45;&gt;go0016491 -->\n",
       "<g id=\"edge69\" class=\"edge\">\n",
       "<title>go0016627-&gt;go0016491</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3758.79,-356.75C3759.66,-364.21 3760.68,-372.83 3761.64,-381.03\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3758.14,-381.17 3762.78,-390.69 3765.09,-380.35 3758.14,-381.17\"/>\n",
       "</g>\n",
       "<!-- go0016634 -->\n",
       "<g id=\"node59\" class=\"node\">\n",
       "<title>go0016634</title>\n",
       "<polygon fill=\"#ffebeb\" stroke=\"red\" points=\"3992.88,-278 3391.88,-278 3391.88,-235.5 3992.88,-235.5 3992.88,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3692.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0016634</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3692.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">oxidoreductase activity, acting on the CH-CH group of donors, oxygen as acceptor</text>\n",
       "</g>\n",
       "<!-- go0016634&#45;&gt;go0016627 -->\n",
       "<g id=\"edge70\" class=\"edge\">\n",
       "<title>go0016634-&gt;go0016627</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3709.53,-278.25C3716.41,-286.48 3724.48,-296.12 3731.96,-305.06\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3729.1,-307.11 3738.21,-312.53 3734.47,-302.62 3729.1,-307.11\"/>\n",
       "</g>\n",
       "<!-- go0032025 -->\n",
       "<g id=\"node60\" class=\"node\">\n",
       "<title>go0032025</title>\n",
       "<polygon fill=\"#ffebeb\" stroke=\"red\" points=\"2315.12,-278 2141.62,-278 2141.62,-235.5 2315.12,-235.5 2315.12,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2228.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0032025</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2228.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to cobalt ion</text>\n",
       "</g>\n",
       "<!-- go0032025&#45;&gt;go0010038 -->\n",
       "<g id=\"edge71\" class=\"edge\">\n",
       "<title>go0032025-&gt;go0010038</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2311.45,-278.45C2351.55,-288.44 2399.84,-300.48 2441.29,-310.81\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2440.21,-314.14 2450.76,-313.17 2441.9,-307.35 2440.21,-314.14\"/>\n",
       "</g>\n",
       "<!-- go0010288 -->\n",
       "<g id=\"node61\" class=\"node\">\n",
       "<title>go0010288</title>\n",
       "<polygon fill=\"#ffefef\" stroke=\"red\" points=\"2493.38,-278 2333.38,-278 2333.38,-235.5 2493.38,-235.5 2493.38,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2413.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0010288</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2413.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to lead ion</text>\n",
       "</g>\n",
       "<!-- go0010288&#45;&gt;go0010038 -->\n",
       "<g id=\"edge72\" class=\"edge\">\n",
       "<title>go0010288-&gt;go0010038</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2446.39,-278.45C2460.63,-287.38 2477.47,-297.94 2492.64,-307.46\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2490.72,-310.38 2501.05,-312.73 2494.44,-304.45 2490.72,-310.38\"/>\n",
       "</g>\n",
       "<!-- go0036094 -->\n",
       "<g id=\"node62\" class=\"node\">\n",
       "<title>go0036094</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3526.88,-435 3345.88,-435 3345.88,-392.5 3526.88,-392.5 3526.88,-435\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3436.38\" y=\"-417.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0036094</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3436.38\" y=\"-400.45\" font-family=\"Times,serif\" font-size=\"14.00\">small molecule binding</text>\n",
       "</g>\n",
       "<!-- go0005488 -->\n",
       "<g id=\"node63\" class=\"node\">\n",
       "<title>go0005488</title>\n",
       "<polygon fill=\"white\" stroke=\"black\" points=\"3582.75,-513.5 3482,-513.5 3482,-471 3582.75,-471 3582.75,-513.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3532.38\" y=\"-496.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0005488</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3532.38\" y=\"-478.95\" font-family=\"Times,serif\" font-size=\"14.00\">binding</text>\n",
       "</g>\n",
       "<!-- go0036094&#45;&gt;go0005488 -->\n",
       "<g id=\"edge73\" class=\"edge\">\n",
       "<title>go0036094-&gt;go0005488</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3462.35,-435.45C3473.13,-444.04 3485.8,-454.14 3497.38,-463.36\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3495.19,-466.09 3505.19,-469.59 3499.55,-460.62 3495.19,-466.09\"/>\n",
       "</g>\n",
       "<!-- go0005488&#45;&gt;go0003674 -->\n",
       "<g id=\"edge74\" class=\"edge\">\n",
       "<title>go0005488-&gt;go0003674</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3552.47,-513.75C3560.71,-522.15 3570.39,-532.03 3579.31,-541.12\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3576.66,-543.42 3586.16,-548.11 3581.66,-538.52 3576.66,-543.42\"/>\n",
       "</g>\n",
       "<!-- go0019842 -->\n",
       "<g id=\"node64\" class=\"node\">\n",
       "<title>go0019842</title>\n",
       "<polygon fill=\"#fff1f1\" stroke=\"red\" points=\"3500.62,-356.5 3372.12,-356.5 3372.12,-314 3500.62,-314 3500.62,-356.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3436.38\" y=\"-339.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0019842</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3436.38\" y=\"-321.95\" font-family=\"Times,serif\" font-size=\"14.00\">vitamin binding</text>\n",
       "</g>\n",
       "<!-- go0019842&#45;&gt;go0036094 -->\n",
       "<g id=\"edge75\" class=\"edge\">\n",
       "<title>go0019842-&gt;go0036094</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3436.38,-356.75C3436.38,-364.13 3436.38,-372.63 3436.38,-380.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3432.88,-380.68 3436.38,-390.68 3439.88,-380.68 3432.88,-380.68\"/>\n",
       "</g>\n",
       "<!-- go0005759 -->\n",
       "<g id=\"node65\" class=\"node\">\n",
       "<title>go0005759</title>\n",
       "<polygon fill=\"#fff2f2\" stroke=\"red\" points=\"3189.75,-42.5 3023,-42.5 3023,0 3189.75,0 3189.75,-42.5\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3106.38\" y=\"-25.2\" font-family=\"Times,serif\" font-size=\"14.00\">go:0005759</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"3106.38\" y=\"-7.95\" font-family=\"Times,serif\" font-size=\"14.00\">mitochondrial matrix</text>\n",
       "</g>\n",
       "<!-- go0005759&#45;&gt;go0070013 -->\n",
       "<g id=\"edge76\" class=\"edge\">\n",
       "<title>go0005759-&gt;go0070013</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3106.38,-42.75C3106.38,-50.13 3106.38,-58.63 3106.38,-66.75\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"3102.88,-66.68 3106.38,-76.68 3109.88,-66.68 3102.88,-66.68\"/>\n",
       "</g>\n",
       "<!-- go0010039 -->\n",
       "<g id=\"node66\" class=\"node\">\n",
       "<title>go0010039</title>\n",
       "<polygon fill=\"#fff3f3\" stroke=\"red\" points=\"2669.62,-278 2511.12,-278 2511.12,-235.5 2669.62,-235.5 2669.62,-278\"/>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2590.38\" y=\"-260.7\" font-family=\"Times,serif\" font-size=\"14.00\">go:0010039</text>\n",
       "<text xml:space=\"preserve\" text-anchor=\"middle\" x=\"2590.38\" y=\"-243.45\" font-family=\"Times,serif\" font-size=\"14.00\">response to iron ion</text>\n",
       "</g>\n",
       "<!-- go0010039&#45;&gt;go0010038 -->\n",
       "<g id=\"edge77\" class=\"edge\">\n",
       "<title>go0010039-&gt;go0010038</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2575.64,-278.25C2569.84,-286.31 2563.07,-295.72 2556.76,-304.5\"/>\n",
       "<polygon fill=\"none\" stroke=\"black\" points=\"2554.03,-302.3 2551.04,-312.46 2559.72,-306.39 2554.03,-302.3\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.SVG object>"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.core.display import SVG\n",
    "\n",
    "SVG(filename=imageFileName+'.svg')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "VsVRTs8WYSEA",
   "metadata": {
    "id": "VsVRTs8WYSEA"
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "colab": {
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
