logo Netzschleuder network catalog, repository, and centrifuge

History of ecoli_transcription

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] 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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index 17c8c5a..e38c1a1 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__init__.py
@@ -33,7 +33,7 @@ The networks have the following properties:
 tags = ['Biological', 'Gene regulation', 'Unweighted']
 url = 'http://www.weizmann.ac.il/mcb/UriAlon/e-coli-transcription-network'
 citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'https://doi.org/10.1038/ng881')]
-icon_hash = '56a85c8e26855e083a2f78ee'
+date_added = '2020-08-11'
 upstream_prefix = 'https://www.weizmann.ac.il/mcb/UriAlon/sites/mcb.UriAlon/files/uploads/Network_motifs_in_coli'
 files = [(('colinet-1.0.zip:ColiNet-1.0/coliInterFullVec.txt', 'colinet-1.0.zip:ColiNet-1.0/coliInterFullNames.txt'), 'v1.0', ('loadtxt', {'pnames': ['regulation_type'], 'vprops': {'fmt': 'txt', 'names': ['name']}})), (('colinet-1.1.zip:ColiNet-1.1/coliInterFullVec.txt', 'colinet-1.1.zip:ColiNet-1.1/coliInterFullNames.txt'), 'v1.1', ('loadtxt', {'pnames': ['regulation_type'], 'vprops': {'fmt': 'txt', 'names': ['name']}}))]
 
[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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index 28fbda3..17c8c5a 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__init__.py
@@ -28,8 +28,8 @@ There are two versions of the data:
 
 The networks have the following properties:
 
-- Nodes: `name`, the name of the operon (e.g. `crp`).
-- Edges: `regulation_type`, the kind of regulation (1: activation, 2: repression, 3: dual, i.e. both activation and repression depending on conditions)."""
+- (Node) `name`: the name of the operon (e.g. `crp`).
+- (Edge) `regulation_type`: the kind of regulation (1: activation, 2: repression, 3: dual, i.e. both activation and repression depending on conditions)."""
 tags = ['Biological', 'Gene regulation', 'Unweighted']
 url = 'http://www.weizmann.ac.il/mcb/UriAlon/e-coli-transcription-network'
 citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'https://doi.org/10.1038/ng881')]
[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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index ddfe831..28fbda3 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__init__.py
@@ -45,7 +45,6 @@ def fetch_upstream(force=False):
 @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:
[pipeline] Fix KONECT entity files, seekable upstream files and archive formats by Tiago de Paula Peixoto 2f6e19f
- konect.py: each ent.<net>.<entity>.<attr> file becomes a vertex
  property on the side of the entity it describes (per-vertex or per-edge
  files), instead of all of them being written from vertex 0 into `meta`
  (which put e.g. the item names of bibsonomy and reuters on the wrong
  nodes); only leading "%" lines are comments.
- open_upstream_file(..., seekable=True) returns a seekable file (via a
  temporary file) for readers that need one (openpyxl, scipy.io.loadmat,
  zipfile), replacing the per-entry BytesIO copies.
- .xz files can be read again; .xz, .rar and .7z downloads are stored as
  they are, and "x.tar.xz:", "x.rar:" and "x.7z:" member access works
  (with py7zr or the 7z command); caches in the previous layouts are still
  read.
- parsers.py: vprops_from_txt matches rows by name for graphs keyed by
  name; the Wikimedia dump readers (stub histories, SQL tables) are shared
  helpers; new read_doc (tables of Word documents via LibreOffice) and
  read_epanet (EPANET water network files) readers.
- The entries' workarounds are removed (all parse identically).
diff --git a/entries/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index 29a4594..ddfe831 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__init__.py
@@ -19,8 +19,17 @@
 from .. import *
 
 title = "E. coli transcription network (2002)"
-description = """Network of operons and their pairwise interactions, via transcription factor-based regulation, within the bacteria Escherichia coli[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+description = """The transcriptional regulation network of the bacterium *Escherichia coli*, compiled by S. S. Shen-Orr, R. Milo, S. Mangan and U. Alon to study network motifs. Nodes are operons (groups of genes transcribed together), and a directed edge connects a transcription factor to an operon whose transcription it regulates (a transcription factor is itself encoded by an operon, so it is represented by the corresponding node; self-loops represent autoregulation). The interactions were assembled from the RegulonDB database (version 3.2, excluding interactions of unknown type and interactions supported only by ChIP experiments), complemented by a literature search.
+
+There are two versions of the data:
+
+- `v1.0`: the original data set used in the publication;
+- `v1.1`: an updated version with 578 interactions, in which three errors were corrected (the misspelled operon moaABDE renamed to maoABDE; hycA merged into the autoregulated operon hycABCDE; and a missing interaction of ArcA added).
+
+The networks have the following properties:
+
+- Nodes: `name`, the name of the operon (e.g. `crp`).
+- Edges: `regulation_type`, the kind of regulation (1: activation, 2: repression, 3: dual, i.e. both activation and repression depending on conditions)."""
 tags = ['Biological', 'Gene regulation', 'Unweighted']
 url = 'http://www.weizmann.ac.il/mcb/UriAlon/e-coli-transcription-network'
 citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'https://doi.org/10.1038/ng881')]
@@ -44,6 +53,22 @@ def parse(alts=None):
         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)
+            fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
+
+            # columns: regulated operon, transcription factor, regulation type
+            def get_edges():
+                for line in fs[0]:
+                    vals = line.split()
+                    if len(vals) < 3:
+                        continue
+                    op, tf, rtype = [int(x) for x in vals[:3]]
+                    yield tf, op, rtype
+
+            g = Graph(directed=True)
+            g.ep.regulation_type = g.new_ep("int")
+            num = g.add_edge_list(get_edges(), hashed=True, hash_type="int",
+                                  eprops=[g.ep.regulation_type])
+
+            g.vp.name = num.copy("string")
+            vprops_from_txt(g, fs[1], pnames=["name"])
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index b1f1b68..29a4594 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index 8191bfb..b1f1b68 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index 8fe474e..8191bfb 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index eb0ef86..8fe474e 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index 4b5199f..eb0ef86 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__init__.py
@@ -23,7 +23,7 @@ description = """Network of operons and their pairwise interactions, via transcr
 [^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Gene regulation', 'Unweighted']
 url = 'http://www.weizmann.ac.il/mcb/UriAlon/e-coli-transcription-network'
-citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'http://www.nature.com/ng/journal/v31/n1/full/ng881.html')]
+citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'https://doi.org/10.1038/ng881')]
 icon_hash = '56a85c8e26855e083a2f78ee'
 upstream_prefix = 'https://www.weizmann.ac.il/mcb/UriAlon/sites/mcb.UriAlon/files/uploads/Network_motifs_in_coli'
 files = [(('colinet-1.0.zip:ColiNet-1.0/coliInterFullVec.txt', 'colinet-1.0.zip:ColiNet-1.0/coliInterFullNames.txt'), 'v1.0', ('loadtxt', {'pnames': ['regulation_type'], 'vprops': {'fmt': 'txt', 'names': ['name']}})), (('colinet-1.1.zip:ColiNet-1.1/coliInterFullVec.txt', 'colinet-1.1.zip:ColiNet-1.1/coliInterFullNames.txt'), 'v1.1', ('loadtxt', {'pnames': ['regulation_type'], 'vprops': {'fmt': 'txt', 'names': ['name']}}))]
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index b2e1dbe..4b5199f 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__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/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
index abc5279..b2e1dbe 100644
--- a/entries/ecoli_transcription/__init__.py
+++ b/entries/ecoli_transcription/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "E. coli transcription network (2002)"
-description = "Network of operons and their pairwise interactions, via transcription factor-based regulation, within the bacteria Escherichia coli"
+description = """Network of operons and their pairwise interactions, via transcription factor-based regulation, within the bacteria Escherichia coli[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Gene regulation', 'Unweighted']
 url = 'http://www.weizmann.ac.il/mcb/UriAlon/e-coli-transcription-network'
 citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'http://www.nature.com/ng/journal/v31/n1/full/ng881.html')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/ecoli_transcription/__init__.py b/entries/ecoli_transcription/__init__.py
new file mode 100644
index 0000000..abc5279
--- /dev/null
+++ b/entries/ecoli_transcription/__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 = "E. coli transcription network (2002)"
+description = "Network of operons and their pairwise interactions, via transcription factor-based regulation, within the bacteria Escherichia coli"
+tags = ['Biological', 'Gene regulation', 'Unweighted']
+url = 'http://www.weizmann.ac.il/mcb/UriAlon/e-coli-transcription-network'
+citation = [('Shen-Orr et. al, "Network motifs in the transcriptional regulation network of Escherichia coli." Nature Genetics 31, 64-68 (2002).', 'http://www.nature.com/ng/journal/v31/n1/full/ng881.html')]
+icon_hash = '56a85c8e26855e083a2f78ee'
+upstream_prefix = 'https://www.weizmann.ac.il/mcb/UriAlon/sites/mcb.UriAlon/files/uploads/Network_motifs_in_coli'
+files = [(('colinet-1.0.zip:ColiNet-1.0/coliInterFullVec.txt', 'colinet-1.0.zip:ColiNet-1.0/coliInterFullNames.txt'), 'v1.0', ('loadtxt', {'pnames': ['regulation_type'], 'vprops': {'fmt': 'txt', 'names': ['name']}})), (('colinet-1.1.zip:ColiNet-1.1/coliInterFullVec.txt', 'colinet-1.1.zip:ColiNet-1.1/coliInterFullNames.txt'), 'v1.1', ('loadtxt', {'pnames': ['regulation_type'], 'vprops': {'fmt': 'txt', 'names': ['name']}}))]
+
+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