History of interactome_pdz
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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 5b9bdf2..9c65d40 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -19,7 +19,7 @@
from .. import *
title = "PDZ-domain interactome (2005)"
-description = """A network of protein–protein interactions mediated by PDZ domains, from PDZBase, a manually curated database of PDZ-domain-mediated interactions extracted from the literature (about 300 interactions from over 200 articles at the time of publication). The data were obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine), which distributed a version of PDZBase in its SIG flat file format; PDZBase itself is no longer online. Nodes are proteins, identified by their gene symbols, and an edge represents a binding interaction between a PDZ-domain-containing protein and its partner. All interactions are of type "Binding" with neutral effect. Self-loops denote proteins that bind to themselves.
+description = """A network of protein–protein interactions mediated by PDZ domains, from PDZBase, a manually curated database of PDZ-domain-mediated interactions extracted from the literature (about 300 interactions from over 200 articles at the time of publication). The data are a version of PDZBase obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine). Nodes are proteins, identified by their gene symbols, and an edge represents a binding interaction between a PDZ-domain-containing protein and its partner. All interactions are of type "Binding" with neutral effect. Self-loops denote proteins that bind to 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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 5a6e045..5b9bdf2 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -31,7 +31,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 = [('T. Beuming, L. Skrabanek, M. Y. Niv, P. Mukherjee, H. Weinstein, "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21(6), 827-828 (2005)', 'https://doi.org/10.1093/bioinformatics/bti098')]
-icon_hash = '581760ba8cf714f319c3e77b'
+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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 144c109..5a6e045 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -23,8 +23,11 @@ description = """A network of protein–protein interactions mediated by PDZ dom
The network has the following properties:
-- Nodes: `name`, the gene symbol; `uniprot_human` and `uniprot_mouse`, the Swiss-Prot/UniProt accessions of the human and mouse proteins (empty if not available); `type`, the molecule types assigned to the protein (e.g. Adapter, Kinase, Receptor, Channel); `location`, its cellular localizations (Cytosol, Membrane, Extracellular, Vesicles). A few proteins are assigned different types or locations in different interactions, hence the last two are lists.
-- Edges: `pubmed`, the PubMed ID of the article reporting the interaction."""
+- (Node) `name`: the gene symbol.
+- (Node) `uniprot_human` and `uniprot_mouse`: the Swiss-Prot/UniProt accessions of the human and mouse proteins (empty if not available).
+- (Node) `type`: the molecule types assigned to the protein (e.g. Adapter, Kinase, Receptor, Channel).
+- (Node) `location`: its cellular localizations (Cytosol, Membrane, Extracellular, Vesicles). A few proteins are assigned different types or locations in different interactions, hence the last two are lists.
+- (Edge) `pubmed`: the PubMed ID of the article reporting the interaction."""
tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
citation = [('T. Beuming, L. Skrabanek, M. Y. Niv, P. Mukherjee, H. Weinstein, "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21(6), 827-828 (2005)', 'https://doi.org/10.1093/bioinformatics/bti098')]
[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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index e037fad..144c109 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -54,7 +54,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] Use American spelling in the descriptions 802d564
British spellings in the titles and descriptions of 69 entries (e.g. labelled, organisation, millimetres, centres, anonymised, neighbours, analysed, modelled, colour, licence) are replaced by the American ones. Proper names keep their spelling (Otago Harbour, the Centre for Water Systems, the Centre jeunesse de Montréal, the Dutch Ministry of Defence), as do quoted upstream terms, citations, and property names.
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 87d181c..e037fad 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -23,7 +23,7 @@ description = """A network of protein–protein interactions mediated by PDZ dom
The network has the following properties:
-- Nodes: `name`, the gene symbol; `uniprot_human` and `uniprot_mouse`, the Swiss-Prot/UniProt accessions of the human and mouse proteins (empty if not available); `type`, the molecule types assigned to the protein (e.g. Adapter, Kinase, Receptor, Channel); `location`, its cellular localisations (Cytosol, Membrane, Extracellular, Vesicles). A few proteins are assigned different types or locations in different interactions, hence the last two are lists.
+- Nodes: `name`, the gene symbol; `uniprot_human` and `uniprot_mouse`, the Swiss-Prot/UniProt accessions of the human and mouse proteins (empty if not available); `type`, the molecule types assigned to the protein (e.g. Adapter, Kinase, Receptor, Channel); `location`, its cellular localizations (Cytosol, Membrane, Extracellular, Vesicles). A few proteins are assigned different types or locations in different interactions, hence the last two are lists.
- Edges: `pubmed`, the PubMed ID of the article reporting the interaction."""
tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
[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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index ad874df..87d181c 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -19,31 +19,78 @@
from .. import *
title = "PDZ-domain interactome (2005)"
-description = """A network of PDZ-domain-mediated protein–protein binding interactions, extracted from the PDZBase database. Nodes represent proteins and an edge represents a binding interaction between two proteins.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Biological', 'Protein interactions', 'Unweighted']
-url = 'http://konect.cc/networks/maayan-pdzbase'
-citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'https://doi.org/10.1093/bioinformatics/bti098')]
+description = """A network of protein–protein interactions mediated by PDZ domains, from PDZBase, a manually curated database of PDZ-domain-mediated interactions extracted from the literature (about 300 interactions from over 200 articles at the time of publication). The data were obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine), which distributed a version of PDZBase in its SIG flat file format; PDZBase itself is no longer online. Nodes are proteins, identified by their gene symbols, and an edge represents a binding interaction between a PDZ-domain-containing protein and its partner. All interactions are of type "Binding" with neutral effect. Self-loops denote proteins that bind to themselves.
+
+The network has the following properties:
+
+- Nodes: `name`, the gene symbol; `uniprot_human` and `uniprot_mouse`, the Swiss-Prot/UniProt accessions of the human and mouse proteins (empty if not available); `type`, the molecule types assigned to the protein (e.g. Adapter, Kinase, Receptor, Channel); `location`, its cellular localisations (Cytosol, Membrane, Extracellular, Vesicles). A few proteins are assigned different types or locations in different interactions, hence the last two are lists.
+- Edges: `pubmed`, the PubMed ID of the article reporting the interaction."""
+tags = ['Biological', 'Protein interactions', 'Unweighted', 'Metadata']
+url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
+citation = [('T. Beuming, L. Skrabanek, M. Y. Niv, P. Mukherjee, H. Weinstein, "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21(6), 827-828 (2005)', 'https://doi.org/10.1093/bioinformatics/bti098')]
icon_hash = '581760ba8cf714f319c3e77b'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.maayan-pdzbase.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/20150912005140id_/http://research.mssm.edu:80/maayan/datasets'
+files = [('pdzbase.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=False)
+ vs = {}
+ attrs = 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)
+ acc, types, locs = attrs[v]
+ for j in (0, 1):
+ if row[i + 1 + j] is not None:
+ acc[j] = row[i + 1 + j]
+ if row[i + 3] is not None and row[i + 3] not in types:
+ types.append(row[i + 3])
+ if row[i + 4] is not None and row[i + 4] not in locs:
+ locs.append(row[i + 4])
+ edges.append(ends + [int(row[12])])
+ 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")
+ g.vp.type = g.new_vp("vector<string>")
+ g.vp.location = g.new_vp("vector<string>")
+ for k, v in vs.items():
+ g.vp.name[v] = k
+ acc, types, locs = attrs[v]
+ g.vp.uniprot_human[v] = acc[0] or ""
+ g.vp.uniprot_mouse[v] = acc[1] or ""
+ g.vp.type[v] = types
+ g.vp.location[v] = locs
+ g.ep.pubmed = g.new_ep("int")
+ g.add_edge_list(edges, eprops=[g.ep.pubmed])
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index af3c201..ad874df 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 9fb5dea..af3c201 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index b2070e8..9fb5dea 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 23d2a51..b2070e8 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__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_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 263c14a..23d2a51 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/maayan-pdzbase'
citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'https://doi.org/10.1093/bioinformatics/bti098')]
icon_hash = '581760ba8cf714f319c3e77b'
upstream_prefix = 'http://konect.cc/files'
-orphan = True
files = [('download.tsv.maayan-pdzbase.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Update citations to use DOIs e878874
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 9468af0..263c14a 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -23,7 +23,7 @@ description = """A network of PDZ-domain-mediated protein–protein binding inte
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Protein interactions', 'Unweighted']
url = 'http://konect.cc/networks/maayan-pdzbase'
-citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'http://bioinformatics.oxfordjournals.org/content/21/6/827.short')]
+citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'https://doi.org/10.1093/bioinformatics/bti098')]
icon_hash = '581760ba8cf714f319c3e77b'
upstream_prefix = 'http://konect.cc/files'
orphan = True
Add support for 'orphan' datasets and tag konect entries e330b80
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 4c4aa13..9468af0 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/maayan-pdzbase'
citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'http://bioinformatics.oxfordjournals.org/content/21/6/827.short')]
icon_hash = '581760ba8cf714f319c3e77b'
upstream_prefix = 'http://konect.cc/files'
+orphan = True
files = [('download.tsv.maayan-pdzbase.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index 0dfea3a..4c4aa13 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__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 1645314
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
index a87e95d..0dfea3a 100644
--- a/entries/interactome_pdz/__init__.py
+++ b/entries/interactome_pdz/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "PDZ-domain interactome (2005)"
-description = "A network of PDZ-domain-mediated protein–protein binding interactions, extracted from the PDZBase database. Nodes represent proteins and an edge represents a binding interaction between two proteins."
+description = """A network of PDZ-domain-mediated protein–protein binding interactions, extracted from the PDZBase database. Nodes represent proteins and an edge represents a binding interaction between two proteins.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Protein interactions', 'Unweighted']
url = 'http://konect.cc/networks/maayan-pdzbase'
citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'http://bioinformatics.oxfordjournals.org/content/21/6/827.short')]
Initial commit cc85872
diff --git a/entries/interactome_pdz/__init__.py b/entries/interactome_pdz/__init__.py
new file mode 100644
index 0000000..a87e95d
--- /dev/null
+++ b/entries/interactome_pdz/__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 = "PDZ-domain interactome (2005)"
+description = "A network of PDZ-domain-mediated protein–protein binding interactions, extracted from the PDZBase database. Nodes represent proteins and an edge represents a binding interaction between two proteins."
+tags = ['Biological', 'Protein interactions', 'Unweighted']
+url = 'http://konect.cc/networks/maayan-pdzbase'
+citation = [('T. Beuming et al. "PDZBase: a protein–protein interaction database for PDZ-domains." Bioinformatics 21.6, 827-828. (2005).', 'http://bioinformatics.oxfordjournals.org/content/21/6/827.short')]
+icon_hash = '581760ba8cf714f319c3e77b'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.maayan-pdzbase.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