History of virion
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/virion/__init__.py b/entries/virion/__init__.py
index 0a98e5e..a1a7ec7 100644
--- a/entries/virion/__init__.py
+++ b/entries/virion/__init__.py
@@ -48,7 +48,7 @@ tags = ['Biological', 'Public Health', 'Unweighted', 'Multigraph', 'Metadata']
url = ['https://zenodo.org/records/23345630', 'https://github.com/viralemergence/virion']
citation = [('C. J. Carlson, R. J. Gibb, G. F. Albery, L. Brierley, R. P. Connor, T. A. Dallas, et al., "The Global Virome in One Network (VIRION): an Atlas of Vertebrate-Virus Associations." mBio 13(2), e02985-21 (2022)',
'https://doi.org/10.1128/mbio.02985-21')]
-icon_hash = None
+date_added = '2026-10-27'
upstream_license = ('Open Data Commons Open Database License (ODbL)',
'https://opendatacommons.org/licenses/odbl/')
upstream_prefix = 'https://zenodo.org/records/23345630/files'
[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/virion/__init__.py b/entries/virion/__init__.py
index e57b69e..0a98e5e 100644
--- a/entries/virion/__init__.py
+++ b/entries/virion/__init__.py
@@ -28,22 +28,22 @@ The network is bipartite and undirected: nodes are the taxa of the VIRION taxono
The network has the following properties:
-- `name`: the scientific name of the taxon (in lower case, as in the database).
-- `is_host`: whether the node is a host (otherwise a virus).
-- `genus`, `family`, `order`, `class`: the taxonomy of the taxon (empty if not available).
-- `ncbi_taxid`: the NCBI taxonomy identifier (-1 if not available).
-- `ncbi_resolved`: whether the name could be harmonized with the NCBI taxonomy.
-- `ictv_ratified`: whether the virus taxon is ratified by the ICTV (false for hosts).
-- `tax_hash`: the key of the taxon in the database.
-- Edge `detection_method`: the strength of the evidence, one of "Isolation/Observation", "PCR/Sequencing", "Antibodies" and "Not specified", in descending order of strength.
-- Edge `detection_original`: the detection method as described in the source.
-- Edge `database`: the source of the record (GenBank, PREDICT, Shaw, HP3, GMPD2 or EID2), and `database_version`, its version or citation.
-- Edge `host_original` and `virus_original`: the names of the host and the virus in the source.
-- Edge `host_flag`: whether there is possible uncertainty in the identification of the host.
-- Edge `publication_year`: the year of publication of the literature source (NaN if not given); `reference`, its text description, and `pmid`, its PubMed identifier (empty if not given).
-- Edge `release_date`: the date the association was released to the public (e.g. the GenBank submission), as "YYYY-MM-DD" or partial ("YYYY", "YYYY-MM"), empty if not given.
-- Edge `collection_date`: the date of collection of the sample, as given (mostly "YYYY-MM-DD" or partial dates; empty if not given).
-- Edge `assoc_id`: the identifier of the record in this version of the database."""
+- (Node) `name`: the scientific name of the taxon (in lower case, as in the database).
+- (Node) `is_host`: whether the node is a host (otherwise a virus).
+- (Node) `genus`, `family`, `order`, `class`: the taxonomy of the taxon (empty if not available).
+- (Node) `ncbi_taxid`: the NCBI taxonomy identifier (-1 if not available).
+- (Node) `ncbi_resolved`: whether the name could be harmonized with the NCBI taxonomy.
+- (Node) `ictv_ratified`: whether the virus taxon is ratified by the ICTV (false for hosts).
+- (Node) `tax_hash`: the key of the taxon in the database.
+- (Edge) `detection_method`: the strength of the evidence, one of "Isolation/Observation", "PCR/Sequencing", "Antibodies" and "Not specified", in descending order of strength.
+- (Edge) `detection_original`: the detection method as described in the source.
+- (Edge) `database`: the source of the record (GenBank, PREDICT, Shaw, HP3, GMPD2 or EID2), and `database_version`, its version or citation.
+- (Edge) `host_original` and `virus_original`: the names of the host and the virus in the source.
+- (Edge) `host_flag`: whether there is possible uncertainty in the identification of the host.
+- (Edge) `publication_year`: the year of publication of the literature source (NaN if not given); `reference`, its text description, and `pmid`, its PubMed identifier (empty if not given).
+- (Edge) `release_date`: the date the association was released to the public (e.g. the GenBank submission), as "YYYY-MM-DD" or partial ("YYYY", "YYYY-MM"), empty if not given.
+- (Edge) `collection_date`: the date of collection of the sample, as given (mostly "YYYY-MM-DD" or partial dates; empty if not given).
+- (Edge) `assoc_id`: the identifier of the record in this version of the database."""
tags = ['Biological', 'Public Health', 'Unweighted', 'Multigraph', 'Metadata']
url = ['https://zenodo.org/records/23345630', 'https://github.com/viralemergence/virion']
citation = [('C. J. Carlson, R. J. Gibb, G. F. Albery, L. Brierley, R. P. Connor, T. A. Dallas, et al., "The Global Virome in One Network (VIRION): an Atlas of Vertebrate-Virus Associations." mBio 13(2), e02985-21 (2022)',
[entries] New entry: virion 8ac3241
diff --git a/entries/virion/__init__.py b/entries/virion/__init__.py
new file mode 100644
index 0000000..e57b69e
--- /dev/null
+++ b/entries/virion/__init__.py
@@ -0,0 +1,128 @@
+#! /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 *
+import csv
+import math
+
+title = "VIRION vertebrate-virus associations (2026)"
+description = """The Global Virome in One Network (VIRION), an atlas of the known associations between vertebrate hosts and their viruses, maintained by the Verena consortium (C. J. Carlson and collaborators). VIRION reconciles static datasets compiled from the literature (CLOVER, which harmonizes the host-pathogen databases of Shaw et al. 2020, HP3 of Olival et al. 2017, GMPD2 of Stephens et al. 2017 and EID2 of Wardeh et al. 2015) with dynamically updated sources (the virus sequences of NCBI GenBank and the USAID PREDICT surveillance data), and harmonizes all host and virus names against the NCBI taxonomy (and the ICTV taxonomy for viruses). This is the data package of 13 October 2026 (the database is released weekly). Two of the sources are also separate entries: `mammal_virus_hp3` (HP3) and `host_pathogen_eid2` (EID2, which covers all kinds of pathogens).
+
+The network is bipartite and undirected: nodes are the taxa of the VIRION taxonomy table (vertebrate hosts, marked by the property `is_host`, and viruses), and each edge is one record of the database, i.e. one piece of evidence that a virus infects a host (e.g. a GenBank sequence, a literature report, or a PREDICT test), so that the network is a multigraph: a host and a virus are connected by as many edges as there are records of their association. Nodes are identified by the taxon key of the database (`tax_hash`), not by the name: some names occur in several taxon entries with different taxonomic information (e.g. NCBI-resolved or not). The NCBI accession numbers of the sequences (a separate table of the data package) are not included. A few records (1,069) are encoded in Latin-1 instead of UTF-8, which were converted.
+
+The network has the following properties:
+
+- `name`: the scientific name of the taxon (in lower case, as in the database).
+- `is_host`: whether the node is a host (otherwise a virus).
+- `genus`, `family`, `order`, `class`: the taxonomy of the taxon (empty if not available).
+- `ncbi_taxid`: the NCBI taxonomy identifier (-1 if not available).
+- `ncbi_resolved`: whether the name could be harmonized with the NCBI taxonomy.
+- `ictv_ratified`: whether the virus taxon is ratified by the ICTV (false for hosts).
+- `tax_hash`: the key of the taxon in the database.
+- Edge `detection_method`: the strength of the evidence, one of "Isolation/Observation", "PCR/Sequencing", "Antibodies" and "Not specified", in descending order of strength.
+- Edge `detection_original`: the detection method as described in the source.
+- Edge `database`: the source of the record (GenBank, PREDICT, Shaw, HP3, GMPD2 or EID2), and `database_version`, its version or citation.
+- Edge `host_original` and `virus_original`: the names of the host and the virus in the source.
+- Edge `host_flag`: whether there is possible uncertainty in the identification of the host.
+- Edge `publication_year`: the year of publication of the literature source (NaN if not given); `reference`, its text description, and `pmid`, its PubMed identifier (empty if not given).
+- Edge `release_date`: the date the association was released to the public (e.g. the GenBank submission), as "YYYY-MM-DD" or partial ("YYYY", "YYYY-MM"), empty if not given.
+- Edge `collection_date`: the date of collection of the sample, as given (mostly "YYYY-MM-DD" or partial dates; empty if not given).
+- Edge `assoc_id`: the identifier of the record in this version of the database."""
+tags = ['Biological', 'Public Health', 'Unweighted', 'Multigraph', 'Metadata']
+url = ['https://zenodo.org/records/23345630', 'https://github.com/viralemergence/virion']
+citation = [('C. J. Carlson, R. J. Gibb, G. F. Albery, L. Brierley, R. P. Connor, T. A. Dallas, et al., "The Global Virome in One Network (VIRION): an Atlas of Vertebrate-Virus Associations." mBio 13(2), e02985-21 (2022)',
+ 'https://doi.org/10.1128/mbio.02985-21')]
+icon_hash = None
+upstream_license = ('Open Data Commons Open Database License (ODbL)',
+ 'https://opendatacommons.org/licenses/odbl/')
+upstream_prefix = 'https://zenodo.org/records/23345630/files'
+files = [(('virion.csv.gz', 'tax_table.csv.gz', 'db_table.csv'), None, None)]
+
+def fetch_upstream(force=False):
+ return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+ force)
+
+def decoded_lines(f):
+ # a few lines are encoded in Latin-1 instead of UTF-8
+ for line in f:
+ try:
+ yield line.decode("utf8")
+ except UnicodeDecodeError:
+ yield line.decode("latin-1")
+
+def partial_date(y, m, d):
+ return "-".join(x.zfill(2) for x in (y, m, d) if x not in ("", "NA")) if y not in ("", "NA") else ""
+
+def na(x):
+ return "" if x == "NA" else x
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+ name = __name__.split(".")[-1]
+ with open_upstream_file(name, "db_table.csv", "r") as f:
+ dbs = {r["DatabaseVersion"]: r["Database"] for r in csv.DictReader(f)}
+ with open_upstream_file(name, "tax_table.csv.gz", "r") as f:
+ tax = list(csv.DictReader(f))
+
+ g = Graph(directed=False)
+ g.add_vertex(len(tax))
+ vidx = {r["TaxHashID"]: i for i, r in enumerate(tax)}
+ assert len(vidx) == len(tax)
+ g.vp.name = g.new_vp("string", vals=[r["ScientificName"] for r in tax])
+ for p, c in [("genus", "Genus"), ("family", "Family"), ("order", "Order"),
+ ("class", "Class")]:
+ g.vp[p] = g.new_vp("string", vals=[na(r[c]) for r in tax])
+ g.vp.ncbi_taxid = g.new_vp("int64_t", vals=[int(r["NCBITaxID"]) if r["NCBITaxID"] not in ("", "NA") else -1
+ for r in tax])
+ g.vp.ncbi_resolved = g.new_vp("bool", vals=[r["NCBIResolved"] == "TRUE" for r in tax])
+ g.vp.ictv_ratified = g.new_vp("bool", vals=[r["ICTVRatified"] == "TRUE" for r in tax])
+ g.vp.tax_hash = g.new_vp("string", vals=[r["TaxHashID"] for r in tax])
+ g.vp.is_host = g.new_vp("bool")
+
+ eprops = [("detection_method", "string"), ("detection_original", "string"),
+ ("database", "string"), ("database_version", "string"),
+ ("host_original", "string"), ("virus_original", "string"),
+ ("host_flag", "bool"), ("publication_year", "double"),
+ ("reference", "string"), ("pmid", "string"),
+ ("release_date", "string"), ("collection_date", "string"),
+ ("assoc_id", "int64_t")]
+ for p, t in eprops:
+ g.ep[p] = g.new_ep(t)
+ viruses = set()
+ def edges():
+ with open_upstream_file(name, "virion.csv.gz", "rb") as f:
+ for r in csv.DictReader(decoded_lines(f)):
+ h, v = vidx[r["HostTaxHashID"]], vidx[r["VirusTaxHashID"]]
+ g.vp.is_host.a[h] = True
+ viruses.add(v)
+ pyear = r["PublicationYear"]
+ yield (h, v, r["DetectionMethod"], na(r["DetectionOriginal"]),
+ dbs[r["DatabaseVersion"]], r["DatabaseVersion"],
+ r["HostOriginal"], na(r["VirusOriginal"]),
+ r["HostFlagID"] == "TRUE",
+ float(pyear) if pyear not in ("", "NA") else math.nan,
+ na(r["ReferenceText"]), na(r["PMID"]),
+ na(r["Release_Date"]) or partial_date(r["ReleaseYear"], r["ReleaseMonth"], r["ReleaseDay"]),
+ na(r["Collection_Date"]) or partial_date(r["CollectionYear"], r["CollectionMonth"], r["CollectionDay"]),
+ int(r["AssocID"]))
+ g.add_edge_list(edges(), eprops=[g.ep[p] for p, t in eprops])
+ assert not any(g.vp.is_host.a[v] for v in viruses)
+ yield None, g