logo Netzschleuder network catalog, repository, and centrifuge

History of collectri

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/collectri/__init__.py b/entries/collectri/__init__.py
index d12874f..c2e2cfc 100644
--- a/entries/collectri/__init__.py
+++ b/entries/collectri/__init__.py
@@ -41,7 +41,7 @@ The networks have the following properties:
 tags = ['Biological', 'Gene regulation', 'Signed', 'Unweighted', 'Metadata']
 url = ['https://github.com/saezlab/CollecTRI', 'https://doi.org/10.5281/zenodo.8192729']
 citation = [('S. Müller-Dott, E. Tsirvouli, M. Vazquez, R. O. Ramirez Flores, P. Badia-i-Mompel, R. Fallegger, D. Türei, A. Lægreid, J. Saez-Rodriguez, "Expanding the coverage of regulons from high-confidence prior knowledge for accurate estimation of transcription factor activities." Nucleic Acids Research 51, 10934-10949 (2023)', 'https://doi.org/10.1093/nar/gkad841')]
-icon_hash = None
+date_added = '2026-10-27'
 upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
 # Zenodo record 8192729 (version 2.0)
 upstream_prefix = 'https://zenodo.org/api/records/8192729/files'
[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/collectri/__init__.py b/entries/collectri/__init__.py
index ef94de2..d12874f 100644
--- a/entries/collectri/__init__.py
+++ b/entries/collectri/__init__.py
@@ -32,12 +32,12 @@ Self-loops are autoregulation. The regulons for mouse and rat distributed with t
 
 The networks have the following properties:
 
-- `name`: the gene symbol of the gene (e.g. `MYC`).
-- `sign` (edges, `regulons` only): the mode of regulation, +1 for activation and -1 for repression.
-- `sign_decision` (edges, `regulons` only): how the sign was decided (`PMID`: from the literature evidence in the resources; `regulon`: from the role of the TF; `default activation`).
-- `resources` (edges): the resources in which the interaction is found, separated by `;`.
-- `references` (edges, `regulons` only): the PubMed identifiers of the publications supporting the interaction, separated by `;`.
-- `extri_confidence` (edges, `source` only): the confidence of the text-mined interaction in ExTRI (`High` or `Low`); empty if not in ExTRI."""
+- (Node) `name`: the gene symbol of the gene (e.g. `MYC`).
+- (Edge) `sign` (edges, `regulons` only): the mode of regulation, +1 for activation and -1 for repression.
+- (Edge) `sign_decision` (edges, `regulons` only): how the sign was decided (`PMID`: from the literature evidence in the resources; `regulon`: from the role of the TF; `default activation`).
+- (Edge) `resources` (edges): the resources in which the interaction is found, separated by `;`.
+- (Edge) `references` (edges, `regulons` only): the PubMed identifiers of the publications supporting the interaction, separated by `;`.
+- (Edge) `extri_confidence` (edges, `source` only): the confidence of the text-mined interaction in ExTRI (`High` or `Low`); empty if not in ExTRI."""
 tags = ['Biological', 'Gene regulation', 'Signed', 'Unweighted', 'Metadata']
 url = ['https://github.com/saezlab/CollecTRI', 'https://doi.org/10.5281/zenodo.8192729']
 citation = [('S. Müller-Dott, E. Tsirvouli, M. Vazquez, R. O. Ramirez Flores, P. Badia-i-Mompel, R. Fallegger, D. Türei, A. Lægreid, J. Saez-Rodriguez, "Expanding the coverage of regulons from high-confidence prior knowledge for accurate estimation of transcription factor activities." Nucleic Acids Research 51, 10934-10949 (2023)', 'https://doi.org/10.1093/nar/gkad841')]
[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/collectri/__init__.py b/entries/collectri/__init__.py
index 0029c50..ef94de2 100644
--- a/entries/collectri/__init__.py
+++ b/entries/collectri/__init__.py
@@ -72,7 +72,6 @@ def parse(alts=None):
                 tgt = "Target Gene (Associated Gene Name)"
         g = Graph()
         vs = {}
-        ids = []
         for x in pd.concat([d[src], d[tgt]]):
             if x not in vs:
                 vs[x] = len(vs)
[entries] New entry: collectri by Tiago de Paula Peixoto 7d7042d
diff --git a/entries/collectri/__init__.py b/entries/collectri/__init__.py
new file mode 100644
index 0000000..0029c50
--- /dev/null
+++ b/entries/collectri/__init__.py
@@ -0,0 +1,96 @@
+#! /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 *
+import numpy as np
+import pandas as pd
+
+title = "CollecTRI human transcriptional regulation (2023)"
+description = r"""The human gene regulatory network of CollecTRI ("Collection of Transcriptional Regulatory Interactions"), compiled by Müller-Dott et al. from twelve resources of transcription factor (TF) to target gene interactions: the text-mining resource ExTRI, the curated databases HTRI, TRRUST, TFactS, GOA, IntAct, SIGNOR, CytReg and GEREDB, the curations of NTNU and of Pavlidis et al. (2021), and the highest-confidence interactions of DoRothEA. Nodes are genes (identified by their gene symbols), and a directed edge $(i, j)$ indicates that the transcription factor $i$ regulates the expression of gene $j$.
+
+There are two networks:
+
+- `regulons`: the authors' signed regulons (43,175 interactions), in which each interaction is an activation or a repression. The sign was taken from the resources when available, otherwise from the TF's known role as activator or repressor, and otherwise set to activation by default. Two sources (`AP1` and `NFKB`) are protein complexes rather than single TFs.
+- `source`: all TF-target pairs of the integrated resources (48,681 pairs), from the authors' source table, before the filtering and the assignment of signs.
+
+Self-loops are autoregulation. The regulons for mouse and rat distributed with the tools of the authors are translated from the human ones by orthology, and are not included here.
+
+The networks have the following properties:
+
+- `name`: the gene symbol of the gene (e.g. `MYC`).
+- `sign` (edges, `regulons` only): the mode of regulation, +1 for activation and -1 for repression.
+- `sign_decision` (edges, `regulons` only): how the sign was decided (`PMID`: from the literature evidence in the resources; `regulon`: from the role of the TF; `default activation`).
+- `resources` (edges): the resources in which the interaction is found, separated by `;`.
+- `references` (edges, `regulons` only): the PubMed identifiers of the publications supporting the interaction, separated by `;`.
+- `extri_confidence` (edges, `source` only): the confidence of the text-mined interaction in ExTRI (`High` or `Low`); empty if not in ExTRI."""
+tags = ['Biological', 'Gene regulation', 'Signed', 'Unweighted', 'Metadata']
+url = ['https://github.com/saezlab/CollecTRI', 'https://doi.org/10.5281/zenodo.8192729']
+citation = [('S. Müller-Dott, E. Tsirvouli, M. Vazquez, R. O. Ramirez Flores, P. Badia-i-Mompel, R. Fallegger, D. Türei, A. Lægreid, J. Saez-Rodriguez, "Expanding the coverage of regulons from high-confidence prior knowledge for accurate estimation of transcription factor activities." Nucleic Acids Research 51, 10934-10949 (2023)', 'https://doi.org/10.1093/nar/gkad841')]
+icon_hash = None
+upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
+# Zenodo record 8192729 (version 2.0)
+upstream_prefix = 'https://zenodo.org/api/records/8192729/files'
+files = [("CollecTRI_regulons.csv/content", "regulons", None),
+         ("CollecTRI_source.tsv/content", "source", None)]
+
+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):
+    name = __name__.split(".")[-1]
+    for fname, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        with open_upstream_file(name, fname, "rb") as f:
+            if alt == "regulons":
+                d = pd.read_csv(f, dtype=str, keep_default_na=False)
+                src, tgt = "source", "target"
+            else:
+                # the first line is a comment of the authors' workflow
+                d = pd.read_csv(f, sep="\t", skiprows=1, dtype=str,
+                                keep_default_na=False)
+                src = "Transcription Factor (Associated Gene Name)"
+                tgt = "Target Gene (Associated Gene Name)"
+        g = Graph()
+        vs = {}
+        ids = []
+        for x in pd.concat([d[src], d[tgt]]):
+            if x not in vs:
+                vs[x] = len(vs)
+        g.add_vertex(len(vs))
+        g.vp.name = g.new_vp("string", vals=list(vs))
+        g.add_edge_list(np.column_stack((d[src].map(vs).to_numpy(),
+                                         d[tgt].map(vs).to_numpy())))
+        if alt == "regulons":
+            g.ep.sign = g.new_ep("int", vals=d["weight"].astype(float).astype(int).to_numpy())
+            g.ep.sign_decision = g.new_ep("string", vals=d["sign_decision"].tolist())
+            res = d["resources"].str.split(";").map(
+                lambda l: ";".join(x.removesuffix("_CollecTRI") for x in l if x != "CollecTRI"))
+            g.ep.resources = g.new_ep("string", vals=res.tolist())
+            refs = d["references"].str.replace("CollecTRI:", "")
+            g.ep.references = g.new_ep("string", vals=refs.tolist())
+        else:
+            pres = [c for c in d.columns if c.endswith(" present")]
+            res = d[pres].apply(lambda r: ";".join(x for x in r if x), axis=1)
+            g.ep.resources = g.new_ep("string", vals=res.tolist())
+            g.ep.extri_confidence = g.new_ep("string", vals=d["[ExTRI] Confidence"].tolist())
+        yield alt, g