History of string_ppi
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 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/string_ppi/__init__.py b/entries/string_ppi/__init__.py
index 71bbd62..754f333 100644
--- a/entries/string_ppi/__init__.py
+++ b/entries/string_ppi/__init__.py
@@ -49,7 +49,7 @@ citation = [('D. Szklarczyk et al., "The STRING database in 2025: protein networ
('D. Szklarczyk et al., "The STRING database in 2023: protein-protein association networks and functional enrichment analyses for any sequenced genome of interest." Nucleic Acids Research 51, D638-D646 (2023)', 'https://doi.org/10.1093/nar/gkac1000'),
('D. Szklarczyk et al., "The STRING database in 2021: customizable protein-protein networks, and functional characterization of user-uploaded gene/measurement sets." Nucleic Acids Research 49, D605-D612 (2021)', 'https://doi.org/10.1093/nar/gkaa1074'),
('D. Szklarczyk et al., "STRING v11: protein-protein association networks with increased coverage, supporting functional discovery in genome-wide experimental datasets." Nucleic Acids Research 47, D607-D613 (2019)', 'https://doi.org/10.1093/nar/gky1131')]
-icon_hash = None
+date_added = '2026-10-27'
upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
upstream_prefix = 'https://stringdb-downloads.org/download'
_organisms = {"human": 9606, "mouse": 10090, "yeast": 4932, "ecoli": 511145,
[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/string_ppi/__init__.py b/entries/string_ppi/__init__.py
index 41f6ea9..71bbd62 100644
--- a/entries/string_ppi/__init__.py
+++ b/entries/string_ppi/__init__.py
@@ -37,12 +37,12 @@ The entry also contains the networks of the same organisms in the earlier versio
The networks have the following properties:
-- `string_id`: the STRING identifier of the protein (the NCBI taxonomy identifier of the organism followed by the protein's identifier, e.g. `9606.ENSP00000000233`).
-- `name`: the preferred name of the protein (e.g. `ARF5`).
-- `size`: the length of the protein, in amino acids.
-- `annotation`: a description of the protein.
-- `combined_score` (edges): the combined confidence score of the association, multiplied by 1000 (from 150 to 999).
-- `neighborhood`, `fusion`, `cooccurence`, `coexpression`, `experimental`, `database`, `textmining` (edges): the scores of the individual channels, multiplied by 1000 (0 if there is no evidence of that kind)."""
+- (Node) `string_id`: the STRING identifier of the protein (the NCBI taxonomy identifier of the organism followed by the protein's identifier, e.g. `9606.ENSP00000000233`).
+- (Node) `name`: the preferred name of the protein (e.g. `ARF5`).
+- (Node) `size`: the length of the protein, in amino acids.
+- (Node) `annotation`: a description of the protein.
+- (Edge) `combined_score`: the combined confidence score of the association, multiplied by 1000 (from 150 to 999).
+- (Edge) `neighborhood`, `fusion`, `cooccurence`, `coexpression`, `experimental`, `database`, `textmining`: the scores of the individual channels, multiplied by 1000 (0 if there is no evidence of that kind)."""
tags = ['Biological', 'Protein interactions', 'Weighted', 'Metadata']
url = 'https://string-db.org/cgi/download'
citation = [('D. Szklarczyk et al., "The STRING database in 2025: protein networks with directionality of regulation." Nucleic Acids Research 53, D730-D737 (2025)', 'https://doi.org/10.1093/nar/gkae1113'),
[entries] New entry: string_ppi 5045cc1
diff --git a/entries/string_ppi/__init__.py b/entries/string_ppi/__init__.py
new file mode 100644
index 0000000..41f6ea9
--- /dev/null
+++ b/entries/string_ppi/__init__.py
@@ -0,0 +1,119 @@
+#! /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
+import pyarrow as pa
+import pyarrow.csv
+import pyarrow.compute as pc
+
+title = "STRING protein association networks (2025)"
+description = r"""Networks of functional associations between the proteins of seven model organisms, from the STRING database, version 12.5. Nodes are proteins, and an undirected edge indicates a functional association between two proteins, i.e. that they contribute jointly to a biological function, which does not necessarily mean that they physically bind each other. STRING combines evidence from several channels: physical interactions from experiments, curated pathway and complex databases, co-expression, conserved genomic neighborhood, gene fusions, phylogenetic co-occurrence, and co-mention in the scientific literature (text mining), including evidence transferred from other organisms by orthology. Each channel gives a confidence score, and the channels are combined into an overall confidence score.
+
+The organisms are human (*Homo sapiens*, `human`), mouse (*Mus musculus*, `mouse`), baker's yeast (*Saccharomyces cerevisiae*, `yeast`), the bacterium *Escherichia coli* K-12 MG1655 (`ecoli`), the fruit fly (*Drosophila melanogaster*, `fly`), the nematode *Caenorhabditis elegans* (`worm`) and the thale cress (*Arabidopsis thaliana*, `arabidopsis`). For each organism there are two networks:
+
+- `<organism>_all`: all the associations in STRING, of any score (the lowest score in STRING is 0.15).
+- `<organism>_min400`: only the associations with a combined score of at least 0.4, STRING's default threshold ("medium confidence").
+
+All networks of an organism have the same nodes, all the proteins of the organism in STRING (proteins without associations are isolated nodes). STRING is available for over 12,000 organisms; only these seven are included here.
+
+The entry also contains the networks of the same organisms in the earlier versions 11.0 (2019), 11.5 (2021) and 12.0 (2023) of STRING, named `<organism>_v<version>_all` and `<organism>_v<version>_min400` (e.g. `human_v11.0_all`), built in the same way; the networks without a version in their names are those of version 12.5. The sets of proteins and the scores differ between versions. Versions before 11.0 are not included.
+
+The networks have the following properties:
+
+- `string_id`: the STRING identifier of the protein (the NCBI taxonomy identifier of the organism followed by the protein's identifier, e.g. `9606.ENSP00000000233`).
+- `name`: the preferred name of the protein (e.g. `ARF5`).
+- `size`: the length of the protein, in amino acids.
+- `annotation`: a description of the protein.
+- `combined_score` (edges): the combined confidence score of the association, multiplied by 1000 (from 150 to 999).
+- `neighborhood`, `fusion`, `cooccurence`, `coexpression`, `experimental`, `database`, `textmining` (edges): the scores of the individual channels, multiplied by 1000 (0 if there is no evidence of that kind)."""
+tags = ['Biological', 'Protein interactions', 'Weighted', 'Metadata']
+url = 'https://string-db.org/cgi/download'
+citation = [('D. Szklarczyk et al., "The STRING database in 2025: protein networks with directionality of regulation." Nucleic Acids Research 53, D730-D737 (2025)', 'https://doi.org/10.1093/nar/gkae1113'),
+ ('D. Szklarczyk et al., "The STRING database in 2023: protein-protein association networks and functional enrichment analyses for any sequenced genome of interest." Nucleic Acids Research 51, D638-D646 (2023)', 'https://doi.org/10.1093/nar/gkac1000'),
+ ('D. Szklarczyk et al., "The STRING database in 2021: customizable protein-protein networks, and functional characterization of user-uploaded gene/measurement sets." Nucleic Acids Research 49, D605-D612 (2021)', 'https://doi.org/10.1093/nar/gkaa1074'),
+ ('D. Szklarczyk et al., "STRING v11: protein-protein association networks with increased coverage, supporting functional discovery in genome-wide experimental datasets." Nucleic Acids Research 47, D607-D613 (2019)', 'https://doi.org/10.1093/nar/gky1131')]
+icon_hash = None
+upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
+upstream_prefix = 'https://stringdb-downloads.org/download'
+_organisms = {"human": 9606, "mouse": 10090, "yeast": 4932, "ecoli": 511145,
+ "fly": 7227, "worm": 6239, "arabidopsis": 3702}
+def _files(org, t, v):
+ return (f"protein.links.detailed.v{v}/{t}.protein.links.detailed.v{v}.txt.gz",
+ f"protein.info.v{v}/{t}.protein.info.v{v}.txt.gz")
+files = [(_files(org, t, "12.5"), f"{org}_{thres}", None)
+ for org, t in _organisms.items() for thres in ["all", "min400"]]
+# earlier versions
+files += [(_files(org, t, v), f"{org}_v{v}_{thres}", None)
+ for v in ["11.0", "11.5", "12.0"]
+ for org, t in _organisms.items() for thres in ["all", "min400"]]
+
+# minimum combined score of the associations
+min_score = {"all": 0, "min400": 400}
+
+channels = ["neighborhood", "fusion", "cooccurence", "coexpression",
+ "experimental", "database", "textmining", "combined_score"]
+
+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 (flinks, finfo), alt, fmt in files:
+ if alts is not None and alt not in alts:
+ continue
+ with open_upstream_file(name, finfo, "rb") as f:
+ info = pd.read_csv(f, sep="\t", dtype=str, keep_default_na=False,
+ quoting=3)
+ info = info.rename(columns={"#string_protein_id": "string_protein_id",
+ "protein_external_id": "string_protein_id"}) # v11.0
+ g = Graph(directed=False)
+ g.add_vertex(len(info))
+ g.vp.string_id = g.new_vp("string", vals=info["string_protein_id"].tolist())
+ g.vp.name = g.new_vp("string", vals=info["preferred_name"].tolist())
+ g.vp.size = g.new_vp("int", vals=info["protein_size"].astype(int).to_numpy())
+ g.vp.annotation = g.new_vp("string", vals=info["annotation"].tolist())
+ ids = pa.array(info["string_protein_id"].to_numpy())
+ del info
+
+ with open_upstream_file(name, flinks, "rb") as f:
+ t = pa.csv.read_csv(f, parse_options=pa.csv.ParseOptions(delimiter=" "),
+ convert_options=pa.csv.ConvertOptions(
+ column_types={c: pa.int16() for c in channels}))
+ # each association is listed in both directions
+ mask = pc.and_(pc.less(t["protein1"], t["protein2"]),
+ pc.greater_equal(t["combined_score"],
+ min_score[alt.split("_")[-1]]))
+ nboth = len(t)
+ t = t.filter(mask)
+ assert 2 * len(t) == nboth or alt.endswith("min400")
+ s = pc.index_in(t["protein1"], value_set=ids)
+ u = pc.index_in(t["protein2"], value_set=ids)
+ assert s.null_count == 0 and u.null_count == 0
+ s = s.to_numpy(zero_copy_only=False)
+ u = u.to_numpy(zero_copy_only=False)
+ g.add_edge_list(np.column_stack((s, u)).astype("int64"))
+ for c in channels:
+ g.ep[c] = g.new_ep("int16_t", vals=t[c].to_numpy())
+ del t
+ yield alt, g