History of human_microbiome
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] human_microbiome, multiplex_diseasome: use American spelling in the descriptions 59b2475
diff --git a/entries/human_microbiome/__init__.py b/entries/human_microbiome/__init__.py
index f9528cb..a3e889b 100644
--- a/entries/human_microbiome/__init__.py
+++ b/entries/human_microbiome/__init__.py
@@ -19,11 +19,11 @@
from .. import *
title = "Human microbiome multiplex network (2014)"
-description = r"""A multiplex network of microbial taxa across 18 sites of the human body, assembled by M. De Domenico and J. Biamonte from the data of Ding and Schloss (2014), who analysed the 16S rRNA gene sequences of the bacterial communities sampled from healthy adults by the Human Microbiome Project, and found that the communities of each body site fall into a few distinct community types. Nodes are 305 operational taxonomic units (OTUs, groups of similar sequences that stand for bacterial taxa), and each layer corresponds to a body site. An undirected edge in a layer connects two taxa that are associated (interact) in the microbial communities of that body site; how the associations were inferred from the abundance data is not documented by the authors. There are 4,433 edges, at most one per pair of taxa and layer.
+description = r"""A multiplex network of microbial taxa across 18 sites of the human body, assembled by M. De Domenico and J. Biamonte from the data of Ding and Schloss (2014), who analyzed the 16S rRNA gene sequences of the bacterial communities sampled from healthy adults by the Human Microbiome Project, and found that the communities of each body site fall into a few distinct community types. Nodes are 305 operational taxonomic units (OTUs, groups of similar sequences that stand for bacterial taxa), and each layer corresponds to a body site. An undirected edge in a layer connects two taxa that are associated (interact) in the microbial communities of that body site; how the associations were inferred from the abundance data is not documented by the authors. There are 4,433 edges, at most one per pair of taxa and layer.
The layers are: `Anterior_nares` (55 edges), `Buccal_mucosa` (114), `Hard_palate` (241), `Keratinized_gingiva` (46), `L_Antecubital_fossa` (524), `L_Retroauricular_crease` (63), `Mid_vagina` (81), `Palatine_Tonsils` (483), `Posterior_fornix` (33), `R_Antecubital_fossa` (335), `R_Retroauricular_crease` (49), `Saliva` (324), `Stool` (244), `Subgingival_plaque` (590), `Supragingival_plaque` (359), `Throat` (442), `Tongue_dorsum` (324) and `Vaginal_introitus` (126).
-The taxa are identified only by the last two levels of their taxonomic classification, so several nodes share the same label (e.g. 23 nodes are labelled `Clostridia(100);Clostridiales(100);`).
+The taxa are identified only by the last two levels of their taxonomic classification, so several nodes share the same label (e.g. 23 nodes are labeled `Clostridia(100);Clostridiales(100);`).
The network has the following properties:
[entries] New entry: human_microbiome 8ceade9
diff --git a/entries/human_microbiome/__init__.py b/entries/human_microbiome/__init__.py
new file mode 100644
index 0000000..f9528cb
--- /dev/null
+++ b/entries/human_microbiome/__init__.py
@@ -0,0 +1,86 @@
+#! /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 = "Human microbiome multiplex network (2014)"
+description = r"""A multiplex network of microbial taxa across 18 sites of the human body, assembled by M. De Domenico and J. Biamonte from the data of Ding and Schloss (2014), who analysed the 16S rRNA gene sequences of the bacterial communities sampled from healthy adults by the Human Microbiome Project, and found that the communities of each body site fall into a few distinct community types. Nodes are 305 operational taxonomic units (OTUs, groups of similar sequences that stand for bacterial taxa), and each layer corresponds to a body site. An undirected edge in a layer connects two taxa that are associated (interact) in the microbial communities of that body site; how the associations were inferred from the abundance data is not documented by the authors. There are 4,433 edges, at most one per pair of taxa and layer.
+
+The layers are: `Anterior_nares` (55 edges), `Buccal_mucosa` (114), `Hard_palate` (241), `Keratinized_gingiva` (46), `L_Antecubital_fossa` (524), `L_Retroauricular_crease` (63), `Mid_vagina` (81), `Palatine_Tonsils` (483), `Posterior_fornix` (33), `R_Antecubital_fossa` (335), `R_Retroauricular_crease` (49), `Saliva` (324), `Stool` (244), `Subgingival_plaque` (590), `Supragingival_plaque` (359), `Throat` (442), `Tongue_dorsum` (324) and `Vaginal_introitus` (126).
+
+The taxa are identified only by the last two levels of their taxonomic classification, so several nodes share the same label (e.g. 23 nodes are labelled `Clostridia(100);Clostridiales(100);`).
+
+The network has the following properties:
+
+- Nodes: `name` and `nodeLabel`, the last two levels of the taxonomic classification of the OTU, each followed by the confidence of the classification in percent in parentheses (e.g. `Prevotellaceae(100);Prevotella(100);`).
+- Edges: `layer`, the body site (numbered from 1 to 18 in the order listed above; the names are stored in the graph property `layer_key`); `weight`, which is always 1."""
+tags = ['Biological', 'Multilayer', 'Unweighted']
+url = 'https://manliodedomenico.com/data.php'
+citation = [('T. Ding and P. D. Schloss, "Dynamics and associations of microbial community types across the human body." Nature 509, 357-360 (2014)', 'https://doi.org/10.1038/nature13178'),
+ ('M. De Domenico and J. Biamonte, "Spectral Entropies as Information-Theoretic Tools for Complex Network Comparison." Physical Review X 6, 041062 (2016)', 'https://doi.org/10.1103/PhysRevX.6.041062')]
+icon_hash = None
+upstream_license = ('Open Data Commons Open Database License (ODbL)', 'https://opendatacommons.org/licenses/odbl/')
+upstream_prefix = 'https://manliodedomenico.com/data'
+# the zip lacks the top-level directory that parse_comunelab expects, so the
+# members are read directly
+files = [(('HumanMicrobiome_Multiplex_Biological.zip:Dataset/HumanMicrobiome_nodes.txt',
+ 'HumanMicrobiome_Multiplex_Biological.zip:Dataset/HumanMicrobiome_multiplex.edges',
+ 'HumanMicrobiome_Multiplex_Biological.zip:Dataset/HumanMicrobiome_layers.txt'),
+ 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
+ g = Graph(directed=False)
+ g.vp.name = g.new_vp("string")
+ g.vp.nodeLabel = g.new_vp("string")
+ g.ep.layer = g.new_ep("int")
+ g.ep.weight = g.new_ep("int")
+ g.gp.layer_key = g.new_gp("object", val={})
+ with open_upstream_file(name, fnames[0], "rb") as fb, \
+ io.TextIOWrapper(fb) as f:
+ next(f)
+ for line in f:
+ i, label = line.split()
+ v = g.add_vertex()
+ assert int(v) == int(i) - 1
+ g.vp.name[v] = g.vp.nodeLabel[v] = label
+ with open_upstream_file(name, fnames[1], "rb") as fb, \
+ io.TextIOWrapper(fb) as f:
+ for line in f:
+ l, i, j, w = line.split()
+ e = g.add_edge(int(i) - 1, int(j) - 1, add_missing=False)
+ g.ep.layer[e] = int(l)
+ g.ep.weight[e] = int(w)
+ with open_upstream_file(name, fnames[2], "rb") as fb, \
+ io.TextIOWrapper(fb) as f:
+ next(f)
+ for line in f:
+ l, label = line.split()
+ g.gp.layer_key[int(l)] = label
+ yield alt, g