History of cat_corticothalamic
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/cat_corticothalamic/__init__.py b/entries/cat_corticothalamic/__init__.py
index 989282e..5b8a2d5 100644
--- a/entries/cat_corticothalamic/__init__.py
+++ b/entries/cat_corticothalamic/__init__.py
@@ -36,7 +36,7 @@ tags = ['Biological', 'Connectome', 'Weighted', 'Metadata']
url = 'https://sites.google.com/site/bctnet/datasets'
citation = [('J. W. Scannell, G. A. P. C. Burns, C. C. Hilgetag, M. A. O\'Neil, M. P. Young, "The connectional organization of the cortico-thalamic system of the cat." Cerebral Cortex 9(3), 277-299 (1999)', 'https://doi.org/10.1093/cercor/9.3.277'),
('M. Rubinov, O. Sporns, "Complex network measures of brain connectivity: Uses and interpretations." NeuroImage 52(3), 1059-1069 (2010)', 'https://doi.org/10.1016/j.neuroimage.2009.10.003')]
-icon_hash = '56a85c8e26855e083a2f792a'
+date_added = '2026-10-25'
upstream_license = None
# The file attachments of the Brain Connectivity Toolbox site were lost when
# the site was migrated; they are 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/cat_corticothalamic/__init__.py b/entries/cat_corticothalamic/__init__.py
index b49a797..989282e 100644
--- a/entries/cat_corticothalamic/__init__.py
+++ b/entries/cat_corticothalamic/__init__.py
@@ -29,9 +29,9 @@ Note that this differs from the 65-area cortico-cortical version of the cat conn
The networks have the following properties:
-- `name`: the name of the cortical area (e.g. "17", "AES", "PFCL"). The source data contain names only for the cortical areas; the thalamic nuclei in `all` are unnamed (empty string).
-- `cortical` (`all` only): whether the region is a cortical area (the first 52 regions), otherwise it is a thalamic nucleus.
-- `weight`: the strength of the connection as classified in the collation, from 1 (weak or sparse) to 3 (strong or dense)."""
+- (Node) `name`: the name of the cortical area (e.g. "17", "AES", "PFCL"). The source data contain names only for the cortical areas; the thalamic nuclei in `all` are unnamed (empty string).
+- (Node) `cortical` (`all` only): whether the region is a cortical area (the first 52 regions), otherwise it is a thalamic nucleus.
+- (Edge) `weight`: the strength of the connection as classified in the collation, from 1 (weak or sparse) to 3 (strong or dense)."""
tags = ['Biological', 'Connectome', 'Weighted', 'Metadata']
url = 'https://sites.google.com/site/bctnet/datasets'
citation = [('J. W. Scannell, G. A. P. C. Burns, C. C. Hilgetag, M. A. O\'Neil, M. P. Young, "The connectional organization of the cortico-thalamic system of the cat." Cerebral Cortex 9(3), 277-299 (1999)', 'https://doi.org/10.1093/cercor/9.3.277'),
[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/cat_corticothalamic/__init__.py b/entries/cat_corticothalamic/__init__.py
index e7f918c..b49a797 100644
--- a/entries/cat_corticothalamic/__init__.py
+++ b/entries/cat_corticothalamic/__init__.py
@@ -56,7 +56,6 @@ def fetch_upstream(force=False):
@coerce_props()
@annotate()
def parse(alts=None):
- global files
name = __name__.split(".")[-1]
for fname, alt, key in files:
if alts is not None and alt not in alts:
[entries] New entry: cat_corticothalamic 4511dae
diff --git a/entries/cat_corticothalamic/__init__.py b/entries/cat_corticothalamic/__init__.py
new file mode 100644
index 0000000..e7f918c
--- /dev/null
+++ b/entries/cat_corticothalamic/__init__.py
@@ -0,0 +1,78 @@
+#! /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 = "Cat cortico-thalamic connectivity (Scannell, 1999)"
+description = """Directed and weighted networks of the extrinsic anatomical connections among the cortical areas and thalamic nuclei of the cat cerebral hemisphere, from the collation of Scannell et al., as distributed with the Brain Connectivity Toolbox (contributed by O. Sporns). Scannell et al. compiled the connections reported in the published tract-tracing literature into a database of the cortico-cortical, cortico-thalamic, thalamo-cortical and thalamo-thalamic connections of the cat. Nodes are brain regions (cortical areas or thalamic nuclei), and a directed edge $i\\to j$ indicates a reported axonal projection from region $i$ to region $j$ (an entry $a_{ij}>0$ of the source matrix, following the Brain Connectivity Toolbox convention), weighted by its reported strength (1 to 3).
+
+- `all`: all 95 regions, cortical areas and thalamic nuclei (2126 connections).
+- `cortex`: only the 52 cortical areas (818 connections; the toolbox documentation states 820). This is the same as the subnetwork of `all` induced by the cortical areas.
+
+Note that this differs from the 65-area cortico-cortical version of the cat connectome in the `cat_cortex` entry.
+
+The networks have the following properties:
+
+- `name`: the name of the cortical area (e.g. "17", "AES", "PFCL"). The source data contain names only for the cortical areas; the thalamic nuclei in `all` are unnamed (empty string).
+- `cortical` (`all` only): whether the region is a cortical area (the first 52 regions), otherwise it is a thalamic nucleus.
+- `weight`: the strength of the connection as classified in the collation, from 1 (weak or sparse) to 3 (strong or dense)."""
+tags = ['Biological', 'Connectome', 'Weighted', 'Metadata']
+url = 'https://sites.google.com/site/bctnet/datasets'
+citation = [('J. W. Scannell, G. A. P. C. Burns, C. C. Hilgetag, M. A. O\'Neil, M. P. Young, "The connectional organization of the cortico-thalamic system of the cat." Cerebral Cortex 9(3), 277-299 (1999)', 'https://doi.org/10.1093/cercor/9.3.277'),
+ ('M. Rubinov, O. Sporns, "Complex network measures of brain connectivity: Uses and interpretations." NeuroImage 52(3), 1059-1069 (2010)', 'https://doi.org/10.1016/j.neuroimage.2009.10.003')]
+icon_hash = '56a85c8e26855e083a2f792a'
+upstream_license = None
+# The file attachments of the Brain Connectivity Toolbox site were lost when
+# the site was migrated; they are obtained from the Internet Archive.
+upstream_prefix = 'https://web.archive.org/web/2020id_/https://sites.google.com/site/bctnet/Home/functions'
+files = [('cat.mat', 'all', 'CIJall'),
+ ('cat.mat', 'cortex', 'CIJctx')]
+archived_urls = {
+ 'cat.mat':
+ 'https://web.archive.org/web/20201022115532id_/https://sites.google.com/site/bctnet/Home/functions/cat.mat?attredirects=0'}
+
+def fetch_upstream(force=False):
+ # The Internet Archive URLs carry a query string, so the files are
+ # fetched from them directly.
+ return fetch_archived_files(__name__.split(".")[-1], archived_urls, force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+ global files
+ name = __name__.split(".")[-1]
+ for fname, alt, key 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 = m[key]
+ N = A.shape[0]
+ g = Graph(directed=True)
+ g.add_vertex(N)
+ i, j = numpy.nonzero(A)
+ g.ep.weight = g.new_ep("int")
+ g.add_edge_list(numpy.column_stack((i, j, A[i, j])), eprops=[g.ep.weight])
+ names = [str(s).strip() for s in m["Names"]]
+ g.vp.name = g.new_vp("string", vals=names + [""] * (N - len(names)))
+ if alt == "all":
+ g.vp.cortical = g.new_vp("bool")
+ g.vp.cortical.a[:len(names)] = 1
+ yield alt, g