logo Netzschleuder network catalog, repository, and centrifuge

History of cintestinalis

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/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index ee1716c..a4cab76 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__init__.py
@@ -28,7 +28,7 @@ description = """Entire connectivity matrix for the complete brain of a larva of
 tags = ['Biological', 'Connectome', 'Weighted']
 url = 'https://elifesciences.org/articles/16962#fig16'
 citation = [('K. Ryan, Z. Lu, & I. A. Meinertzhagen, "The CNS connectome of a tadpole larva of Ciona intestinalis (L.) highlights sidedness in the brain of a chordate sibling." eLife 5, e16962 (2016)', 'https://doi.org/10.7554/eLife.16962.001')]
-icon_hash = '5b7b8a77dfd5c2fc3b09202d'
+date_added = '2021-06-22'
 upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
 upstream_prefix = "https://elifesciences.org/download/aHR0cHM6Ly9jZG4uZWxpZmVzY2llbmNlcy5vcmcvYXJ0aWNsZXMvMTY5NjIvZWxpZmUtMTY5NjItZmlnMTYtZGF0YTEtdjEueGxzeA--"
 files = [('elife-16962-fig16-data1-v1.xlsx?_hash=ltleHMu0Mu0ujKuGWUeIsAsFtqARmr7badHc8RYWqcA%3D', None, None)]
[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/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index d5dee91..ee1716c 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__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=True)
@@ -63,7 +62,6 @@ def parse(alts=None):
 
         sheet = wb["Sheet1"]
 
-        colors = styles.colors.COLOR_INDEX
 
         for i in range(2, 207):
             v = g.add_vertex()
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index 435000e..d5dee91 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__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/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index 1f801b7..435000e 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__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/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index 4229b46..1f801b7 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__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/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index 5cf838f..4229b46 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__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
cintestinalis: fix license by Tiago de Paula Peixoto fc6c360
diff --git a/entries/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
index 6f2796d..5cf838f 100644
--- a/entries/cintestinalis/__init__.py
+++ b/entries/cintestinalis/__init__.py
@@ -29,7 +29,7 @@ tags = ['Biological', 'Connectome', 'Weighted']
 url = 'https://elifesciences.org/articles/16962#fig16'
 citation = [('K. Ryan, Z. Lu, & I. A. Meinertzhagen, "The CNS connectome of a tadpole larva of Ciona intestinalis (L.) highlights sidedness in the brain of a chordate sibling." eLife 5, e16962 (2016)', 'https://doi.org/10.7554/eLife.16962.001')]
 icon_hash = '5b7b8a77dfd5c2fc3b09202d'
-ustream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
+upstream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
 upstream_prefix = "https://elifesciences.org/download/aHR0cHM6Ly9jZG4uZWxpZmVzY2llbmNlcy5vcmcvYXJ0aWNsZXMvMTY5NjIvZWxpZmUtMTY5NjItZmlnMTYtZGF0YTEtdjEueGxzeA--"
 files = [('elife-16962-fig16-data1-v1.xlsx?_hash=ltleHMu0Mu0ujKuGWUeIsAsFtqARmr7badHc8RYWqcA%3D', None, None)]
 
Add cintestinalis entry by Tiago de Paula Peixoto 3211273
This fixes issue #5
diff --git a/entries/cintestinalis/__init__.py b/entries/cintestinalis/__init__.py
new file mode 100644
index 0000000..6f2796d
--- /dev/null
+++ b/entries/cintestinalis/__init__.py
@@ -0,0 +1,80 @@
+#! /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 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 = "Tadpole larva brain (C. intestinalis)"
+description = """Entire connectivity matrix for the complete brain of a larva of Ciona intestinalis. Each directed edge represents a synaptic connection from pre-synaptic cell i to post-synaptic cell j (may not be a neuron). Edge weights represent the cumulative depth of presynaptic contacts in µm."""
+tags = ['Biological', 'Connectome', 'Weighted']
+url = 'https://elifesciences.org/articles/16962#fig16'
+citation = [('K. Ryan, Z. Lu, & I. A. Meinertzhagen, "The CNS connectome of a tadpole larva of Ciona intestinalis (L.) highlights sidedness in the brain of a chordate sibling." eLife 5, e16962 (2016)', 'https://doi.org/10.7554/eLife.16962.001')]
+icon_hash = '5b7b8a77dfd5c2fc3b09202d'
+ustream_license = ("CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/")
+upstream_prefix = "https://elifesciences.org/download/aHR0cHM6Ly9jZG4uZWxpZmVzY2llbmNlcy5vcmcvYXJ0aWNsZXMvMTY5NjIvZWxpZmUtMTY5NjItZmlnMTYtZGF0YTEtdjEueGxzeA--"
+files = [('elife-16962-fig16-data1-v1.xlsx?_hash=ltleHMu0Mu0ujKuGWUeIsAsFtqARmr7badHc8RYWqcA%3D', 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="cintestinalis") 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=True)
+
+        g.vp.name = g.new_vp("string")
+        g.vp.color = g.new_vp("string")
+        g.ep.depth = g.new_ep("double")
+
+        sheet = wb["Sheet1"]
+
+        colors = styles.colors.COLOR_INDEX
+
+        for i in range(2, 207):
+            v = g.add_vertex()
+            cell = sheet.cell(1, i)
+            g.vp.name[v] = sheet.cell(1, i).value
+            g.vp.color[v] = cell.fill.start_color.index
+
+        for i in range(2, 207):
+            for j in range(2, 207):
+                val = sheet.cell(i, j).value
+                if val is not None:
+                    e = g.add_edge(i-2, j-2)
+                    g.ep.depth[e] = val
+        yield alt, g