logo Netzschleuder network catalog, repository, and centrifuge

History of gerstein_regulatory

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 by Tiago de Paula Peixoto 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/gerstein_regulatory/__init__.py b/entries/gerstein_regulatory/__init__.py
index d39ee08..466e115 100644
--- a/entries/gerstein_regulatory/__init__.py
+++ b/entries/gerstein_regulatory/__init__.py
@@ -35,13 +35,13 @@ From Bhardwaj, Yan and Gerstein (2010) (also used by Bhardwaj, Kim and Gerstein,
 - `human_modification`: protein modification network of human, where the regulators modify their target proteins post-translationally, from the Human Protein Reference Database (HPRD).
 - `yeast_phosphorylation`: phosphorylation network of *S. cerevisiae*, where the regulators are kinases that phosphorylate their target proteins, from two large-scale experimental studies.
 
-In the source files of the 2010 networks, regulators and targets are often spelled with different capitalization (e.g., the E. coli regulator `AcrR` and its gene `acrR`); here, names that differ only in capitalization are merged into a single node, named after its first occurrence. Self-loops (autoregulation) and, for `mtuberculosis` and `yeast_phosphorylation`, repeated edges are present, as in the source data.
+In the data of the 2010 networks, regulators and targets are often spelled with different capitalization (e.g., the E. coli regulator `AcrR` and its gene `acrR`); here, names that differ only in capitalization are merged into a single node, named after its first occurrence. Self-loops (autoregulation) and, for `mtuberculosis` and `yeast_phosphorylation`, repeated edges are present, as in the source data.
 
 The networks have the following properties:
 
 - (Node) `name`: the gene or protein name.
 - (Node) `level` (2010 networks only): the level of regulators in the hierarchy of Bhardwaj, Yan and Gerstein (2010), "top" (regulators not regulated by other regulators), "middle" (regulators regulated by and regulating other regulators) or "bottom" (regulators regulated by other regulators but not regulating any), and empty for the non-regulator targets.
-- (Node) `hierarchy_level` (`yeast` and `ecoli` only): the level of regulators in the hierarchy of Bhardwaj, Kim and Gerstein (2010), from 1 (bottom) to 4 (top), and 0 for the non-regulator targets. The levels are those given in the files of the source, which do not entirely match the networks: some regulators have no level, and some names in the level files do not correspond to nodes in the networks (these are ignored).
+- (Node) `hierarchy_level` (`yeast` and `ecoli` only): the level of regulators in the hierarchy of Bhardwaj, Kim and Gerstein (2010), from 1 (bottom) to 4 (top), and 0 for the non-regulator targets. The levels are those given by the source, which do not entirely match the networks: some regulators have no level, and some names in the levels do not correspond to nodes in the networks (these are ignored).
 - (Edge) `regulation` (`ecoli` only): the type of regulation, `+` (activation), `-` (repression), `+-` (dual), or with a `?` when uncertain."""
 tags = ['Biological', 'Gene regulation', 'Unweighted', 'Metadata']
 url = 'https://info.gersteinlab.org/Hierarchy'
[entries] Add the date when each entry was added, and remove icon_hash by Tiago de Paula Peixoto 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/gerstein_regulatory/__init__.py b/entries/gerstein_regulatory/__init__.py
index 1d5b93a..d39ee08 100644
--- a/entries/gerstein_regulatory/__init__.py
+++ b/entries/gerstein_regulatory/__init__.py
@@ -48,8 +48,7 @@ url = 'https://info.gersteinlab.org/Hierarchy'
 citation = [('H. Yu, M. Gerstein, "Genomic analysis of the hierarchical structure of regulatory networks." Proceedings of the National Academy of Sciences 103(40), 14724-14731 (2006)', 'https://doi.org/10.1073/pnas.0508637103'),
             ('N. Bhardwaj, K.-K. Yan, M. B. Gerstein, "Analysis of diverse regulatory networks in a hierarchical context shows consistent tendencies for collaboration in the middle levels." Proceedings of the National Academy of Sciences 107(15), 6841-6846 (2010)', 'https://doi.org/10.1073/pnas.0910867107'),
             ('N. Bhardwaj, P. M. Kim, M. B. Gerstein, "Rewiring of Transcriptional Regulatory Networks: Hierarchy, Rather Than Connectivity, Better Reflects the Importance of Regulators." Science Signaling 3(146), ra79 (2010)', 'https://doi.org/10.1126/scisignal.2001014')]
-icon_hash = ['572d1cad461efe0c7a677d1b', '572d22de461efe0c7a677d1e',
-             '57337ed2461efe0c7a677d25']
+date_added = '2026-10-25'
 upstream_license = None
 upstream_prefix = 'http://archive.gersteinlab.org/proj/Hierarchy_Rewiring'
 files = [('PNAS_hier/YRN.txt', 'yeast_2006', 'adjlist'),
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) by Tiago de Paula Peixoto 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/gerstein_regulatory/__init__.py b/entries/gerstein_regulatory/__init__.py
index c06eb05..1d5b93a 100644
--- a/entries/gerstein_regulatory/__init__.py
+++ b/entries/gerstein_regulatory/__init__.py
@@ -39,8 +39,10 @@ In the source files of the 2010 networks, regulators and targets are often spell
 
 The networks have the following properties:
 
-- Nodes: `name`, the gene or protein name; `level` (2010 networks only), the level of regulators in the hierarchy of Bhardwaj, Yan and Gerstein (2010), "top" (regulators not regulated by other regulators), "middle" (regulators regulated by and regulating other regulators) or "bottom" (regulators regulated by other regulators but not regulating any), and empty for the non-regulator targets; `hierarchy_level` (`yeast` and `ecoli` only), the level of regulators in the hierarchy of Bhardwaj, Kim and Gerstein (2010), from 1 (bottom) to 4 (top), and 0 for the non-regulator targets. The levels are those given in the files of the source, which do not entirely match the networks: some regulators have no level, and some names in the level files do not correspond to nodes in the networks (these are ignored).
-- Edges: `regulation` (`ecoli` only), the type of regulation, `+` (activation), `-` (repression), `+-` (dual), or with a `?` when uncertain."""
+- (Node) `name`: the gene or protein name.
+- (Node) `level` (2010 networks only): the level of regulators in the hierarchy of Bhardwaj, Yan and Gerstein (2010), "top" (regulators not regulated by other regulators), "middle" (regulators regulated by and regulating other regulators) or "bottom" (regulators regulated by other regulators but not regulating any), and empty for the non-regulator targets.
+- (Node) `hierarchy_level` (`yeast` and `ecoli` only): the level of regulators in the hierarchy of Bhardwaj, Kim and Gerstein (2010), from 1 (bottom) to 4 (top), and 0 for the non-regulator targets. The levels are those given in the files of the source, which do not entirely match the networks: some regulators have no level, and some names in the level files do not correspond to nodes in the networks (these are ignored).
+- (Edge) `regulation` (`ecoli` only): the type of regulation, `+` (activation), `-` (repression), `+-` (dual), or with a `?` when uncertain."""
 tags = ['Biological', 'Gene regulation', 'Unweighted', 'Metadata']
 url = 'https://info.gersteinlab.org/Hierarchy'
 citation = [('H. Yu, M. Gerstein, "Genomic analysis of the hierarchical structure of regulatory networks." Proceedings of the National Academy of Sciences 103(40), 14724-14731 (2006)', 'https://doi.org/10.1073/pnas.0508637103'),
[entries] Remove unneeded code from the entries by Tiago de Paula Peixoto 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/gerstein_regulatory/__init__.py b/entries/gerstein_regulatory/__init__.py
index b513732..c06eb05 100644
--- a/entries/gerstein_regulatory/__init__.py
+++ b/entries/gerstein_regulatory/__init__.py
@@ -71,7 +71,6 @@ hierarchy_levels = {"bottom": 1, "first": 2, "two": 3, "three": 4}
 @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:
[entries] New entry: gerstein_regulatory by Tiago de Paula Peixoto 0d0f6f1
diff --git a/entries/gerstein_regulatory/__init__.py b/entries/gerstein_regulatory/__init__.py
new file mode 100644
index 0000000..b513732
--- /dev/null
+++ b/entries/gerstein_regulatory/__init__.py
@@ -0,0 +1,120 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# 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
+# 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 = "Gerstein lab regulatory network hierarchies (2006-2010)"
+description = """Directed regulatory networks of several organisms, used by the Gerstein lab to study the organization of regulatory networks into hierarchies. Nodes are genes (or proteins), and a directed edge points from a regulator to one of its targets.
+
+From Yu and Gerstein (2006), transcriptional regulatory networks, where the regulators are transcription factors:
+
+- `yeast_2006`: the yeast *Saccharomyces cerevisiae* (genes identified by systematic ORF names).
+- `ecoli_2006`: the bacterium *Escherichia coli* (genes identified by Blattner b-numbers).
+
+From Bhardwaj, Yan and Gerstein (2010) (also used by Bhardwaj, Kim and Gerstein, 2010):
+
+- `yeast`: transcriptional regulatory network of *S. cerevisiae*, from genetic and biochemical experiments of several previous studies.
+- `ecoli`: transcriptional regulatory network of *E. coli*, from RegulonDB (version 6.2, July 2009).
+- `mouse`, `rat`, `human`: transcriptional regulatory networks from the Transcriptional Regulatory Element Database (TRED, as of June 2008).
+- `mtuberculosis`: transcriptional regulatory network of *Mycobacterium tuberculosis*, from published microarray data.
+- `human_modification`: protein modification network of human, where the regulators modify their target proteins post-translationally, from the Human Protein Reference Database (HPRD).
+- `yeast_phosphorylation`: phosphorylation network of *S. cerevisiae*, where the regulators are kinases that phosphorylate their target proteins, from two large-scale experimental studies.
+
+In the source files of the 2010 networks, regulators and targets are often spelled with different capitalization (e.g., the E. coli regulator `AcrR` and its gene `acrR`); here, names that differ only in capitalization are merged into a single node, named after its first occurrence. Self-loops (autoregulation) and, for `mtuberculosis` and `yeast_phosphorylation`, repeated edges are present, as in the source data.
+
+The networks have the following properties:
+
+- Nodes: `name`, the gene or protein name; `level` (2010 networks only), the level of regulators in the hierarchy of Bhardwaj, Yan and Gerstein (2010), "top" (regulators not regulated by other regulators), "middle" (regulators regulated by and regulating other regulators) or "bottom" (regulators regulated by other regulators but not regulating any), and empty for the non-regulator targets; `hierarchy_level` (`yeast` and `ecoli` only), the level of regulators in the hierarchy of Bhardwaj, Kim and Gerstein (2010), from 1 (bottom) to 4 (top), and 0 for the non-regulator targets. The levels are those given in the files of the source, which do not entirely match the networks: some regulators have no level, and some names in the level files do not correspond to nodes in the networks (these are ignored).
+- Edges: `regulation` (`ecoli` only), the type of regulation, `+` (activation), `-` (repression), `+-` (dual), or with a `?` when uncertain."""
+tags = ['Biological', 'Gene regulation', 'Unweighted', 'Metadata']
+url = 'https://info.gersteinlab.org/Hierarchy'
+citation = [('H. Yu, M. Gerstein, "Genomic analysis of the hierarchical structure of regulatory networks." Proceedings of the National Academy of Sciences 103(40), 14724-14731 (2006)', 'https://doi.org/10.1073/pnas.0508637103'),
+            ('N. Bhardwaj, K.-K. Yan, M. B. Gerstein, "Analysis of diverse regulatory networks in a hierarchical context shows consistent tendencies for collaboration in the middle levels." Proceedings of the National Academy of Sciences 107(15), 6841-6846 (2010)', 'https://doi.org/10.1073/pnas.0910867107'),
+            ('N. Bhardwaj, P. M. Kim, M. B. Gerstein, "Rewiring of Transcriptional Regulatory Networks: Hierarchy, Rather Than Connectivity, Better Reflects the Importance of Regulators." Science Signaling 3(146), ra79 (2010)', 'https://doi.org/10.1126/scisignal.2001014')]
+icon_hash = ['572d1cad461efe0c7a677d1b', '572d22de461efe0c7a677d1e',
+             '57337ed2461efe0c7a677d25']
+upstream_license = None
+upstream_prefix = 'http://archive.gersteinlab.org/proj/Hierarchy_Rewiring'
+files = [('PNAS_hier/YRN.txt', 'yeast_2006', 'adjlist'),
+         ('PNAS_hier/ERN.txt', 'ecoli_2006', 'adjlist'),
+         (('PNAS_hier/Sc_Tr.txt', 'PNAS_hier/Sc_Tr_layers.txt', 'Yeast_hierarchy.txt'), 'yeast', 'edgelist'),
+         (('PNAS_hier/Ec_Tr.txt', 'PNAS_hier/Ec_Tr_layers.txt', 'Ecoli_hierarchy.txt'), 'ecoli', 'edgelist'),
+         (('PNAS_hier/Mm_Tr.txt', 'PNAS_hier/Mm_Tr_layers.txt'), 'mouse', 'edgelist'),
+         (('PNAS_hier/Rr_Tr.txt', 'PNAS_hier/Rr_Tr_layers.txt'), 'rat', 'edgelist'),
+         (('PNAS_hier/Hs_Tr.txt', 'PNAS_hier/Hs_Tr_layers.txt'), 'human', 'edgelist'),
+         (('PNAS_hier/Mt_Tr.txt', 'PNAS_hier/Mt_Tr_layers.txt'), 'mtuberculosis', 'edgelist'),
+         (('PNAS_hier/Hs_mod.txt', 'PNAS_hier/HS_mod_layers.txt'), 'human_modification', 'edgelist'),
+         (('PNAS_hier/Sc_Ph.txt', 'PNAS_hier/Sc_Ph_layers.txt'), 'yeast_phosphorylation', 'edgelist')]
+
+def fetch_upstream(force=False):
+    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+                                force)
+
+hierarchy_levels = {"bottom": 1, "first": 2, "two": 3, "three": 4}
+
+@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]
+        g = Graph(directed=True)
+        g.vp.name = g.new_vp("string")
+        idx = {}
+        def vertex(n):
+            k = n.lower()
+            if k not in idx:
+                idx[k] = g.add_vertex()
+                g.vp.name[idx[k]] = n
+            return idx[k]
+        with open_upstream_file(name, fnames[0], "r") as f:
+            rows = [line.rstrip("\r\n").split("\t") for line in f if line.strip()]
+        if fmt == "adjlist":
+            # regulator followed by its targets
+            for r in rows:
+                for t in r[1:]:
+                    if t.strip():
+                        g.add_edge(vertex(r[0].strip()), vertex(t.strip()))
+        else:
+            if alt == "ecoli":
+                g.ep.regulation = g.new_ep("string")
+            for r in rows:
+                e = g.add_edge(vertex(r[0].strip()), vertex(r[1].strip()))
+                if alt == "ecoli":
+                    g.ep.regulation[e] = r[2].strip()
+            g.vp.level = g.new_vp("string")
+            with open_upstream_file(name, fnames[1], "r") as f:
+                for line in f:
+                    vals = line.rstrip("\r\n").split("\t")
+                    if (len(vals) == 2 and vals[1].strip() in ("top", "middle", "bottom")
+                        and vals[0].strip().lower() in idx):
+                        g.vp.level[idx[vals[0].strip().lower()]] = vals[1].strip()
+            if len(fnames) > 2:
+                g.vp.hierarchy_level = g.new_vp("int")
+                with open_upstream_file(name, fnames[2], "r") as f:
+                    for line in f:
+                        vals = line.strip().split(" = ")
+                        if len(vals) == 2 and vals[0].lower() in idx:
+                            g.vp.hierarchy_level[idx[vals[0].lower()]] = \
+                                hierarchy_levels[vals[1]]
+        yield alt, g