Similarity Maps - Visualizing Antipsychotic Affinities : Part Two

Similarity Maps - Visualizing Antipsychotic Affinities : Part Two

 

Introduction

In Part One, we visualized the receptor-ligand affinities for commonly prescribed antipsychotic medications, which is really not much more than a graphical table of pKi values.  It's more interesting to explore the relationships between them, and that requires us to shift from thinking about the data as cells in a grid to thinking about the receptor affinities as co-ordinates.  As an example, if we take Haloperidol, we can plot the D1 affinity (pKi) on the horizontal axis, and it's D2 affinity on the vertical axis.  Further, we can do this for another couple of medications (say, Quetiapine and Aripiprazole) and we end up with:

Figure One

Figure One

From this representation, we can see that Aripiprazole and Haloperidol have similar D1 and D2 affinities (note the axes scales), whereas Quetiapine is somewhat different, having about an order of magnitude less D1 affinity that Haloperidol and about 3 orders of magnitude less D2 affinity than both Haloperidol and Aripiprazole (as an aside, the action of Aripiprazole at the receptor is partial agonism at D2, whereas Haloperidol and Quetiapine are antagonists [2]).  In terms of D1 affinity, Clozapine is very similar to Aripiprazole but is more similar to Quetiapine than Aripiprazole or Haloperidol for D2 affinity.  These relationships (on a 2-dimensional plane) are lost if we only look at D1 or D2 in isolation.

For 2 receptors, there is an obvious planar (2-dimensional) co-ordinate representation, and we can easily visualize the "profile" of receptor affinities for any number of medications - some will be close together, and others farther apart, depending on their relative receptor-ligand pKi values.  Generally, the closer two medications are to each other, the more similar their receptor affinity profile is. 

We can get away with 3 receptors, by adding another axis at 90 degrees to both the horizontal and vertical axes (coming "out of the page"), but then we're stuck.   For the 5 dopamine receptors (D1-D5) we would require a 5-dimensional space to plot each medication's affinity profile, and this is imaginable if not practically realizable.

One solution to this is to switch to a representation that uses similarities between medications based on the relative distances between their receptor affinities.  We then use multidimensional scaling (MDS) to find a way to visualize this in two dimensions.  A quick metaphor for MDS helps: take an object in a 3-dimensional space like a chair, and place it a metre away from a wall. Take a torch, face the wall and shine it directly at the chair - the shadow of the chair on the wall is a 2-D representation of the 3-D object.  Importantly, notice that e.g. the relationships between the spaces between the chair legs may be partially preserved, or lost if occluded by each other in the "flattened" shadow.  MDS suffers the same problem, as we'll see.  If you're familiar with MDS, you can skip the next section.

A Quick Primer on MDS

Let's use a simple geographical example; take the longitude and latitude of four cities, London, Valencia (Spain), Stanley (Falkland Islands) and Natal (Brazil).  The relationships between them can be easily visualized as a 2D map:

Figure Two

Figure Two

The data looks like this:

Lat Long
London 51.50 -0.11
Valencia 39.46 -0.37
Stanley -51.56 -59.82
Natal -5.78 -35.20

Analogously, Longitude and Latitude would correspond to D1 and D2 affinity in the previous example.  We now convert these positions (co-ordinates) into a matrix of pair-wise distances.  In this context, "distance" means the straight-line ("as the crow flies", or Euclidean) distance.

London Valencia Stanley Natal
London 0.00 12.04 119.11 67.17
Valencia 0.00 108.71 57.09
Stanley 0.00 51.98
Natal 0.00

Pairwise distance matrices are symmetric (if the way we measure distance conforms the mathematical definition of a metric in a space) so we show only the unique distances (values above the diagonal)  because the distance from London to Natal is the same as the distance from Natal to London.  Note that the distance from one city to itself is - logically - zero.  This matrix captures relative relationships between co-ordinate points, but the cost is we lose the absolute co-ordinate information - this means we cannot reconstruct Figure Two from the pairwise distance matrix; the transformation from co-ordinate representation (Figure One) to the distance matrix is a one-way transform. 

For each pair of cities, we now have a single number representing the distance between them.   Now, we use a metric multidimensional scaling (MDS) algorithm that is designed to perform the following

Given a set of data (points) in a native M dimensional space, find a graphical representation (an embedding) in a lower N dimensional space, where N < M such that the distance between each point in the reduced N dimensional space approximates the distance in the native M dimensional space.

For the cities example:

Given a set of four points (cities) in the native M = 2 dimensional space (the plane consisting of axes corresponding to longitude and latitude), find a graphical representation in a lower N = 1 dimensional space (e.g. along a simple line, the lowest-dimensional and meaningful visualization for M = 2) such that the distance between and two cities (London and Natal, or Stanley and Valencia etc.) on the line is proportional to the distance between them in the native 2 dimensional place of longitude and lattitude.

Here's the result of embedding the cities by MDS onto the 1-dimensional line:

Figure Three

Figure Three

Comparing Figure Two and Three, we can see that the relative distances are reasonably preserved (e.g. Natal is closer to Stanley than Valencia and London is furthest from Stanley).  This method is not without it's flaws - recall the chair/shadow analogy above - which we can see by looking at the example below, where we have introduced a fictional city (Errorsville):

Figure Four

Figure Four

Performing the same MDS from two to one dimension yields:

Figure Five

Figure Five

Despite Errorsville being roughly equidistant (in 2 dimensions, Figure Four) to London and Valencia, the inevitable distortion introduced by reducing dimensions and embedding the data in the lower (1 dimensional) space erroneously places them at the same location.  This distortion will become relevant later, and we'll look at a way to circumvent it for looking at medications with similar binding profiles.

Data Pre-processing

We begin by mining the PDSP database [1] just as we did in Part One (e.g. selecting human/cloned receptors).  We select dopamine receptors, but collect together synonyms like "D1" and "DOPAMINE D1" and average.  We need complete data to use MDS, so use only medications with complete D1-D5 coverage in the PDSP database.  This yields a set of data, which can be visualized as before:

Processing for Visualization

Let's proceed with the 12 medications for which we have complete coverage of D1-D5.  We have a 5-dimensional space (i.e. each 'axis' represents affinity for one of the five common dopamine receptors).  We compute the pairwise distances (between the 12 medications) and apply metric MDS with the goal of embedding this 5-dimensional structure in 2-dimensions (a plane).  The important principle here is that larger distances equate to less similarity (and vice versa); the distance between two medications in the 5-dimensional space is proportional to the similarity of their receptor binding profiles.  We then attempt to keep these relative distances preserved as we find a way to embed in 2-dimensions.

Recall the distortion problem, introduced by embedding a higher-dimensional space into a lower dimensional representation: two separate points in the 5D space can end up being embedded in such a way that they are (incorrectly) positioned at approximately the same point in the reduced 2D embedding (so information is lost). 

We ameliorate this as follows:

  1. Plot the medication's receptor similarities in a 2D embedding, tolerating any distortion
  2. Using the matrix of pairwise distances in the native 5D space: For each medication, A, compute the 1st nearest neighbour i.e. the medication B with the smallest distance A to B.
  3. Back in the visualized 2D embedding, join medication A to it's nearest neighbour B.
  4. Repeat steps 2-3 for each medication

This results in a concise 2D representation, and for each medication, an arrow indicating it's the most similar medication (on receptor affinity profile).  The result:

Figure 6

Figure 6

So, to read this:

  1. Medications close together in the 2D embedding should have more similar receptor profiles (D1 through D5 affinities)
  2. The directional arrow shows, for any medication, it's closest neighbour measured in the native 5D space - so of course, the distances on the plane might not always marry with the nearest neighbour arrow which is really the 'ground truth'.  The direction of the arrow is read from A to B as "the receptor affinity of A is closest to B".
  3. The axes cannot be read meaningfully in terms of absolute affinities (as our grid/heatmap representation was) - rather, we can look at the space of relative similarities in receptor affinity profiles.

Note how the graph is crowded around ILO, ZIP and RIS (iloperidone, ziprasidone and risperidone), so we'll zoom in for some clarity:

Figure 7

Figure 7

 
 

Next Steps ...

So now, we can visualise the relative receptor affinity profiles for D1-D5.  Using MDS is not the only way of embedding / dimensionality reduction; we could have used PCA (or a host of other embedding methods - see here), but my view was the resulting maps were less straightforward to read.  In the next post, we'll do the same for serotonin receptors, and look at ways of combining dopamine/serotonin affinities to arrive at a larger "grand" map of similarities.

References:

  1. The Multiplicity of Serotonin Receptors: Uselessly diverse molecules or an embarrasment of riches? BL Roth, WK Kroeze, S Patel and E Lopez: The Neuroscientist, 6:252-262, 2000
  2. Wishart DS, Feunang YD, Guo AC, Lo EJ, Marcu A, Grant JR, Sajed T, Johnson D, Li C, Sayeeda Z, Assempour N, Iynkkaran I, Liu Y, Maciejewski A, Gale N, Wilson A, Chin L, Cummings R, Le D, Pon A, Knox C, Wilson M. DrugBank 5.0: a major update to the DrugBank database for 2018. Nucleic Acids Res. 2017 Nov 8. doi: 10.1093/nar/gkx1037. 

 
Similarity Maps for Antipsychotic Medications - Dopamine and Serotonin Receptor  Affinities : Part Three

Similarity Maps for Antipsychotic Medications - Dopamine and Serotonin Receptor Affinities : Part Three

Visualizing Antipsychotic Receptor Affinity : Part One

Visualizing Antipsychotic Receptor Affinity : Part One