History of malaria_genes
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] Fix parse bugs and improve the metadata of existing entries c996a0e
From a review of the dataset descriptions against the upstream sources and papers, and from user reports: - parse fixes (wrong edge direction or directedness, shifted or misnamed properties, merged node identities, duplicated or missing edges and nodes, wrong types), e.g. arxiv_citation (the HepTh dates were a copy of the HepPh ones; now from the KDD Cup 2003 data), eu_procurements, foursquare_global, hiv_transmission, genetic_multiplex, gnutella (adds the 05 snapshot), roadnet, macaque_neural, python_dependency - descriptions rewritten from the upstream sources, documenting every property - corrected titles, citations and DOIs, licences (ustream_license typo, the data's own terms), tags and ICON ids - url lists for entries with several sources or dataset pages - SocioPatterns entries moved to the site's new data location, with the daily networks of sp_infectious and sp_primary_school - the Michael Fire entries marked as orphans (served from the mirror) - redundant type forcings removed after the graph-tool coercion fixes
diff --git a/entries/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index 8ff80c5..1ccf507 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__init__.py
@@ -21,13 +21,21 @@ from .. import *
import csv
title = "Malaria var DBLa HVR networks"
-description = """Networks of recombinant antigen genes from the human malaria parasite P. falciparum. Each of the 9 networks shares the same set of vertices but has different edges, corresponding to the 9 highly variable regions (HVRs) in the DBLa domain of the var protein. Nodes are var genes, and two genes are connected if they share a substring whose length is statistically significant. Metadata includes two types of node labels, both based on sequence structure around HVR6.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+description = """Networks of recombinant *var* genes of the human malaria parasite *Plasmodium falciparum*, constructed by D. B. Larremore, A. Clauset and C. O. Buckee. The *var* genes encode the PfEMP1 antigens and diversify mainly by recombination. The data comprise the DBLα domains of 307 *var* genes from seven parasite genomes, sequenced by Rask et al. (PLOS Comput. Biol. 6, e1000933, 2010). The DBLα domain was divided into nine highly variable regions (HVRs) separated by conserved sequence blocks, and a separate network was built for each HVR: nodes are genes, and two genes are connected if their sequences at that HVR share an amino acid substring whose length is statistically significant, i.e. too long to be expected by chance, indicating a recombination event.
+
+The networks `HVR_1` to `HVR_9` correspond to the nine HVRs; they share the same set of 307 nodes (the node index identifies the same gene in all networks) but have different edges. The network `combined` is a multilayer network containing the edges of all nine HVRs.
+
+The networks have the following properties:
+
+- `name`: the index of the gene (1 to 307), in the order of the source files.
+- `CysPoLV`: the Cys-PoLV group of the gene (1 to 6), a classification of DBLα sequences based on the number of cysteines and on sequence motifs near HVR6.
+- `UPS`: the upstream promoter sequence group of the gene, with 1 = A, 2 = B, 3 = C, and -1 if no UPS was identified.
+- `HVR` (`combined` only): the HVR (1 to 9) in which the edge occurs."""
tags = ['Biological', 'Genetic', 'Unweighted', 'Projection', 'Metadata', 'Multilayer']
url = 'https://github.com/dblarremore/data_malaria_PLOSCompBiology_2013'
citation = [('D. B. Larremore, A. Clauset, and C. O. Buckee, "A network approach to analyzing highly recombinant malaria parasite genes." PLOS Computational Biology 9(10), e1003268 (2013).', 'https://doi.org/10.1371/journal.pcbi.1003268')]
icon_hash = '56a85c8e26855e083a2f7940'
-ustream_license = None
+upstream_license = None
upstream_prefix = 'https://raw.githubusercontent.com/dblarremore/data_malaria_PLOSCompBiology_2013/master'
files = [((f'HVR_{i}.txt', "metadata_CysPoLV.txt", "metadata_UPS.txt"), f'HVR_{i}', 'csv') for i in range(1, 10)] + \
[([f'HVR_{i}.txt' for i in range(1, 10)] + ["metadata_CysPoLV.txt", "metadata_UPS.txt"], f'combined', 'csv')]
@@ -58,9 +66,9 @@ def parse(alts=None):
for row in reader:
yield [int(x) for x in row] + [i + 1]
g = Graph(directed=False)
- g.ep.HRV = g.new_ep("int")
+ g.ep.HVR = g.new_ep("int")
g.vp.name = g.add_edge_list(get_edges(), hashed=True,
- hash_type="int", eprops=[g.ep.HRV])
+ hash_type="int", eprops=[g.ep.HVR])
vs = {int(g.vp.name[v]) : v for v in g.vertices()}
Update copyright information 73a4f0d
diff --git a/entries/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index 8e2f703..8ff80c5 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__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/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index 303a82c..8e2f703 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__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/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index 5bf4591..303a82c 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__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/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index b7f2340..5bf4591 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__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
Update citations to use DOIs e878874
diff --git a/entries/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index 676d77e..b7f2340 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__init__.py
@@ -25,7 +25,7 @@ description = """Networks of recombinant antigen genes from the human malaria pa
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Genetic', 'Unweighted', 'Projection', 'Metadata', 'Multilayer']
url = 'https://github.com/dblarremore/data_malaria_PLOSCompBiology_2013'
-citation = [('D. B. Larremore, A. Clauset, and C. O. Buckee, "A network approach to analyzing highly recombinant malaria parasite genes." PLOS Computational Biology 9(10), e1003268 (2013).', 'http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003268')]
+citation = [('D. B. Larremore, A. Clauset, and C. O. Buckee, "A network approach to analyzing highly recombinant malaria parasite genes." PLOS Computational Biology 9(10), e1003268 (2013).', 'https://doi.org/10.1371/journal.pcbi.1003268')]
icon_hash = '56a85c8e26855e083a2f7940'
ustream_license = None
upstream_prefix = 'https://raw.githubusercontent.com/dblarremore/data_malaria_PLOSCompBiology_2013/master'
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index b4b0009..676d77e 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__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/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
index 69ba5ac..b4b0009 100644
--- a/entries/malaria_genes/__init__.py
+++ b/entries/malaria_genes/__init__.py
@@ -21,7 +21,8 @@ from .. import *
import csv
title = "Malaria var DBLa HVR networks"
-description = "Networks of recombinant antigen genes from the human malaria parasite P. falciparum. Each of the 9 networks shares the same set of vertices but has different edges, corresponding to the 9 highly variable regions (HVRs) in the DBLa domain of the var protein. Nodes are var genes, and two genes are connected if they share a substring whose length is statistically significant. Metadata includes two types of node labels, both based on sequence structure around HVR6."
+description = """Networks of recombinant antigen genes from the human malaria parasite P. falciparum. Each of the 9 networks shares the same set of vertices but has different edges, corresponding to the 9 highly variable regions (HVRs) in the DBLa domain of the var protein. Nodes are var genes, and two genes are connected if they share a substring whose length is statistically significant. Metadata includes two types of node labels, both based on sequence structure around HVR6.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Genetic', 'Unweighted', 'Projection', 'Metadata', 'Multilayer']
url = 'https://github.com/dblarremore/data_malaria_PLOSCompBiology_2013'
citation = [('D. B. Larremore, A. Clauset, and C. O. Buckee, "A network approach to analyzing highly recombinant malaria parasite genes." PLOS Computational Biology 9(10), e1003268 (2013).', 'http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003268')]
Initial commit cc85872
diff --git a/entries/malaria_genes/__init__.py b/entries/malaria_genes/__init__.py
new file mode 100644
index 0000000..69ba5ac
--- /dev/null
+++ b/entries/malaria_genes/__init__.py
@@ -0,0 +1,84 @@
+#! /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 *
+
+import csv
+
+title = "Malaria var DBLa HVR networks"
+description = "Networks of recombinant antigen genes from the human malaria parasite P. falciparum. Each of the 9 networks shares the same set of vertices but has different edges, corresponding to the 9 highly variable regions (HVRs) in the DBLa domain of the var protein. Nodes are var genes, and two genes are connected if they share a substring whose length is statistically significant. Metadata includes two types of node labels, both based on sequence structure around HVR6."
+tags = ['Biological', 'Genetic', 'Unweighted', 'Projection', 'Metadata', 'Multilayer']
+url = 'https://github.com/dblarremore/data_malaria_PLOSCompBiology_2013'
+citation = [('D. B. Larremore, A. Clauset, and C. O. Buckee, "A network approach to analyzing highly recombinant malaria parasite genes." PLOS Computational Biology 9(10), e1003268 (2013).', 'http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003268')]
+icon_hash = '56a85c8e26855e083a2f7940'
+ustream_license = None
+upstream_prefix = 'https://raw.githubusercontent.com/dblarremore/data_malaria_PLOSCompBiology_2013/master'
+files = [((f'HVR_{i}.txt', "metadata_CysPoLV.txt", "metadata_UPS.txt"), f'HVR_{i}', 'csv') for i in range(1, 10)] + \
+ [([f'HVR_{i}.txt' for i in range(1, 10)] + ["metadata_CysPoLV.txt", "metadata_UPS.txt"], f'combined', 'csv')]
+
+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
+ if isinstance(fnames, str):
+ fnames = [fnames]
+ with ExitStack() as stack:
+ fs = [stack.enter_context(open_upstream_file(name, fn, "rb" if fn.startswith("HVR") else "r")) for fn in fnames]
+ if alt != "combined":
+ g = parse_graph([fs[0]], fmt, directed=False)
+ else:
+ def get_edges():
+ for i, f in enumerate(fs[:9]):
+ reader = csv.reader(io.TextIOWrapper(f))
+ for row in reader:
+ yield [int(x) for x in row] + [i + 1]
+ g = Graph(directed=False)
+ g.ep.HRV = g.new_ep("int")
+ g.vp.name = g.add_edge_list(get_edges(), hashed=True,
+ hash_type="int", eprops=[g.ep.HRV])
+
+ vs = {int(g.vp.name[v]) : v for v in g.vertices()}
+
+ for i in range(307):
+ if i + 1 not in vs:
+ vs[i+1] = v = g.add_vertex()
+ g.vp.name[v] = i + 1
+
+ g.vp.CysPoLV = g.new_vp("int")
+ for i, line in enumerate(fs[-2]):
+ g.vp.CysPoLV[vs[i+1]] = int(line)
+
+ g.vp.UPS = g.new_vp("int", val=-1)
+ for i, line in enumerate(fs[-1]):
+ try:
+ g.vp.UPS[vs[i+1]] = int(line)
+ except ValueError:
+ continue
+
+ g = Graph(g, vorder=g.vp.name)
+
+ yield alt, g