logo Netzschleuder network catalog, repository, and centrifuge

History of reactome

The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.

[entries] Remove the mentions of KONECT from the descriptions of edit_wikibooks, edit_wikinews, edit_wikipedia, edit_wikiquote, edit_wiktionary, linux, prosper, reactome, unicodelang, wiki_categories, wiki_link_dyn, wikipedia_link and wordnet by Tiago de Paula Peixoto 2216557
These entries were originally taken from KONECT and now download
their data from the original sources, so their descriptions no longer
refer to KONECT.
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index fc1c62f..16438ae 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -19,7 +19,7 @@
 from .. import *
 
 title = "Reactome human protein interactions (2014)"
-description = """A network of interactions between human proteins, derived from Reactome, an open, manually curated database of biological pathways and reactions. Nodes are proteins (UniProt entries, including isoforms) and an undirected edge connects two proteins that Reactome's curators annotated as taking part in the same complex or reaction; the interactions are thus inferred from the pathway annotations ("inferred by curator", in the PSI-MI vocabulary), rather than measured directly. Some proteins interact with themselves, and appear with self-loops. This is the Reactome protein–protein interaction file for *Homo sapiens* in PSI-MITAB format as it was distributed by Reactome in August 2014 (the version used by KONECT); Reactome has since changed considerably.
+description = """A network of interactions between human proteins, derived from Reactome, an open, manually curated database of biological pathways and reactions. Nodes are proteins (UniProt entries, including isoforms) and an undirected edge connects two proteins that Reactome's curators annotated as taking part in the same complex or reaction; the interactions are thus inferred from the pathway annotations ("inferred by curator", in the PSI-MI vocabulary), rather than measured directly. Some proteins interact with themselves, and appear with self-loops. This is the Reactome protein–protein interaction file for *Homo sapiens* in PSI-MITAB format as it was distributed by Reactome in August 2014; Reactome has since changed considerably.
 
 The network has the following properties:
 
[entries] Move KONECT-derived entries to their original sources by Tiago de Paula Peixoto 45943ea
The entries now download the data from where KONECT obtained them (live
or via the Wayback Machine), gaining the metadata KONECT dropped (names,
identifiers, timestamps, attributes), with descriptions and citations
rewritten from the original sources:

- Ma'ayan lab collection: faa_routes, foodweb_little_rock (taxon names
  were assigned to the wrong nodes), interactome_pdz, interactome_figeys,
  interactome_stelzl, interactome_vidal
- Pajek collection and primary sources: word_assoc (from the Edinburgh
  Associative Thesaurus; KONECT dropped all counts >= 10), foldoc,
  new_guinea_tribes
- bitriad: elite, ceo_club (adds the CEO KONECT's copy lacked)
- Lovro Subelj: cora, euroroad (adds isolated cities and parallel roads)
- SNAP: elec (all votes, with elections and nominators)
- Zenodo: wiki_talk (user ids and roles)
- MPI-SWS: flickr_growth, facebook_wall (edges now point from poster to
  wall owner, as documented), wikipedia_growth (full timestamps)
- Other sources: prosper, jester, reactome (the 2014
  release KONECT used), unicodelang (CLDR 27), wordnet (WordNet 3.1),
  chicago_road (TNTP ChicagoRegional)
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index a3091ce..fc1c62f 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -18,20 +18,33 @@
 
 from .. import *
 
-title = "Joshi-Tope human protein interactome (2005)"
-description = """A network of human proteins and their binding interactions, extracted from Reactome project. Nodes represent proteins and an edge represents a binding interaction between two proteins.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Biological', 'Protein interactions', 'Unweighted']
-url = 'http://konect.cc/networks/reactome'
-citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'https://doi.org/10.1093/nar/gki072')]
+title = "Reactome human protein interactions (2014)"
+description = """A network of interactions between human proteins, derived from Reactome, an open, manually curated database of biological pathways and reactions. Nodes are proteins (UniProt entries, including isoforms) and an undirected edge connects two proteins that Reactome's curators annotated as taking part in the same complex or reaction; the interactions are thus inferred from the pathway annotations ("inferred by curator", in the PSI-MI vocabulary), rather than measured directly. Some proteins interact with themselves, and appear with self-loops. This is the Reactome protein–protein interaction file for *Homo sapiens* in PSI-MITAB format as it was distributed by Reactome in August 2014 (the version used by KONECT); Reactome has since changed considerably.
+
+The network has the following properties:
+
+- Nodes: `uniprot`, the UniProt accession of the protein (with an isoform suffix where applicable); `name`, the short label (gene name) of the protein, empty if not given in the data.
+- Edges: `interaction_type`, the PSI-MI interaction type, `physical association` or `association`; `pathways`, `reactions`, `complexes` and `regulations`, the lists of the Reactome stable identifiers of the pathways, reactions, complexes or polymers, and regulations in which the interaction was found (in the identifier scheme of that time, `REACT_*`). In the data, complexes are only given for physical associations, and regulations only for associations."""
+tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
+url = 'https://reactome.org/download-data'
+citation = [('G. Joshi-Tope et al., "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33(suppl. 1), D428-D432 (2005)', 'https://doi.org/10.1093/nar/gki072'),
+            ('I. Vastrik, P. D\'Eustachio, E. Schmidt, G. Joshi-Tope, G. Gopinath, D. Croft, B. de Bono, M. Gillespie, B. Jassal, S. Lewis, L. Matthews, G. Wu, E. Birney, L. Stein, "Reactome: a knowledge base of biologic pathways and processes." Genome Biology 8(3), R39 (2007)', 'https://doi.org/10.1186/gb-2007-8-3-r39')]
 icon_hash = '5817614f8cf714f319c3e77d'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.reactome.tar.bz2', None, 'konect')]
+upstream_license = ("CC BY 4.0", "https://reactome.org/license")
+# The file of the release used by KONECT, from the Internet Archive
+upstream_prefix = 'https://web.archive.org/web/20140814095106id_/http://www.reactome.org/download/current'
+files = [('homo_sapiens.mitab.interactions.txt.gz', None, None)]
 
 def fetch_upstream(force=False):
     return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
                                 force)
 
+def ids(x):
+    "A list of Reactome identifiers, without the prefix."
+    if x == "-":
+        return []
+    return [i.removeprefix("reactome:") for i in x.split("|")]
+
 @cache_network()
 @coerce_props()
 @annotate()
@@ -41,9 +54,37 @@ def parse(alts=None):
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
             continue
-        if isinstance(fnames, str):
-            fnames = [fnames]
-        with ExitStack() as stack:
-            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
-            g = parse_graph(fs, fmt, directed=True)
+        g = Graph(directed=False)
+        g.vp.uniprot = g.new_vp("string")
+        g.vp.name = g.new_vp("string")
+        g.ep.interaction_type = g.new_ep("string")
+        g.ep.pathways = g.new_ep("vector<string>")
+        g.ep.reactions = g.new_ep("vector<string>")
+        g.ep.complexes = g.new_ep("vector<string>")
+        g.ep.regulations = g.new_ep("vector<string>")
+        vs = {}
+        def get(uid, alt_id):
+            uid = uid.removeprefix("uniprotkb:")
+            if uid not in vs:
+                v = vs[uid] = g.add_vertex()
+                g.vp.uniprot[v] = uid
+            v = vs[uid]
+            # e.g. uniprotkb:Q9Y697_NFS1(shortlabel)
+            m = re.match(r"uniprotkb:[^_]+_(.*)\(shortlabel\)$", alt_id)
+            if m is not None:
+                g.vp.name[v] = m.group(1)
+            return v
+        with open_upstream_file(name, fnames, "r") as f:
+            next(f)    # header
+            for line in f:
+                x = line.rstrip("\n").split("\t")
+                if len(x) < 19:
+                    continue
+                e = g.add_edge(get(x[0], x[2]), get(x[1], x[3]))
+                m = re.search(r"\((.*)\)$", x[11])
+                g.ep.interaction_type[e] = m.group(1)
+                g.ep.pathways[e] = ids(x[15])
+                g.ep.reactions[e] = ids(x[16])
+                g.ep.complexes[e] = ids(x[17])
+                g.ep.regulations[e] = ids(x[18])
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 648802c..a3091ce 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright information by Tiago de Paula Peixoto 3d288ea
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 9f49f9b..648802c 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright information by Tiago de Paula Peixoto 8d005ae
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 176017f..9f49f9b 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright info by Tiago de Paula Peixoto db2efcc
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 394bcd3..176017f 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Un-orphan KONECT datasets by Tiago de Paula Peixoto 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index a31eec2..394bcd3 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/reactome'
 citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'https://doi.org/10.1093/nar/gki072')]
 icon_hash = '5817614f8cf714f319c3e77d'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.reactome.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 6846770..a31eec2 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -23,7 +23,7 @@ description = """A network of human proteins and their binding interactions, ext
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Protein interactions', 'Unweighted']
 url = 'http://konect.cc/networks/reactome'
-citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'http://nar.oxfordjournals.org/content/33/suppl_1/D428.short')]
+citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'https://doi.org/10.1093/nar/gki072')]
 icon_hash = '5817614f8cf714f319c3e77d'
 upstream_prefix = 'http://konect.cc/files'
 orphan = True
Add support for 'orphan' datasets and tag konect entries by Tiago de Paula Peixoto e330b80
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index acf92ba..6846770 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/reactome'
 citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'http://nar.oxfordjournals.org/content/33/suppl_1/D428.short')]
 icon_hash = '5817614f8cf714f319c3e77d'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.reactome.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 5012b90..acf92ba 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -3,18 +3,18 @@
 #
 # Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
 #
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
+# details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License along
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from .. import *
 
Add explicit attribution to descriptions obtained from ICON by Tiago de Paula Peixoto 1645314
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
index 907aed8..5012b90 100644
--- a/entries/reactome/__init__.py
+++ b/entries/reactome/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Joshi-Tope human protein interactome (2005)"
-description = "A network of human proteins and their binding interactions, extracted from Reactome project. Nodes represent proteins and an edge represents a binding interaction between two proteins."
+description = """A network of human proteins and their binding interactions, extracted from Reactome project. Nodes represent proteins and an edge represents a binding interaction between two proteins.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Protein interactions', 'Unweighted']
 url = 'http://konect.cc/networks/reactome'
 citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'http://nar.oxfordjournals.org/content/33/suppl_1/D428.short')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/reactome/__init__.py b/entries/reactome/__init__.py
new file mode 100644
index 0000000..907aed8
--- /dev/null
+++ b/entries/reactome/__init__.py
@@ -0,0 +1,48 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Joshi-Tope human protein interactome (2005)"
+description = "A network of human proteins and their binding interactions, extracted from Reactome project. Nodes represent proteins and an edge represents a binding interaction between two proteins."
+tags = ['Biological', 'Protein interactions', 'Unweighted']
+url = 'http://konect.cc/networks/reactome'
+citation = [('G. Joshi-Tope et al. "Reactome: a knowledgebase of biological pathways." Nucleic Acids Research 33.suppl 1, D428-D432 (2005).', 'http://nar.oxfordjournals.org/content/33/suppl_1/D428.short')]
+icon_hash = '5817614f8cf714f319c3e77d'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.reactome.tar.bz2', None, 'konect')]
+
+def fetch_upstream(force=False):
+    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+                                force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+    global files
+    name = __name__.split(".")[-1]
+    for fnames, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        if isinstance(fnames, str):
+            fnames = [fnames]
+        with ExitStack() as stack:
+            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
+            g = parse_graph(fs, fmt, directed=True)
+        yield alt, g