History of interactome_stelzl
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 superfluous details of the upstream distribution from the descriptions dc07aa0
The descriptions mentioned incidental details of how the upstream data are made available: the file formats (CSV, JSON, XML, GEXF, SBML, HIF, Pajek, UCINET, ...), file names, where the files were published or obtained from (Zenodo, figshare, Kaggle, the Pajek datasets page, the Internet Archive), and that some networks are only available in the gt format. These are left out; caveats about the data themselves are kept, referring to "the data" instead of "the file". The description of sp_baboons now lists its properties instead of the upstream columns, and says that events without a recipient are left out.
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index cebdb44..6c1b280 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -19,9 +19,9 @@
from .. import *
title = 'Stelzl human interactome (2005)'
-description = """A network of interactions between human proteins, from a systematic yeast two-hybrid (Y2H) screen by Stelzl et al. (2005), in which a matrix of 4,456 bait and 5,632 prey proteins was tested by automated interaction mating, identifying 3,186 mostly novel interactions among 1,705 proteins. The data were obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine), which distributed them in its SIG flat file format, with proteins identified by gene symbols and, where available, UniProt accessions. All interactions are of type "Binding".
+description = """A network of interactions between human proteins, from a systematic yeast two-hybrid (Y2H) screen by Stelzl et al. (2005), in which a matrix of 4,456 bait and 5,632 prey proteins was tested by automated interaction mating, identifying 3,186 mostly novel interactions among 1,705 proteins. The data were obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine), where the proteins are identified by gene symbols and, where available, UniProt accessions. All interactions are of type "Binding".
-Nodes are proteins, and edges are directed, following the order of the two proteins in the source file; the meaning of the direction is not documented. Most interactions are listed in both directions (3,016 pairs of proteins are connected both ways), so that the 6,207 directed edges correspond to 3,191 unordered pairs. Self-loops denote proteins that interact with themselves.
+Nodes are proteins, and edges are directed, following the order of the two proteins in the data; the meaning of the direction is not documented. Most interactions are listed in both directions (3,016 pairs of proteins are connected both ways), so that the 6,207 directed edges correspond to 3,191 unordered pairs. Self-loops denote proteins that interact with themselves.
The network has the following properties:
[entries] Add the date when each entry was added, and remove icon_hash beff7c9
The dates are those of the commits that first added the entries' files (2020-08-11 for the entries of the initial commit); renamed entries keep the date of their first name. Changed: none
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index 8b38da7..cebdb44 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -30,7 +30,7 @@ The network has the following properties:
tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
citation = [('U. Stelzl et al., "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122(6), 957-968 (2005)', 'https://doi.org/10.1016/j.cell.2005.08.029')]
-icon_hash = '58065a248cf714f319c3be90'
+date_added = '2020-08-11'
upstream_license = None
# The Ma'ayan Laboratory site is gone; the file is obtained from the Internet
# Archive.
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) bc3dbbd
The lists of properties at the end of the descriptions marked edge properties with "Edge" but left node properties unmarked, or grouped them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property was often unclear. Every item now starts with (Node), (Edge) or (Graph), followed by the property names, a colon and the explanation, one item per property or group of properties; qualifications (kinds of nodes, networks) follow the names in parentheses. Properties that were only named got a short explanation, and a few items that named the wrong kind of property were corrected.
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index 4487145..8b38da7 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -25,7 +25,8 @@ Nodes are proteins, and edges are directed, following the order of the two prote
The network has the following properties:
-- Nodes: `name`, the gene symbol of the protein; `uniprot_human` and `uniprot_mouse`, the UniProt accessions of the human protein and of its mouse orthologue (empty if not available)."""
+- (Node) `name`: the gene symbol of the protein.
+- (Node) `uniprot_human` and `uniprot_mouse`: the UniProt accessions of the human protein and of its mouse orthologue (empty if not available)."""
tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
citation = [('U. Stelzl et al., "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122(6), 957-968 (2005)', 'https://doi.org/10.1016/j.cell.2005.08.029')]
[entries] Remove unneeded code from the entries 2c69f19
Unneeded "global files" statements, unused imports and variables, f-strings without placeholders, duplicate keys in foodweb_little_rock (keeping the order and the values used), and the second definition of get_lines() in twitter_higgs. Nothing changes in the networks or descriptions. Changed: none
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index e7b6ce0..4487145 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -55,7 +55,6 @@ def read_sig(f):
@coerce_props()
@annotate()
def parse(alts=None):
- global files
name = __name__.split(".")[-1]
for fname, alt, fmt in files:
if alts is not None and alt not in alts:
[entries] Move KONECT-derived entries to their original sources 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/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index da9a359..e7b6ce0 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -18,32 +18,69 @@
from .. import *
-title = "Stelzl human interactome (2005)"
-description = """A network of human proteins and their binding interactions. Nodes represent proteins and an edge represents an interaction between two proteins, as inferred via high-throughput Y2H experiments using bait and prey methodology.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Biological', 'Protein interactions', 'Unweighted']
-url = 'http://konect.cc/networks/maayan-Stelzl'
-citation = [('U. Stelzl et al. "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122, 957-968 (2005)', 'https://doi.org/10.1016/j.cell.2005.08.029')]
+title = 'Stelzl human interactome (2005)'
+description = """A network of interactions between human proteins, from a systematic yeast two-hybrid (Y2H) screen by Stelzl et al. (2005), in which a matrix of 4,456 bait and 5,632 prey proteins was tested by automated interaction mating, identifying 3,186 mostly novel interactions among 1,705 proteins. The data were obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine), which distributed them in its SIG flat file format, with proteins identified by gene symbols and, where available, UniProt accessions. All interactions are of type "Binding".
+
+Nodes are proteins, and edges are directed, following the order of the two proteins in the source file; the meaning of the direction is not documented. Most interactions are listed in both directions (3,016 pairs of proteins are connected both ways), so that the 6,207 directed edges correspond to 3,191 unordered pairs. Self-loops denote proteins that interact with themselves.
+
+The network has the following properties:
+
+- Nodes: `name`, the gene symbol of the protein; `uniprot_human` and `uniprot_mouse`, the UniProt accessions of the human protein and of its mouse orthologue (empty if not available)."""
+tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
+url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
+citation = [('U. Stelzl et al., "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122(6), 957-968 (2005)', 'https://doi.org/10.1016/j.cell.2005.08.029')]
icon_hash = '58065a248cf714f319c3be90'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.maayan-Stelzl.tar.bz2', None, 'konect')]
+upstream_license = None
+# The Ma'ayan Laboratory site is gone; the file is obtained from the Internet
+# Archive.
+upstream_prefix = 'https://web.archive.org/web/20150912005125id_/http://research.mssm.edu:80/maayan/datasets'
+files = [('Stelzl.sig', None, 'sig')]
def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
force)
+def read_sig(f):
+ """Read a SIG file of the Ma'ayan Laboratory: one interaction per line, with
+ 13 space-separated columns (source name, human and mouse accessions, type
+ and location; the same for the target; effect, interaction type, PubMed
+ IDs), "NA" denoting missing values."""
+ for line in f.read().decode("utf-8").splitlines():
+ line = line.split()
+ if len(line) == 0:
+ continue
+ yield [None if x == "NA" else x for x in line]
+
@cache_network()
@coerce_props()
@annotate()
def parse(alts=None):
global files
name = __name__.split(".")[-1]
- for fnames, alt, fmt in files:
+ for fname, 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=True)
+ vs = {}
+ acc = defaultdict(lambda: [None, None])
+ edges = []
+ with open_upstream_file(name, fname, "rb") as f:
+ for row in read_sig(f):
+ ends = []
+ for i in (0, 5):
+ v = vs.setdefault(row[i], len(vs))
+ ends.append(v)
+ for j in (0, 1):
+ if row[i + 1 + j] is not None:
+ acc[v][j] = row[i + 1 + j]
+ edges.append(ends)
+ g.add_vertex(len(vs))
+ g.vp.name = g.new_vp("string")
+ g.vp.uniprot_human = g.new_vp("string")
+ g.vp.uniprot_mouse = g.new_vp("string")
+ for k, v in vs.items():
+ g.vp.name[v] = k
+ g.vp.uniprot_human[v] = acc[v][0] or ""
+ g.vp.uniprot_mouse[v] = acc[v][1] or ""
+ g.add_edge_list(edges)
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index ba0a6b3..da9a359 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__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 3d288ea
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index 7586ae0..ba0a6b3 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__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 8d005ae
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index 2b540e5..7586ae0 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__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 db2efcc
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index e68965b..2b540e5 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__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 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index 6820860..e68965b 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/maayan-Stelzl'
citation = [('U. Stelzl et al. "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122, 957-968 (2005)', 'https://doi.org/10.1016/j.cell.2005.08.029')]
icon_hash = '58065a248cf714f319c3be90'
upstream_prefix = 'http://konect.cc/files'
-orphan = True
files = [('download.tsv.maayan-Stelzl.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Update citations to use DOIs e878874
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index b6617d2..6820860 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -23,7 +23,7 @@ description = """A network of human proteins and their binding interactions. Nod
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Protein interactions', 'Unweighted']
url = 'http://konect.cc/networks/maayan-Stelzl'
-citation = [('U. Stelzl et al. "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122, 957-968 (2005)', 'http://www.sciencedirect.com/science/article/pii/S0092867405008664')]
+citation = [('U. Stelzl et al. "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122, 957-968 (2005)', 'https://doi.org/10.1016/j.cell.2005.08.029')]
icon_hash = '58065a248cf714f319c3be90'
upstream_prefix = 'http://konect.cc/files'
orphan = True
Add support for 'orphan' datasets and tag konect entries e330b80
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
index 97a0cb1..b6617d2 100644
--- a/entries/interactome_stelzl/__init__.py
+++ b/entries/interactome_stelzl/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/maayan-Stelzl'
citation = [('U. Stelzl et al. "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122, 957-968 (2005)', 'http://www.sciencedirect.com/science/article/pii/S0092867405008664')]
icon_hash = '58065a248cf714f319c3be90'
upstream_prefix = 'http://konect.cc/files'
+orphan = True
files = [('download.tsv.maayan-Stelzl.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Rename connectome_stelzl to interactome_stelzl 1f37726
diff --git a/entries/interactome_stelzl/__init__.py b/entries/interactome_stelzl/__init__.py
new file mode 100644
index 0000000..97a0cb1
--- /dev/null
+++ b/entries/interactome_stelzl/__init__.py
@@ -0,0 +1,49 @@
+#! /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 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 Affero General Public License for more
+# details.
+#
+# 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 *
+
+title = "Stelzl human interactome (2005)"
+description = """A network of human proteins and their binding interactions. Nodes represent proteins and an edge represents an interaction between two proteins, as inferred via high-throughput Y2H experiments using bait and prey methodology.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+tags = ['Biological', 'Protein interactions', 'Unweighted']
+url = 'http://konect.cc/networks/maayan-Stelzl'
+citation = [('U. Stelzl et al. "A human protein-protein interaction network: a resource for annotating the proteome." Cell 122, 957-968 (2005)', 'http://www.sciencedirect.com/science/article/pii/S0092867405008664')]
+icon_hash = '58065a248cf714f319c3be90'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.maayan-Stelzl.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