History of drosophila_flybi
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/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
index 63c359a..0619bff 100644
--- a/entries/drosophila_flybi/__init__.py
+++ b/entries/drosophila_flybi/__init__.py
@@ -28,7 +28,7 @@ description = """Binary protein-protein interactions (PPIs) for Drosophila melan
tags = ['Biological', 'Protein interactions', 'Unweighted']
url = 'https://doi.org/10.1038/s41467-023-37876-0'
citation = [('Tang, HW., Spirohn, K., Hu, Y. et al. Next-generation large-scale binary protein interaction network for Drosophila melanogaster. Nat Commun 14, 2162 (2023)', 'https://doi.org/10.1038/s41467-023-37876-0')]
-icon_hash = None
+date_added = '2023-04-16'
upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
upstream_prefix = "https://static-content.springer.com/esm/art%3A10.1038%2Fs41467-023-37876-0/MediaObjects"
files = [('41467_2023_37876_MOESM8_ESM.xlsx', None, None)]
[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/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
index fbaec05..63c359a 100644
--- a/entries/drosophila_flybi/__init__.py
+++ b/entries/drosophila_flybi/__init__.py
@@ -16,7 +16,7 @@
# 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 openpyxl import load_workbook, styles
+from openpyxl import load_workbook
import shutil
import subprocess
import tempfile
@@ -41,7 +41,6 @@ def fetch_upstream(force=False):
@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:
@@ -52,7 +51,7 @@ def parse(alts=None):
with open(f"{tdir}/dump.xls", "wb") as fw:
shutil.copyfileobj(f, fw)
subprocess.run(["localc", "--convert-to", "xlsx",
- f"dump.xls"], cwd=tdir, check=True)
+ "dump.xls"], cwd=tdir, check=True)
wb = load_workbook(f"{tdir}/dump.xlsx")
g = Graph(directed=False)
[entries] Move unavailable upstream sources to verified alternatives 2137af6
The upstream sources of these entries are gone, moved, or refuse automated downloads; each now downloads the same data (byte-identical to the cached files, or for board_directors, identical apart from line endings) from: - add_health: the Wayback Machine (Moreno's site, as its sibling entries) - board_directors: T. Opsahl's site (opsahl.co.uk) - copenhagen, cow_signed_relations, fullerene_structures, german_power_grid: figshare's API (its downloader refuses the server) - drosophila_flybi: the same address, without a doubled slash - dutch_criticism: V. Batagelj's repository of Pajek data on GitHub - fly_larva: the copy of the supplementary files in Europe PMC - foursquare: the authors' Google Drive file - game_thrones, microsoft_concept, un_migrations: pinned Wayback Machine snapshots - internet_top_pop: the Topology Zoo repository on GitHub - scotus_majority: Harvard Dataverse and Wayback Machine snapshots
diff --git a/entries/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
index 4e9fc22..fbaec05 100644
--- a/entries/drosophila_flybi/__init__.py
+++ b/entries/drosophila_flybi/__init__.py
@@ -30,7 +30,7 @@ url = 'https://doi.org/10.1038/s41467-023-37876-0'
citation = [('Tang, HW., Spirohn, K., Hu, Y. et al. Next-generation large-scale binary protein interaction network for Drosophila melanogaster. Nat Commun 14, 2162 (2023)', 'https://doi.org/10.1038/s41467-023-37876-0')]
icon_hash = None
upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
-upstream_prefix = "https://static-content.springer.com/esm/art%3A10.1038%2Fs41467-023-37876-0/MediaObjects/"
+upstream_prefix = "https://static-content.springer.com/esm/art%3A10.1038%2Fs41467-023-37876-0/MediaObjects"
files = [('41467_2023_37876_MOESM8_ESM.xlsx', None, None)]
def fetch_upstream(force=False):
[entries] Fix parse bugs and improve descriptions and metadata 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents (directed), celegans_2019 (synapse direction), ecoli_transcription and yeast_transcription (regulator to target), bitcoin (direction, phantom node), ego_social (Google+ features and circles), scotus_majority, arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom, mist, reuters and bibsonomy (names on the right nodes), uci_zoo - every description now states explicitly what the nodes and edges represent; corrected titles, years, tags, citations and licences - the "Hypergraph" tag is removed; very large entries are marked `huge = True` (see --skip-huge) - ICON ids of partial duplicates added (hiv_transmission, congress_bills, openflights, dutch_school)
diff --git a/entries/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
index 6fe07b5..4e9fc22 100644
--- a/entries/drosophila_flybi/__init__.py
+++ b/entries/drosophila_flybi/__init__.py
@@ -24,7 +24,7 @@ import tempfile
from .. import *
title = "Fruit fly protein interactions (Drosophila melanogaster)"
-description = """Binary protein-protein interactions (PPIs) for Drosophila melanogaster, containing 8723 PPIs among 2939 proteins. The iteractions were identified using a yeast two-hybrid (Y2H) analysis."""
+description = """Binary protein-protein interactions (PPIs) for Drosophila melanogaster, containing 8723 PPIs among 2939 proteins. The interactions were identified using a yeast two-hybrid (Y2H) analysis. Nodes are proteins, and an undirected edge connects two proteins that were found to interact."""
tags = ['Biological', 'Protein interactions', 'Unweighted']
url = 'https://doi.org/10.1038/s41467-023-37876-0'
citation = [('Tang, HW., Spirohn, K., Hu, Y. et al. Next-generation large-scale binary protein interaction network for Drosophila melanogaster. Nat Commun 14, 2162 (2023)', 'https://doi.org/10.1038/s41467-023-37876-0')]
Update copyright information 73a4f0d
diff --git a/entries/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
index 4c5a783..6fe07b5 100644
--- a/entries/drosophila_flybi/__init__.py
+++ b/entries/drosophila_flybi/__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/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
index ed255db..4c5a783 100644
--- a/entries/drosophila_flybi/__init__.py
+++ b/entries/drosophila_flybi/__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
Add `drosophila_flybi` entry 997dbbf
diff --git a/entries/drosophila_flybi/__init__.py b/entries/drosophila_flybi/__init__.py
new file mode 100644
index 0000000..ed255db
--- /dev/null
+++ b/entries/drosophila_flybi/__init__.py
@@ -0,0 +1,89 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# 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
+# 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 openpyxl import load_workbook, styles
+import shutil
+import subprocess
+import tempfile
+
+from .. import *
+
+title = "Fruit fly protein interactions (Drosophila melanogaster)"
+description = """Binary protein-protein interactions (PPIs) for Drosophila melanogaster, containing 8723 PPIs among 2939 proteins. The iteractions were identified using a yeast two-hybrid (Y2H) analysis."""
+tags = ['Biological', 'Protein interactions', 'Unweighted']
+url = 'https://doi.org/10.1038/s41467-023-37876-0'
+citation = [('Tang, HW., Spirohn, K., Hu, Y. et al. Next-generation large-scale binary protein interaction network for Drosophila melanogaster. Nat Commun 14, 2162 (2023)', 'https://doi.org/10.1038/s41467-023-37876-0')]
+icon_hash = None
+upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
+upstream_prefix = "https://static-content.springer.com/esm/art%3A10.1038%2Fs41467-023-37876-0/MediaObjects/"
+files = [('41467_2023_37876_MOESM8_ESM.xlsx', None, 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):
+ global files
+ 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:
+ with tempfile.TemporaryDirectory(dir="./cache/temp", suffix="flybi") as tdir:
+ with open(f"{tdir}/dump.xls", "wb") as fw:
+ shutil.copyfileobj(f, fw)
+ subprocess.run(["localc", "--convert-to", "xlsx",
+ f"dump.xls"], cwd=tdir, check=True)
+ wb = load_workbook(f"{tdir}/dump.xlsx")
+
+ g = Graph(directed=False)
+
+ g.vp.code = g.new_vp("string")
+ g.vp.name = g.new_vp("string")
+
+ props = ["direction", "screens", "assays", "database", "reference",
+ "exp_direct", "exp_indirect", "comment"]
+ for p in props:
+ g.ep[p] = g.new_ep("string")
+
+ sheet = wb["FlyBi"]
+
+ vertices = {}
+ def get_vertex(code, name):
+ v = vertices.get(code, None)
+ if v is not None:
+ return v
+ v = g.add_vertex()
+ g.vp.code[v] = code
+ g.vp.name[v] = name
+ vertices[code] = v
+ return v
+
+ for i in range(2, 8725):
+ vals = [sheet.cell(i, j).value for j in range(1,13)]
+ u = get_vertex(vals[0], vals[1])
+ v = get_vertex(vals[2], vals[3])
+ e = g.add_edge(u, v)
+ for j, p in enumerate(props):
+ g.ep[p][e] = vals[j + 4]
+
+ yield alt, g