History of budapest_connectome
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/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 6d67b74..f279461 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__init__.py
@@ -38,7 +38,7 @@ tags = ['Biological', 'Connectome', 'Weighted']
url = 'http://pitgroup.org/connectome/#manual'
citation = [('B. Szalkai, C. Kerepesi, B. Varga and V. Grolmusz, "Parameterizable consensus connectomes from the Human Connectome Project: the Budapest Reference Connectome Server v3.0." Cognitive Neurodynamics 11, 113-116 (2017)', 'https://doi.org/10.1007/s11571-016-9407-z'),
('B. Szalkai et al., "The Budapest Reference Connectome Server v2.0." Neuroscience Letters 595, 60-62 (2015)', 'https://doi.org/10.1016/j.neulet.2015.03.071')]
-icon_hash = '5dade1bc48da354f03d21b61'
+date_added = '2020-08-11'
upstream_license = None
upstream_prefix = 'http://pitgroup.org/apps/connectome'
files = [([f'getgraph.php?format=graphml&version=2&population={pid}&minOccurrences={n}&minStrength=0&combineMode={comb}&weightFunction={f}&totalFiberNumber={fib}' for comb in ["median", "mean"] for f in range(4) for n in range(478)],
[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/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 5536ecd..6d67b74 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__init__.py
@@ -25,8 +25,15 @@ There are nine networks, depending on the subject population (`all` subjects, `f
The networks have the following properties:
-- Nodes: `dn_name`, the name of the region, prefixed by the hemisphere (e.g. `rh.lateralorbitofrontal_9`); `dn_fsname`, the region name without the hemisphere prefix; `dn_hemisphere`, the hemisphere (`left` or `right`); `dn_region`, whether the region is `cortical` or `subcortical`.
-- Edges: `occurences`, the number of subjects in whose connectome the edge is present; `fiber_count_mean` and `fiber_count_median`, the mean and median number of fibers connecting the two regions; `fiber_length_mean` and `fiber_length_median`, the mean and median average length of those fibers; `fractional_anisotropy_mean` and `fractional_anisotropy_median`, the mean and median average fractional anisotropy along the fibers; `electrical_connectivity_mean` and `electrical_connectivity_median`, the mean and median "electrical connectivity", i.e. the number of fibers divided by their average length. Means and medians are taken over the subjects in which the edge is present."""
+- (Node) `dn_name`: the name of the region, prefixed by the hemisphere (e.g. `rh.lateralorbitofrontal_9`).
+- (Node) `dn_fsname`: the region name without the hemisphere prefix.
+- (Node) `dn_hemisphere`: the hemisphere (`left` or `right`).
+- (Node) `dn_region`: whether the region is `cortical` or `subcortical`.
+- (Edge) `occurences`: the number of subjects in whose connectome the edge is present.
+- (Edge) `fiber_count_mean` and `fiber_count_median`: the mean and median number of fibers connecting the two regions.
+- (Edge) `fiber_length_mean` and `fiber_length_median`: the mean and median average length of those fibers.
+- (Edge) `fractional_anisotropy_mean` and `fractional_anisotropy_median`: the mean and median average fractional anisotropy along the fibers.
+- (Edge) `electrical_connectivity_mean` and `electrical_connectivity_median`: the mean and median "electrical connectivity", i.e. the number of fibers divided by their average length. Means and medians are taken over the subjects in which the edge is present."""
tags = ['Biological', 'Connectome', 'Weighted']
url = 'http://pitgroup.org/connectome/#manual'
citation = [('B. Szalkai, C. Kerepesi, B. Varga and V. Grolmusz, "Parameterizable consensus connectomes from the Human Connectome Project: the Budapest Reference Connectome Server v3.0." Cognitive Neurodynamics 11, 113-116 (2017)', 'https://doi.org/10.1007/s11571-016-9407-z'),
[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/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index f5687d6..5536ecd 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__init__.py
@@ -45,7 +45,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] Fix parse bugs and improve descriptions and metadata 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents (directed), celegans_2019 (synapse direction), ecoli_transcription and yeast_transcription (regulator to target), bitcoin (direction, phantom node), ego_social (Google+ features and circles), scotus_majority, arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom, mist, reuters and bibsonomy (names on the right nodes), uci_zoo - every description now states explicitly what the nodes and edges represent; corrected titles, years, tags, citations and licences - the "Hypergraph" tag is removed; very large entries are marked `huge = True` (see --skip-huge) - ICON ids of partial duplicates added (hiv_transmission, congress_bills, openflights, dutch_school)
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 0aae177..f5687d6 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__init__.py
@@ -19,13 +19,20 @@
from .. import *
title = "Budapest Reference Connectome 3.0"
-description = """A parameterizable consensus brain graph, derived from connectomes of 477 people, each computed from MRI datasets of the Human Connectome Project. Nodes are brain regions, and edges are weighted by the number of \"tracks\" that run between two nodes, as well as fiber length, fractional anisotropy and the number of occurrences in each of the 477 individuals.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+description = """Consensus human structural brain networks (connectomes) from the Budapest Reference Connectome Server v3.0, built by B. Szalkai, C. Kerepesi, B. Varga and V. Grolmusz from the diffusion MRI data of 477 healthy adult subjects of the Human Connectome Project. For each subject, a connectome was computed by tractography (with the Connectome Mapper Toolkit), in which nodes are 1,015 anatomical regions of the brain (1,000 cortical and 15 subcortical) and edges connect regions linked by tracked fibers (streamlines). The individual connectomes were then combined into a consensus graph, where an edge is present if it occurs in at least one of the subjects.
+
+There are nine networks, depending on the subject population (`all` subjects, `female` or `male` only) and on the total number of fibers tracked per subject (`20k`, `200k` or `1m`), named `<population>_<fibers>`.
+
+The networks have the following properties:
+
+- Nodes: `dn_name`, the name of the region, prefixed by the hemisphere (e.g. `rh.lateralorbitofrontal_9`); `dn_fsname`, the region name without the hemisphere prefix; `dn_hemisphere`, the hemisphere (`left` or `right`); `dn_region`, whether the region is `cortical` or `subcortical`.
+- Edges: `occurences`, the number of subjects in whose connectome the edge is present; `fiber_count_mean` and `fiber_count_median`, the mean and median number of fibers connecting the two regions; `fiber_length_mean` and `fiber_length_median`, the mean and median average length of those fibers; `fractional_anisotropy_mean` and `fractional_anisotropy_median`, the mean and median average fractional anisotropy along the fibers; `electrical_connectivity_mean` and `electrical_connectivity_median`, the mean and median "electrical connectivity", i.e. the number of fibers divided by their average length. Means and medians are taken over the subjects in which the edge is present."""
tags = ['Biological', 'Connectome', 'Weighted']
url = 'http://pitgroup.org/connectome/#manual'
-citation = [('B. Szalkai et al., "The Budapest Reference Connectome Server v2.0." Neuroscience Letters 595, 60-62 (2015)', 'https://doi.org/10.1016/j.neulet.2015.03.071')]
+citation = [('B. Szalkai, C. Kerepesi, B. Varga and V. Grolmusz, "Parameterizable consensus connectomes from the Human Connectome Project: the Budapest Reference Connectome Server v3.0." Cognitive Neurodynamics 11, 113-116 (2017)', 'https://doi.org/10.1007/s11571-016-9407-z'),
+ ('B. Szalkai et al., "The Budapest Reference Connectome Server v2.0." Neuroscience Letters 595, 60-62 (2015)', 'https://doi.org/10.1016/j.neulet.2015.03.071')]
icon_hash = '5dade1bc48da354f03d21b61'
-ustream_license = None
+upstream_license = None
upstream_prefix = 'http://pitgroup.org/apps/connectome'
files = [([f'getgraph.php?format=graphml&version=2&population={pid}&minOccurrences={n}&minStrength=0&combineMode={comb}&weightFunction={f}&totalFiberNumber={fib}' for comb in ["median", "mean"] for f in range(4) for n in range(478)],
f'{pop}_{fibers}', "graphml") for pid, pop in enumerate(["all", "female", "male"]) for fib, fibers in enumerate(["20k", "200k", "1m"])]
@@ -77,5 +84,8 @@ def parse(alts=None):
g.ep.occurences.fa[occ.fa > 0] = occ.fa[occ.fa > 0]
del g.vp["_graphml_vertex_id"]
del g.ep["_graphml_edge_id"]
+ # the first graph loaded (combineMode=mean, weightFunction=0) keeps
+ # the edge property name of the upstream files
+ g.ep.electrical_connectivity_mean = g.ep["number_of_fiber_per_fiber_length_mean"]
del g.ep["number_of_fiber_per_fiber_length_mean"]
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index f00e3c6..0aae177 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__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 3d288ea
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index d5202d8..f00e3c6 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__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 8d005ae
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 7ff9110..d5202d8 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__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 db2efcc
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 137a462..7ff9110 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__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
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 211b3ac..137a462 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__init__.py
@@ -3,18 +3,18 @@
#
# 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 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 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 General Public License for more details.
+# 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 General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# 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 *
Add explicit attribution to descriptions obtained from ICON 1645314
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
index 8a52403..211b3ac 100644
--- a/entries/budapest_connectome/__init__.py
+++ b/entries/budapest_connectome/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "Budapest Reference Connectome 3.0"
-description = "A parameterizable consensus brain graph, derived from connectomes of 477 people, each computed from MRI datasets of the Human Connectome Project. Nodes are brain regions, and edges are weighted by the number of \"tracks\" that run between two nodes, as well as fiber length, fractional anisotropy and the number of occurrences in each of the 477 individuals."
+description = """A parameterizable consensus brain graph, derived from connectomes of 477 people, each computed from MRI datasets of the Human Connectome Project. Nodes are brain regions, and edges are weighted by the number of \"tracks\" that run between two nodes, as well as fiber length, fractional anisotropy and the number of occurrences in each of the 477 individuals.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Connectome', 'Weighted']
url = 'http://pitgroup.org/connectome/#manual'
citation = [('B. Szalkai et al., "The Budapest Reference Connectome Server v2.0." Neuroscience Letters 595, 60-62 (2015)', 'https://doi.org/10.1016/j.neulet.2015.03.071')]
Initial commit cc85872
diff --git a/entries/budapest_connectome/__init__.py b/entries/budapest_connectome/__init__.py
new file mode 100644
index 0000000..8a52403
--- /dev/null
+++ b/entries/budapest_connectome/__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 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Budapest Reference Connectome 3.0"
+description = "A parameterizable consensus brain graph, derived from connectomes of 477 people, each computed from MRI datasets of the Human Connectome Project. Nodes are brain regions, and edges are weighted by the number of \"tracks\" that run between two nodes, as well as fiber length, fractional anisotropy and the number of occurrences in each of the 477 individuals."
+tags = ['Biological', 'Connectome', 'Weighted']
+url = 'http://pitgroup.org/connectome/#manual'
+citation = [('B. Szalkai et al., "The Budapest Reference Connectome Server v2.0." Neuroscience Letters 595, 60-62 (2015)', 'https://doi.org/10.1016/j.neulet.2015.03.071')]
+icon_hash = '5dade1bc48da354f03d21b61'
+ustream_license = None
+upstream_prefix = 'http://pitgroup.org/apps/connectome'
+files = [([f'getgraph.php?format=graphml&version=2&population={pid}&minOccurrences={n}&minStrength=0&combineMode={comb}&weightFunction={f}&totalFiberNumber={fib}' for comb in ["median", "mean"] for f in range(4) for n in range(478)],
+ f'{pop}_{fibers}', "graphml") for pid, pop in enumerate(["all", "female", "male"]) for fib, fibers in enumerate(["20k", "200k", "1m"])]
+
+def fetch_upstream(force=False):
+ return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+ force, bad_ssl=True)
+
+@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
+ if isinstance(fnames, str):
+ fnames = [fnames]
+
+ pop, fibers = alt.split("_")
+ pid = ["all", "female", "male"].index(pop)
+ fib = ["20k", "200k", "1m"].index(fibers)
+
+ g = None
+ for n in range(0, 478):
+ u_n = None
+ for comb in ["mean", "median"]:
+ for func in range(4):
+ fn = f'getgraph.php?format=graphml&version=2&population={pid}&minOccurrences={n}&minStrength=0&combineMode={comb}&weightFunction={func}&totalFiberNumber={fib}'
+ with open_upstream_file(name, fn, "r") as f:
+ u = load_graph(f, fmt="xml")
+ if u_n is None:
+ u_n = u
+ else:
+ for k, p in u.ep.items():
+ up = u_n.copy_property(p, g=u)
+ pname = ["electrical_connectivity", "fiber_count",
+ "fiber_length",
+ "fractional_anisotropy"][func]
+ pname += "_" + comb
+ u_n.ep[pname] = up
+ u_n.ep.occurences = u_n.new_ep("int", val=n)
+ if g is None:
+ g = u_n
+ else:
+ occ = u_n.new_ep("int", val=n)
+ occ = g.copy_property(occ, g=u_n)
+ g.ep.occurences.fa[occ.fa > 0] = occ.fa[occ.fa > 0]
+ del g.vp["_graphml_vertex_id"]
+ del g.ep["_graphml_edge_id"]
+ del g.ep["number_of_fiber_per_fiber_length_mean"]
+ yield alt, g