logo Netzschleuder network catalog, repository, and centrifuge

History of macaque_cortex_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 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/macaque_cortex_kaiser/__init__.py b/entries/macaque_cortex_kaiser/__init__.py
index cc4f626..df6015e 100644
--- a/entries/macaque_cortex_kaiser/__init__.py
+++ b/entries/macaque_cortex_kaiser/__init__.py
@@ -33,7 +33,7 @@ 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'),
             ('R. Kötter, "Online retrieval, processing, and visualization of primate connectivity data from the CoCoMac database." Neuroinformatics 2, 127-144 (2004)', 'https://doi.org/10.1385/NI:2:2:127')]
-icon_hash = '56a85c8e26855e083a2f791f'
+date_added = '2026-10-25'
 upstream_license = None
 upstream_prefix = 'https://www.dynamic-connectome.org/pubs/suppl'
 files = [('mac95.zip:mac95.mat', None, None)]
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) by Tiago de Paula Peixoto 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/macaque_cortex_kaiser/__init__.py b/entries/macaque_cortex_kaiser/__init__.py
index 5178a9c..cc4f626 100644
--- a/entries/macaque_cortex_kaiser/__init__.py
+++ b/entries/macaque_cortex_kaiser/__init__.py
@@ -25,8 +25,8 @@ description = """Directed network of anatomical connections among 95 areas and s
 
 The nodes have the following properties:
 
-- `name`: the label of the cortical area (e.g. "V1", "46", "10m").
-- `position`: the $(x, y, z)$ position of the area, in millimeters.[^icon]
+- (Node) `name`: the label of the cortical area (e.g. "V1", "46", "10m").
+- (Node) `position`: the $(x, y, z)$ position of the area, in millimeters.[^icon]
 
 [^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Connectome', 'Unweighted', 'Spatial', 'Metadata']
[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/macaque_cortex_kaiser/__init__.py b/entries/macaque_cortex_kaiser/__init__.py
index 3ad805d..5178a9c 100644
--- a/entries/macaque_cortex_kaiser/__init__.py
+++ b/entries/macaque_cortex_kaiser/__init__.py
@@ -46,7 +46,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:
[entries] Use American spelling in the descriptions by Tiago de Paula Peixoto 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/macaque_cortex_kaiser/__init__.py b/entries/macaque_cortex_kaiser/__init__.py
index 200ad9b..3ad805d 100644
--- a/entries/macaque_cortex_kaiser/__init__.py
+++ b/entries/macaque_cortex_kaiser/__init__.py
@@ -21,12 +21,12 @@ from .. import *
 from scipy.io import loadmat
 
 title = "Macaque cortical connectivity with spatial positions (95 areas)"
-description = """Directed network of anatomical connections among 95 areas and sub-areas of one hemisphere of the macaque monkey cerebral cortex, with the three-dimensional positions of the areas, from M. Kaiser and C. C. Hilgetag. Nodes are cortical areas, and a directed edge represents a projection (axonal pathway) from one area to another, as reported by tract-tracing studies; following the usual convention, the entry $(i, j)$ of the source adjacency matrix is taken as an edge from area $i$ to area $j$ (the convention is not stated explicitly with the data). The connectivity data were retrieved from the CoCoMac database and are based on three extensive neuroanatomical compilations that together cover large parts of the cortex; the positions of the areas are the centres of mass of their three-dimensional extensions, estimated from a surface parcellation with the CARET software. This corrected version of the data contains 94 areas, since a duplicate area (6Vb/6vb) of the original data set was merged into a single area that inherited the connections of both.
+description = """Directed network of anatomical connections among 95 areas and sub-areas of one hemisphere of the macaque monkey cerebral cortex, with the three-dimensional positions of the areas, from M. Kaiser and C. C. Hilgetag. Nodes are cortical areas, and a directed edge represents a projection (axonal pathway) from one area to another, as reported by tract-tracing studies; following the usual convention, the entry $(i, j)$ of the source adjacency matrix is taken as an edge from area $i$ to area $j$ (the convention is not stated explicitly with the data). The connectivity data were retrieved from the CoCoMac database and are based on three extensive neuroanatomical compilations that together cover large parts of the cortex; the positions of the areas are the centers of mass of their three-dimensional extensions, estimated from a surface parcellation with the CARET software. This corrected version of the data contains 94 areas, since a duplicate area (6Vb/6vb) of the original data set was merged into a single area that inherited the connections of both.
 
 The nodes have the following properties:
 
 - `name`: the label of the cortical area (e.g. "V1", "46", "10m").
-- `position`: the $(x, y, z)$ position of the area, in millimetres.[^icon]
+- `position`: the $(x, y, z)$ position of the area, in millimeters.[^icon]
 
 [^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Biological', 'Connectome', 'Unweighted', 'Spatial', 'Metadata']
[entries] New entry: macaque_cortex_kaiser by Tiago de Paula Peixoto 6c5b807
diff --git a/entries/macaque_cortex_kaiser/__init__.py b/entries/macaque_cortex_kaiser/__init__.py
new file mode 100644
index 0000000..200ad9b
--- /dev/null
+++ b/entries/macaque_cortex_kaiser/__init__.py
@@ -0,0 +1,61 @@
+#! /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 *
+from scipy.io import loadmat
+
+title = "Macaque cortical connectivity with spatial positions (95 areas)"
+description = """Directed network of anatomical connections among 95 areas and sub-areas of one hemisphere of the macaque monkey cerebral cortex, with the three-dimensional positions of the areas, from M. Kaiser and C. C. Hilgetag. Nodes are cortical areas, and a directed edge represents a projection (axonal pathway) from one area to another, as reported by tract-tracing studies; following the usual convention, the entry $(i, j)$ of the source adjacency matrix is taken as an edge from area $i$ to area $j$ (the convention is not stated explicitly with the data). The connectivity data were retrieved from the CoCoMac database and are based on three extensive neuroanatomical compilations that together cover large parts of the cortex; the positions of the areas are the centres of mass of their three-dimensional extensions, estimated from a surface parcellation with the CARET software. This corrected version of the data contains 94 areas, since a duplicate area (6Vb/6vb) of the original data set was merged into a single area that inherited the connections of both.
+
+The nodes have the following properties:
+
+- `name`: the label of the cortical area (e.g. "V1", "46", "10m").
+- `position`: the $(x, y, z)$ position of the area, in millimetres.[^icon]
+
+[^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
+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'),
+            ('R. Kötter, "Online retrieval, processing, and visualization of primate connectivity data from the CoCoMac database." Neuroinformatics 2, 127-144 (2004)', 'https://doi.org/10.1385/NI:2:2:127')]
+icon_hash = '56a85c8e26855e083a2f791f'
+upstream_license = None
+upstream_prefix = 'https://www.dynamic-connectome.org/pubs/suppl'
+files = [('mac95.zip:mac95.mat', 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", seekable=True) as f:
+            m = loadmat(f)
+        A = numpy.asarray(m["matrix"], dtype="int")
+        labels = [str(x[0][0]) for x in m["labels"]]
+        g = adjacency_graph(A, directed=True, labels=labels)
+        g.vp.position = g.new_vp("vector<double>")
+        g.vp.position.set_2d_array(numpy.asarray(m["position"], dtype="float").T)
+        yield alt, g