HIV-1 subtype B mobility in Europe

From The GenGIS wiki
Jump to: navigation, search

Paraskevis et al. (2009) recently used a phylogeographic analyses to determine rates of import and export of HIV-1 subtype B for seventeen European countries. To gain insight into how HIV-1 subtype B is spreading within Europe requires investigating the rates of import and export between these countries. Here we demonstrate how a custom data visualization can be quickly implemented within GenGIS in order to interactive explore this dataset. To follow along with this tutorial download the data:

To explore this data we first need to load a map of Europe along with a location set file indicating the geographic position of the seventeen countries considered by Paraskevis et al. You can load in this data files through the GenGIS graphical interface or using the Python console:

import os

We can access the location layers using:

locLayers = GenGIS.layerTree.GetLocationSetLayer(0).GetAllLocationLayers()

We can now import our class for visualizing information in a distance matrix:

import DistMatrix as dm
hivDistMatrix = dm.DistMatrix('migrations.dst', locLayers )

Lines indicating the relative rates of mobility of HIV-1 subtype B between two countries can be drawn using the DrawLines method. For example, the relative rate of 'export' from Spain (ESP) to Greece (GRC), Italy (ITA), Portugal (PRT), and Luxemburg (LUX) is given by:

hivDistMatrix.DrawLines([['ESP','GRC'],['ESP', 'ITA'],['ESP', 'PRT'],['ESP','LUX']])

This will result in the visualization on the left. The relative rates of 'export' of HIV-1 subtype B is indicated by increasing the thickness and lightness of the line with increasing rates of export. This function allows a priori hypotheses about the relative reates of 'export' and 'import' to be quickly investigated. To investigate a new hypothesis, the current display can be cleared using the clearLines() function. We can also investigate the data in a more exploratory manner. The DistMatrix class provides a function for showing the most significant 'exporters' or 'importers' for a country. For example, we can determine the top three countries Britian (GBR), Poland (POL), and Italy (ITA) export to as follows:
hivDistMatrix.DrawTopEntries('GBR', 3, True, True)
hivDistMatrix.DrawTopEntries('POL', 3, True, True)
hivDistMatrix.DrawTopEntries('ITA', 3, True, True)

The results are shown in the visualization on the right. It shows that Poland is not a primary exporter as discussed by Paraskevis et al. (2009). New functionality can easily be added to the DistMatrix class to allow other aspects of the data to be quickly investigated such as:

  • What are the top exporting countries? What countries do they primarily export to?
  • Which pairs of countries have an import or export rate above or below a given level?
Relative rate of 'export' of HIV-1 subtype B from Spain (ESP) to Greece (GRC), Italy (ITA), Portugal (PRT), and Luxembourg (LUX).
Top three countries Britain (GBR), Poland (POL), and Italy (ITA) export H1V-1 subtype B to.