History of celegans_kaiser
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/celegans_kaiser/__init__.py b/entries/celegans_kaiser/__init__.py
index 0a7f233..e6fb5a1 100644
--- a/entries/celegans_kaiser/__init__.py
+++ b/entries/celegans_kaiser/__init__.py
@@ -34,7 +34,7 @@ citation = [('M. Kaiser, C. C. Hilgetag, "Nonoptimal component placement, but sh
('Y. Choe, B. H. McCormick, W. Koh, "Network connectivity analysis on the temporally augmented C. elegans web: A pilot study." Society for Neuroscience Abstracts 30, 921.9 (2004)', 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'),
('T. B. Achacoso, W. S. Yamamoto, "AY\'s Neuroanatomy of C. elegans for Computation." CRC Press, Boca Raton (1992)', 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'),
('J. G. White, E. Southgate, J. N. Thomson, S. Brenner, "The structure of the nervous system of the nematode Caenorhabditis elegans." Philosophical Transactions of the Royal Society of London B 314, 1-340 (1986)', 'https://doi.org/10.1098/rstb.1986.0056')]
-icon_hash = None
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://www.dynamic-connectome.org/pubs/suppl'
files = [(('celegans277.zip:celegans277matrix.csv',
[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/celegans_kaiser/__init__.py b/entries/celegans_kaiser/__init__.py
index d715648..0a7f233 100644
--- a/entries/celegans_kaiser/__init__.py
+++ b/entries/celegans_kaiser/__init__.py
@@ -25,9 +25,9 @@ The source also provides, as a separate data set, the "local" network of the 131
The nodes have the following properties:
-- `name`: the name of the neuron (e.g. "ADAL", "AVAR").
-- `position`: the $(x, y)$ position of the soma, in millimeters ($x$ along the anterior-posterior axis, increasing towards the head).
-- `rostral_ganglia`: whether the neuron belongs to the local network of the 131 neurons of the rostral ganglia."""
+- (Node) `name`: the name of the neuron (e.g. "ADAL", "AVAR").
+- (Node) `position`: the $(x, y)$ position of the soma, in millimeters ($x$ along the anterior-posterior axis, increasing towards the head).
+- (Node) `rostral_ganglia`: whether the neuron belongs to the local network of the 131 neurons of the rostral ganglia."""
tags = ['Biological', 'Connectome', 'Unweighted', 'Spatial', 'Metadata']
url = 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'
citation = [('M. Kaiser, C. C. Hilgetag, "Nonoptimal component placement, but short processing paths, due to long-distance projections in neural systems." PLoS Computational Biology 2(7), e95 (2006)', 'https://doi.org/10.1371/journal.pcbi.0020095'),
[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/celegans_kaiser/__init__.py b/entries/celegans_kaiser/__init__.py
index c4ccb1d..d715648 100644
--- a/entries/celegans_kaiser/__init__.py
+++ b/entries/celegans_kaiser/__init__.py
@@ -50,7 +50,6 @@ def fetch_upstream(force=False):
@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:
[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/celegans_kaiser/__init__.py b/entries/celegans_kaiser/__init__.py
index c0fb8be..c4ccb1d 100644
--- a/entries/celegans_kaiser/__init__.py
+++ b/entries/celegans_kaiser/__init__.py
@@ -19,14 +19,14 @@
from .. import *
title = "C. elegans neurons with spatial positions (2006)"
-description = """Directed network of the neurons of the nematode *Caenorhabditis elegans*, with the two-dimensional positions of their cell bodies, from M. Kaiser and C. C. Hilgetag. Nodes are 277 neurons, and a directed edge connects two neurons linked by a chemical synapse or by an electrical synapse (gap junction), without distinction between them. The connectivity was taken from the compilation of T. B. Achacoso and W. S. Yamamoto (1992), which is largely based on the electron microscope reconstructions of J. G. White and collaborators (1986); the neurons of the pharyngeal ring, for which there was no internal connection information, were removed, leaving 280 neurons, and three neurons (AIBL, AIYL and SMDVL) were removed because their positions were not available. The positions of the somata, in the lateral plane (anterior-posterior and dorsal-ventral axes), in millimetres, were provided by Y. Choe (temporally augmented *C. elegans* web, Choe et al. 2004). Following the usual convention, the entry $(i, j)$ of the source adjacency matrix is taken as an edge from neuron $i$ to neuron $j$ (the convention is not stated explicitly with the data).
+description = """Directed network of the neurons of the nematode *Caenorhabditis elegans*, with the two-dimensional positions of their cell bodies, from M. Kaiser and C. C. Hilgetag. Nodes are 277 neurons, and a directed edge connects two neurons linked by a chemical synapse or by an electrical synapse (gap junction), without distinction between them. The connectivity was taken from the compilation of T. B. Achacoso and W. S. Yamamoto (1992), which is largely based on the electron microscope reconstructions of J. G. White and collaborators (1986); the neurons of the pharyngeal ring, for which there was no internal connection information, were removed, leaving 280 neurons, and three neurons (AIBL, AIYL and SMDVL) were removed because their positions were not available. The positions of the somata, in the lateral plane (anterior-posterior and dorsal-ventral axes), in millimeters, were provided by Y. Choe (temporally augmented *C. elegans* web, Choe et al. 2004). Following the usual convention, the entry $(i, j)$ of the source adjacency matrix is taken as an edge from neuron $i$ to neuron $j$ (the convention is not stated explicitly with the data).
The source also provides, as a separate data set, the "local" network of the 131 neurons in the rostral ganglia (anterior, dorsal, lateral and ring ganglia), with 764 connections; it is exactly the subgraph of the network here induced by these neurons (with the same positions), which are marked by the node property `rostral_ganglia`.
The nodes have the following properties:
- `name`: the name of the neuron (e.g. "ADAL", "AVAR").
-- `position`: the $(x, y)$ position of the soma, in millimetres ($x$ along the anterior-posterior axis, increasing towards the head).
+- `position`: the $(x, y)$ position of the soma, in millimeters ($x$ along the anterior-posterior axis, increasing towards the head).
- `rostral_ganglia`: whether the neuron belongs to the local network of the 131 neurons of the rostral ganglia."""
tags = ['Biological', 'Connectome', 'Unweighted', 'Spatial', 'Metadata']
url = 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'
[entries] New entry: celegans_kaiser 986b5d7
diff --git a/entries/celegans_kaiser/__init__.py b/entries/celegans_kaiser/__init__.py
new file mode 100644
index 0000000..c0fb8be
--- /dev/null
+++ b/entries/celegans_kaiser/__init__.py
@@ -0,0 +1,71 @@
+#! /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 *
+
+title = "C. elegans neurons with spatial positions (2006)"
+description = """Directed network of the neurons of the nematode *Caenorhabditis elegans*, with the two-dimensional positions of their cell bodies, from M. Kaiser and C. C. Hilgetag. Nodes are 277 neurons, and a directed edge connects two neurons linked by a chemical synapse or by an electrical synapse (gap junction), without distinction between them. The connectivity was taken from the compilation of T. B. Achacoso and W. S. Yamamoto (1992), which is largely based on the electron microscope reconstructions of J. G. White and collaborators (1986); the neurons of the pharyngeal ring, for which there was no internal connection information, were removed, leaving 280 neurons, and three neurons (AIBL, AIYL and SMDVL) were removed because their positions were not available. The positions of the somata, in the lateral plane (anterior-posterior and dorsal-ventral axes), in millimetres, were provided by Y. Choe (temporally augmented *C. elegans* web, Choe et al. 2004). Following the usual convention, the entry $(i, j)$ of the source adjacency matrix is taken as an edge from neuron $i$ to neuron $j$ (the convention is not stated explicitly with the data).
+
+The source also provides, as a separate data set, the "local" network of the 131 neurons in the rostral ganglia (anterior, dorsal, lateral and ring ganglia), with 764 connections; it is exactly the subgraph of the network here induced by these neurons (with the same positions), which are marked by the node property `rostral_ganglia`.
+
+The nodes have the following properties:
+
+- `name`: the name of the neuron (e.g. "ADAL", "AVAR").
+- `position`: the $(x, y)$ position of the soma, in millimetres ($x$ along the anterior-posterior axis, increasing towards the head).
+- `rostral_ganglia`: whether the neuron belongs to the local network of the 131 neurons of the rostral ganglia."""
+tags = ['Biological', 'Connectome', 'Unweighted', 'Spatial', 'Metadata']
+url = 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'
+citation = [('M. Kaiser, C. C. Hilgetag, "Nonoptimal component placement, but short processing paths, due to long-distance projections in neural systems." PLoS Computational Biology 2(7), e95 (2006)', 'https://doi.org/10.1371/journal.pcbi.0020095'),
+ ('Y. Choe, B. H. McCormick, W. Koh, "Network connectivity analysis on the temporally augmented C. elegans web: A pilot study." Society for Neuroscience Abstracts 30, 921.9 (2004)', 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'),
+ ('T. B. Achacoso, W. S. Yamamoto, "AY\'s Neuroanatomy of C. elegans for Computation." CRC Press, Boca Raton (1992)', 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'),
+ ('J. G. White, E. Southgate, J. N. Thomson, S. Brenner, "The structure of the nervous system of the nematode Caenorhabditis elegans." Philosophical Transactions of the Royal Society of London B 314, 1-340 (1986)', 'https://doi.org/10.1098/rstb.1986.0056')]
+icon_hash = None
+upstream_license = None
+upstream_prefix = 'https://www.dynamic-connectome.org/pubs/suppl'
+files = [(('celegans277.zip:celegans277matrix.csv',
+ 'celegans277.zip:celegans277labels.csv',
+ 'celegans277.zip:celegans277positions.csv',
+ 'celegans131.zip:celegans131labels.csv'), 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 fnames, alt, fmt in files:
+ if alts is not None and alt not in alts:
+ continue
+ with open_upstream_file(name, fnames[0], "r") as f:
+ A = numpy.loadtxt(f, delimiter=",", dtype="int")
+ with open_upstream_file(name, fnames[1], "r") as f:
+ labels = [l.strip() for l in f if l.strip()]
+ with open_upstream_file(name, fnames[2], "r") as f:
+ pos = numpy.loadtxt(f, delimiter=",")
+ with open_upstream_file(name, fnames[3], "r") as f:
+ local = set(l.strip() for l in f if l.strip())
+ g = adjacency_graph(A, directed=True, labels=labels)
+ g.vp.position = g.new_vp("vector<double>")
+ g.vp.position.set_2d_array(pos.T)
+ g.vp.rostral_ganglia = g.new_vp("bool",
+ vals=[x in local for x in labels])
+ yield alt, g