logo Netzschleuder network catalog, repository, and centrifuge

History of rat_brain_bams

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] Remove superfluous details of the upstream distribution from the descriptions by Tiago de Paula Peixoto dc07aa0
The descriptions mentioned incidental details of how the upstream data
are made available: the file formats (CSV, JSON, XML, GEXF, SBML, HIF,
Pajek, UCINET, ...), file names, where the files were published or
obtained from (Zenodo, figshare, Kaggle, the Pajek datasets page, the
Internet Archive), and that some networks are only available in the gt
format. These are left out; caveats about the data themselves are kept,
referring to "the data" instead of "the file". The description of
sp_baboons now lists its properties instead of the upstream columns,
and says that events without a recipient are left out.
diff --git a/entries/rat_brain_bams/__init__.py b/entries/rat_brain_bams/__init__.py
index 6537e87..3a296df 100644
--- a/entries/rat_brain_bams/__init__.py
+++ b/entries/rat_brain_bams/__init__.py
@@ -28,9 +28,9 @@ description = """Directed networks of anatomical connections between regions of
 The networks have the following properties:
 
 - (Node) `name`: the abbreviation of the region in the Swanson atlas.
-- (Edge) `strength`: an ordinal connection-strength code from 1 to 9 (larger values for stronger connections). BAMS uses qualitative strength categories ("exists", "very weak", "weak", "moderate/weak", "moderate", "moderate/strong", "strong", "very strong"); the exact mapping of these to the codes in these files is not documented (the code 1 accounts for about 80% of the edges).
+- (Edge) `strength`: an ordinal connection-strength code from 1 to 9 (larger values for stronger connections). BAMS uses qualitative strength categories ("exists", "very weak", "weak", "moderate/weak", "moderate", "moderate/strong", "strong", "very strong"); the exact mapping of these to the codes of the data is not documented (the code 1 accounts for about 80% of the edges).
 
-The data were obtained from the graph collection of the Open Connectome Project (now NeuroData), whose servers are offline, via the Internet Archive."""
+The data were obtained from the graph collection of the Open Connectome Project (now NeuroData)."""
 tags = ['Biological', 'Connectome', 'Weighted']
 url = 'https://web.archive.org/web/20160420202242/http://openconnecto.me/graph-services/download/'
 citation = [('M. Bota, L. W. Swanson, "Online workbenches for neural network connections." Journal of Comparative Neurology 500(5), 807-814 (2007)', 'https://doi.org/10.1002/cne.21209')]
[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/rat_brain_bams/__init__.py b/entries/rat_brain_bams/__init__.py
index d560b5f..6537e87 100644
--- a/entries/rat_brain_bams/__init__.py
+++ b/entries/rat_brain_bams/__init__.py
@@ -34,7 +34,7 @@ The data were obtained from the graph collection of the Open Connectome Project
 tags = ['Biological', 'Connectome', 'Weighted']
 url = 'https://web.archive.org/web/20160420202242/http://openconnecto.me/graph-services/download/'
 citation = [('M. Bota, L. W. Swanson, "Online workbenches for neural network connections." Journal of Comparative Neurology 500(5), 807-814 (2007)', 'https://doi.org/10.1002/cne.21209')]
-icon_hash = '56a85c8e26855e083a2f78cb'
+date_added = '2026-10-25'
 upstream_license = None
 # Internet Archive copies of the OpenConnectome graph files (see archived_urls)
 upstream_prefix = 'https://web.archive.org/web'
[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/rat_brain_bams/__init__.py b/entries/rat_brain_bams/__init__.py
index cdcf47d..d560b5f 100644
--- a/entries/rat_brain_bams/__init__.py
+++ b/entries/rat_brain_bams/__init__.py
@@ -27,8 +27,8 @@ description = """Directed networks of anatomical connections between regions of
 
 The networks have the following properties:
 
-- Nodes: `name`, the abbreviation of the region in the Swanson atlas.
-- Edges: `strength`, an ordinal connection-strength code from 1 to 9 (larger values for stronger connections). BAMS uses qualitative strength categories ("exists", "very weak", "weak", "moderate/weak", "moderate", "moderate/strong", "strong", "very strong"); the exact mapping of these to the codes in these files is not documented (the code 1 accounts for about 80% of the edges).
+- (Node) `name`: the abbreviation of the region in the Swanson atlas.
+- (Edge) `strength`: an ordinal connection-strength code from 1 to 9 (larger values for stronger connections). BAMS uses qualitative strength categories ("exists", "very weak", "weak", "moderate/weak", "moderate", "moderate/strong", "strong", "very strong"); the exact mapping of these to the codes in these files is not documented (the code 1 accounts for about 80% of the edges).
 
 The data were obtained from the graph collection of the Open Connectome Project (now NeuroData), whose servers are offline, via the Internet Archive."""
 tags = ['Biological', 'Connectome', 'Weighted']
[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/rat_brain_bams/__init__.py b/entries/rat_brain_bams/__init__.py
index d76ec3b..cdcf47d 100644
--- a/entries/rat_brain_bams/__init__.py
+++ b/entries/rat_brain_bams/__init__.py
@@ -61,7 +61,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] New entry: rat_brain_bams by Tiago de Paula Peixoto c337600
diff --git a/entries/rat_brain_bams/__init__.py b/entries/rat_brain_bams/__init__.py
new file mode 100644
index 0000000..d76ec3b
--- /dev/null
+++ b/entries/rat_brain_bams/__init__.py
@@ -0,0 +1,72 @@
+#! /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 = 'Rat brain BAMS connectome (2011-2013)'
+description = """Directed networks of anatomical connections between regions of the rat brain, from three releases (2011, March 2012 and January 2013) of the connection matrix of the Brain Architecture Management System (BAMS) Rat Connectome Project of Bota and Swanson. BAMS is a curated database that collates connection reports from the primary experimental (tract-tracing) literature, using the regions of the Swanson rat brain atlas. Nodes are brain regions (about 500, spanning the cerebral cortex, cerebral nuclei, thalamus, hypothalamus, midbrain and hindbrain), and a directed edge points from the region of origin of a projection to its target.
+
+- `2011`: 503 regions, 27,667 edges.
+- `2012`: 503 regions, 30,088 edges.
+- `2013`: 496 regions, 33,020 edges.
+
+The networks have the following properties:
+
+- Nodes: `name`, the abbreviation of the region in the Swanson atlas.
+- Edges: `strength`, an ordinal connection-strength code from 1 to 9 (larger values for stronger connections). BAMS uses qualitative strength categories ("exists", "very weak", "weak", "moderate/weak", "moderate", "moderate/strong", "strong", "very strong"); the exact mapping of these to the codes in these files is not documented (the code 1 accounts for about 80% of the edges).
+
+The data were obtained from the graph collection of the Open Connectome Project (now NeuroData), whose servers are offline, via the Internet Archive."""
+tags = ['Biological', 'Connectome', 'Weighted']
+url = 'https://web.archive.org/web/20160420202242/http://openconnecto.me/graph-services/download/'
+citation = [('M. Bota, L. W. Swanson, "Online workbenches for neural network connections." Journal of Comparative Neurology 500(5), 807-814 (2007)', 'https://doi.org/10.1002/cne.21209')]
+icon_hash = '56a85c8e26855e083a2f78cb'
+upstream_license = None
+# Internet Archive copies of the OpenConnectome graph files (see archived_urls)
+upstream_prefix = 'https://web.archive.org/web'
+files = [('rattus.norvegicus_brain_1.graphml', '2011', None),
+         ('rattus.norvegicus_brain_2.graphml', '2012', None),
+         ('rattus.norvegicus_brain_3.graphml', '2013', None)]
+archived_urls = {
+    'rattus.norvegicus_brain_1.graphml':
+    'https://web.archive.org/web/20160707124720id_/http://awesome.cs.jhu.edu/data/static/graphs/rat/rattus.norvegicus_brain_1.graphml',
+    'rattus.norvegicus_brain_2.graphml':
+    'https://web.archive.org/web/20160707130618id_/http://awesome.cs.jhu.edu/data/static/graphs/rat/rattus.norvegicus_brain_2.graphml',
+    'rattus.norvegicus_brain_3.graphml':
+    'https://web.archive.org/web/20141016013258id_/http://openconnecto.me/data/public/graphs/rat/rattus.norvegicus_brain_3.graphml',
+}
+
+def fetch_upstream(force=False):
+    # The OpenConnectome graph servers (openconnecto.me, awesome.cs.jhu.edu)
+    # are offline; the files are obtained from the Internet Archive, which
+    # is sometimes slow or refuses connections, hence the retries.
+    return fetch_archived_files(__name__.split(".")[-1], archived_urls, force,
+                                tries=5, timeout=600)
+
+@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
+        g = load_oc_graph(name, fname)
+        g.ep.strength = g.ep.weight.copy("int")
+        del g.ep["weight"]
+        yield alt, g