logo Netzschleuder network catalog, repository, and centrifuge

History of celegans_interactomes

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] Merge duplicate entries and add cross-references between related ones by Tiago de Paula Peixoto 9bc6033
- Removed duplicates, merged into the entries holding the same data:
  dblp_coauthor_snap (soc_net_comms), cattle and bison (dom; bison's
  breeding data move there, as do the wolves' age and sex),
  football_tsevans (football, with both conference assignments),
  eu_procurements_alt (eu_procurements), foursquare_friendships
  (foursquare_global).
- software_dependencies: colt and scolt are one network; ambassador: the
  duplicate 2001 network is dropped and the three same-edge networks
  combined; dom: the dataset count corrected (436).
- macaque_neural: Young's 71-area network added (young71; the 47-area one
  is now cocomac47), both from archived copies.
- collins_yeast, celegans_interactomes: from archived copies of the dead
  CCSB site (byte-identical files).
- Cross-references between entries holding versions of the same data
  (food webs, Wikipedia, Slashdot, physicians, SNAP/Mislove, CCSB).
- ICON ids of duplicate records added; macaque_neural's corrected.
- prosper, dbpedia_all: string properties given in edge-index order (needs
  graph-tool with the fixed vals ordering).
diff --git a/entries/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index 71bed87..e5eb48b 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__init__.py
@@ -38,13 +38,17 @@ The networks have the following properties:
 - Edges (`Microarray`): `pcc`, the Pearson correlation coefficient of the expression profiles of the two genes.
 - Edges (`Phenotypes`): `phenotypes`, the phenotypic similarity score of the two genes.
 - Edges (`WI8`): `wi2004`, `wi2007` and `bpmaps`, the status of the interaction in each of the three source data sets (e.g. `core` or `noncore`; empty if the interaction is not in the data set).
-- Edges (`IntegratedNetwork`): `wi8`, `lci`, `interologs` and `genetic`, whether the edge is present in the corresponding source network; `phenotypes` and `coexpression`, the phenotypic similarity score and the expression correlation of the two genes (NaN if not available)."""
+- Edges (`IntegratedNetwork`): `wi8`, `lci`, `interologs` and `genetic`, whether the edge is present in the corresponding source network; `phenotypes` and `coexpression`, the phenotypic similarity score and the expression correlation of the two genes (NaN if not available).
+
+The networks come from the *C. elegans* download page of the CCSB Interactome Database, whose other data sets are in the entries `yeast_interactome_ccsb` and `collins_yeast` (yeast) and `interactome_vidal` and `human_interactome_2014` (human)."""
 tags = ['Biological', 'Protein interactions', 'Unweighted']
-url = 'http://interactome.dfci.harvard.edu/C_elegans/index.php?page=download'
+url = 'https://web.archive.org/web/20240123025943/http://interactome.dfci.harvard.edu/C_elegans/index.php?page=download'
 citation = [('N. Simonis et al., "Empirically controlled mapping of the Caenorhabditis elegans protein-protein interactome network." Nature Methods 6(1), 47-54 (2009)', 'https://doi.org/10.1038/nmeth.1279')]
 icon_hash = '56a85c8e26855e083a2f7948'
 upstream_license = None
-upstream_prefix = 'http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/'
+# The CCSB site is offline; the files are obtained from the Internet Archive
+# (snapshots of January 2024, identical to the files downloaded in 2020).
+upstream_prefix = 'https://web.archive.org/web/20240123030157id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/'
 files = [("wi2007.txt", "wi2007", "csv"),
          ("wi2004.txt", "wi2004", "csv"),
          ("scaffold.txt", "BPmaps", "csv"),
@@ -56,9 +60,21 @@ files = [("wi2007.txt", "wi2007", "csv"),
          ("wi8.txt", "WI8", "csv"),
          ("integrated_functional_network.txt", "IntegratedNetwork", "csv")]
 
+archived_urls = {
+    'genetic.txt': 'https://web.archive.org/web/20240123030219id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/genetic.txt',
+    'integrated_functional_network.txt': 'https://web.archive.org/web/20240123030255id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/integrated_functional_network.txt',
+    'interolog.txt': 'https://web.archive.org/web/20240123030252id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/interolog.txt',
+    'lit.txt': 'https://web.archive.org/web/20240123030215id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/lit.txt',
+    'microarray.txt': 'https://web.archive.org/web/20240123030157id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/microarray.txt',
+    'phenotype.txt': 'https://web.archive.org/web/20240123030307id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/phenotype.txt',
+    'scaffold.txt': 'https://web.archive.org/web/20240123030220id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/scaffold.txt',
+    'wi2004.txt': 'https://web.archive.org/web/20240123030248id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/wi2004.txt',
+    'wi2007.txt': 'https://web.archive.org/web/20240123030307id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/wi2007.txt',
+    'wi8.txt': 'https://web.archive.org/web/20240123030306id_/http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/wi8.txt'}
+
 def fetch_upstream(force=False):
-    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
-                                force)
+    return fetch_archived_files(__name__.split(".")[-1], archived_urls, force,
+                                tries=5, timeout=600)
 
 @cache_network()
 @coerce_props()
[entries] Fix parse bugs and improve descriptions and metadata by Tiago de Paula Peixoto 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents
  (directed), celegans_2019 (synapse direction), ecoli_transcription and
  yeast_transcription (regulator to target), bitcoin (direction, phantom
  node), ego_social (Google+ features and circles), scotus_majority,
  arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom,
  mist, reuters and bibsonomy (names on the right nodes), uci_zoo
- every description now states explicitly what the nodes and edges
  represent; corrected titles, years, tags, citations and licences
- the "Hypergraph" tag is removed; very large entries are marked
  `huge = True` (see --skip-huge)
- ICON ids of partial duplicates added (hiv_transmission, congress_bills,
  openflights, dutch_school)
diff --git a/entries/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index 7c82e01..71bed87 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__init__.py
@@ -19,13 +19,31 @@
 from .. import *
 
 title = "C. elegans interactomes (2009)"
-description = """Ten networks of protein-protein interactions in Caenorhabditis elegans (nematode), from yeast two-hybrid experiments, biological process maps, literature curation, orthologous interactions, and genetic interactions. The WI8 network combines WI2004, WI2007 and BPmaps, while the Integrated Network combines data from all sources[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+description = """Networks of protein–protein interactions and other functional relationships between genes of the nematode *Caenorhabditis elegans*, from the study of N. Simonis and collaborators at the Center for Cancer Systems Biology (Dana-Farber Cancer Institute), which produced an empirically controlled, high-quality map of the *C. elegans* interactome. Nodes are genes (proteins), identified by their *C. elegans* sequence names (e.g. `AC7.2`), and an undirected edge connects two genes that are related in the corresponding source (a physical interaction between their proteins, a genetic interaction, correlated expression or similar phenotypes, see below). There are ten networks:
+
+- `wi2004`: protein interactions from the first high-throughput yeast two-hybrid (Y2H) map of Li et al. (2004);
+- `wi2007`: protein interactions from the new Y2H screens of Simonis et al. (Worm Interactome version 2007);
+- `BPmaps`: Y2H interactions from earlier smaller-scale "biological process maps" focused on specific processes;
+- `WI8`: the union of `wi2004`, `wi2007` and `BPmaps`;
+- `LCI`: literature-curated interactions supported by small-scale experiments;
+- `Interolog`: interactions predicted from interactions between orthologous proteins in other species;
+- `Genetic`: genetic interactions;
+- `Microarray`: pairs of genes with highly correlated expression profiles in microarray experiments;
+- `Phenotypes`: pairs of genes with similar phenotypic profiles (e.g. in RNAi experiments);
+- `IntegratedNetwork`: the union of all of the above sources.
+
+The networks have the following properties:
+
+- Nodes: `name`, the gene's sequence name.
+- Edges (`Microarray`): `pcc`, the Pearson correlation coefficient of the expression profiles of the two genes.
+- Edges (`Phenotypes`): `phenotypes`, the phenotypic similarity score of the two genes.
+- Edges (`WI8`): `wi2004`, `wi2007` and `bpmaps`, the status of the interaction in each of the three source data sets (e.g. `core` or `noncore`; empty if the interaction is not in the data set).
+- Edges (`IntegratedNetwork`): `wi8`, `lci`, `interologs` and `genetic`, whether the edge is present in the corresponding source network; `phenotypes` and `coexpression`, the phenotypic similarity score and the expression correlation of the two genes (NaN if not available)."""
 tags = ['Biological', 'Protein interactions', 'Unweighted']
 url = 'http://interactome.dfci.harvard.edu/C_elegans/index.php?page=download'
 citation = [('N. Simonis et al., "Empirically controlled mapping of the Caenorhabditis elegans protein-protein interactome network." Nature Methods 6(1), 47-54 (2009)', 'https://doi.org/10.1038/nmeth.1279')]
 icon_hash = '56a85c8e26855e083a2f7948'
-ustream_license = None
+upstream_license = None
 upstream_prefix = 'http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/'
 files = [("wi2007.txt", "wi2007", "csv"),
          ("wi2004.txt", "wi2004", "csv"),
@@ -55,11 +73,29 @@ def parse(alts=None):
             fnames = [fnames]
         with ExitStack() as stack:
             fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
-            fs[0].readline()
-            def get_edges():
-                for line in fs[0]:
-                    yield line.split()
+            # tab-separated, with a header line; columns beyond the first two
+            # are edge annotations, which may be empty
+            header = fs[0].readline().lstrip("#").rstrip("\n").split("\t")
+            enames = [x.lower() for x in header[2:]]
+            rows = [line.rstrip("\n").split("\t") for line in fs[0]]
             g = Graph(directed=False)
-            g.vp.name = g.add_edge_list(get_edges(), hashed=True,
-                                        hash_type="string")
+            eprops = [g.new_ep("string") for x in enames]
+            g.vp.name = g.add_edge_list(rows, hashed=True,
+                                        hash_type="string", eprops=eprops)
+            for k, p in zip(enames, eprops):
+                vals = set(p)
+                if vals <= {"0", "1"}:
+                    p = p.copy("bool")
+                elif all(x == "" or is_float(x) for x in vals):
+                    q = g.new_ep("double")
+                    q.a = [float(x) if x != "" else numpy.nan for x in p]
+                    p = q
+                g.ep[k] = p
         yield alt, g
+
+def is_float(x):
+    try:
+        float(x)
+        return True
+    except ValueError:
+        return False
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index b94206e..7c82e01 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__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/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index 4f0ee06..b94206e 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__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/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index fa0a5b7..4f0ee06 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__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/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index c95ddcb..fa0a5b7 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__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
Update citations to use DOIs by Tiago de Paula Peixoto e878874
diff --git a/entries/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index 4fe11fb..c95ddcb 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__init__.py
@@ -23,7 +23,7 @@ description = """Ten networks of protein-protein interactions in Caenorhabditis
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Protein interactions', 'Unweighted']
 url = 'http://interactome.dfci.harvard.edu/C_elegans/index.php?page=download'
-citation = [('N. Simonis et al., "Empirically controlled mapping of the Caenorhabditis elegans protein-protein interactome network." Nature Methods 6(1), 47-54 (2009)', 'http://ccsb.dfci.harvard.edu/web/export/sites/default/ccsb/publications/papers/2009/Simonis_NatMeth_1-09.pdf')]
+citation = [('N. Simonis et al., "Empirically controlled mapping of the Caenorhabditis elegans protein-protein interactome network." Nature Methods 6(1), 47-54 (2009)', 'https://doi.org/10.1038/nmeth.1279')]
 icon_hash = '56a85c8e26855e083a2f7948'
 ustream_license = None
 upstream_prefix = 'http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/'
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index d415ccc..4fe11fb 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__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/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
index 74d84fe..d415ccc 100644
--- a/entries/celegans_interactomes/__init__.py
+++ b/entries/celegans_interactomes/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "C. elegans interactomes (2009)"
-description = "Ten networks of protein-protein interactions in Caenorhabditis elegans (nematode), from yeast two-hybrid experiments, biological process maps, literature curation, orthologous interactions, and genetic interactions. The WI8 network combines WI2004, WI2007 and BPmaps, while the Integrated Network combines data from all sources"
+description = """Ten networks of protein-protein interactions in Caenorhabditis elegans (nematode), from yeast two-hybrid experiments, biological process maps, literature curation, orthologous interactions, and genetic interactions. The WI8 network combines WI2004, WI2007 and BPmaps, while the Integrated Network combines data from all sources[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Protein interactions', 'Unweighted']
 url = 'http://interactome.dfci.harvard.edu/C_elegans/index.php?page=download'
 citation = [('N. Simonis et al., "Empirically controlled mapping of the Caenorhabditis elegans protein-protein interactome network." Nature Methods 6(1), 47-54 (2009)', 'http://ccsb.dfci.harvard.edu/web/export/sites/default/ccsb/publications/papers/2009/Simonis_NatMeth_1-09.pdf')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/celegans_interactomes/__init__.py b/entries/celegans_interactomes/__init__.py
new file mode 100644
index 0000000..74d84fe
--- /dev/null
+++ b/entries/celegans_interactomes/__init__.py
@@ -0,0 +1,64 @@
+#! /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 = "C. elegans interactomes (2009)"
+description = "Ten networks of protein-protein interactions in Caenorhabditis elegans (nematode), from yeast two-hybrid experiments, biological process maps, literature curation, orthologous interactions, and genetic interactions. The WI8 network combines WI2004, WI2007 and BPmaps, while the Integrated Network combines data from all sources"
+tags = ['Biological', 'Protein interactions', 'Unweighted']
+url = 'http://interactome.dfci.harvard.edu/C_elegans/index.php?page=download'
+citation = [('N. Simonis et al., "Empirically controlled mapping of the Caenorhabditis elegans protein-protein interactome network." Nature Methods 6(1), 47-54 (2009)', 'http://ccsb.dfci.harvard.edu/web/export/sites/default/ccsb/publications/papers/2009/Simonis_NatMeth_1-09.pdf')]
+icon_hash = '56a85c8e26855e083a2f7948'
+ustream_license = None
+upstream_prefix = 'http://interactome.dfci.harvard.edu/C_elegans/graphs/sequence_edges/'
+files = [("wi2007.txt", "wi2007", "csv"),
+         ("wi2004.txt", "wi2004", "csv"),
+         ("scaffold.txt", "BPmaps", "csv"),
+         ("lit.txt", "LCI", "csv"),
+         ("microarray.txt", "Microarray", "csv"),
+         ("phenotype.txt", "Phenotypes", "csv"),
+         ("interolog.txt", "Interolog", "csv"),
+         ("genetic.txt", "Genetic", "csv"),
+         ("wi8.txt", "WI8", "csv"),
+         ("integrated_functional_network.txt", "IntegratedNetwork", "csv")]
+
+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, "r")) for fn in fnames]
+            fs[0].readline()
+            def get_edges():
+                for line in fs[0]:
+                    yield line.split()
+            g = Graph(directed=False)
+            g.vp.name = g.add_edge_list(get_edges(), hashed=True,
+                                        hash_type="string")
+        yield alt, g