# Integration of Disease Similarity Methods

####
Min Li (limin@mail.csu.edu.cn) Peng Ni (nipeng@csu.edu.cn)
School of Information Science and Engineering, Central South University, Changsha, 410083, China.

#### 2017-04-24

# Contents

# 1 Abstract

Discovering disease-disease simialrties can be useful for us to inferring the mechanisms of complex diseases. Disease similarity has become the important basis in disease-related molecular function research. There have been a number of methods proposed for measuring disease similarity in recent years. But there are lacks of tools or web servers for the computation of these methods. We present an R package dSimer which provides computation of nine methods for measuring disease-disease similarity, including a standard cosine similarity measure and eight function-based methods. The disease similarity matrix obtained from these nine methods can be visualized through heatmap and network. Biological data widely used in disease-disease associations study are also provided by dSimer.

# 2 Introduction

The quantification of similarity among diseases has drawn more and more attention in modern biology and medicine. Understanding similarity among diseases can not only help us gain deeper insights into complex diseases, but also lead to improvements in disease diagnosis, drug repurposing and new drug development. Due to the growing body of high-throughput biological data such as genomic and proteomic data, a number of methods have been proposed for the computation of similarity among diseases during the past decade.

Here we present dSimer for the calculation of nine disease similarity methods, including one standard cosine similarity method [1, 2] and eight function-based methods which compare disease-related gene set for calculating [3]. Besides, we also implemented methods for the visualization of disease similarity matrix.

To start with dSimer package, type following codes below:

    library(dSimer)
    help("dSimer")

# 3 The standard cosine similarity method

The cosine similarity method is a widely used standard measure in disease association analyses [1, 2]. First it constructs feature vectors for diseases from literature or by using other biological data. Then it calculate the cosine of the angle between normalized vector pairs as the similarity scores between diseases. We implemented function CosineDFV for this method:

    data(d2s_hsdn) #get disease-symptom associations for constructing feature vectors
    ds <- sample(unique(d2s_hsdn[,2]), 5) #get disease names sample
    simmat <- CosineDFV(ds, ds, d2s_hsdn)
    simmat

    ##                                  Lordosis Reye Syndrome Coronary Disease
    ## Lordosis                       1.00000000    0.00000000      0.022096865
    ## Reye Syndrome                  0.00000000    1.00000000      0.037650843
    ## Coronary Disease               0.02209687    0.03765084      1.000000000
    ## Pulmonary Subvalvular Stenosis 0.00000000    0.00000000      0.013494002
    ## Carcinoma, Mucoepidermoid      0.12698898    0.00000000      0.001095764
    ##                                Pulmonary Subvalvular Stenosis
    ## Lordosis                                             0.000000
    ## Reye Syndrome                                        0.000000
    ## Coronary Disease                                     0.013494
    ## Pulmonary Subvalvular Stenosis                       1.000000
    ## Carcinoma, Mucoepidermoid                            0.000000
    ##                                Carcinoma, Mucoepidermoid
    ## Lordosis                                     0.126988977
    ## Reye Syndrome                                0.000000000
    ## Coronary Disease                             0.001095764
    ## Pulmonary Subvalvular Stenosis               0.000000000
    ## Carcinoma, Mucoepidermoid                    1.000000000

# 4 Function-based methods

## 4.1 BOG

BOG [4] is a method for disease similarity calculating only using disease-gene associations. We designed function BOG to implement this method. And for the purpose of normalizing the matrix produced by method BOG, we implemented function Normalize. For example:

    data(d2g_separation) #get disease-gene associations
    ds<-sample(names(d2g_separation),5)
    ds

    ## [1] "spastic paraplegia, hereditary"
    ## [2] "epilepsy"
    ## [3] "adrenal gland diseases"
    ## [4] "bone diseases, metabolic"
    ## [5] "gram-positive bacterial infections"

    sim<-BOG(ds,ds,d2g_separation)
    Normalize(sim) #normalize BOG sim scores

    ##                                    spastic paraplegia, hereditary epilepsy
    ## spastic paraplegia, hereditary                          0.1881795        0
    ## epilepsy                                                0.0000000        1
    ## adrenal gland diseases                                  0.0000000        0
    ## bone diseases, metabolic                                0.0000000        0
    ## gram-positive bacterial infections                      0.0000000        0
    ##                                    adrenal gland diseases
    ## spastic paraplegia, hereditary                0.000000000
    ## epilepsy                                      0.000000000
    ## adrenal gland diseases                        0.249173813
    ## bone diseases, metabolic                      0.001373985
    ## gram-positive bacterial infections            0.000000000
    ##                                    bone diseases, metabolic
    ## spastic paraplegia, hereditary                  0.000000000
    ## epilepsy                                        0.000000000
    ## adrenal gland diseases                          0.001373985
    ## bone diseases, metabolic                        0.028208479
    ## gram-positive bacterial infections              0.000000000
    ##                                    gram-positive bacterial infections
    ## spastic paraplegia, hereditary                             0.00000000
    ## epilepsy                                                   0.00000000
    ## adrenal gland diseases                                     0.00000000
    ## bone diseases, metabolic                                   0.00000000
    ## gram-positive bacterial infections                         0.02873275

Note that disease-gene associations d2g_separation is a list object that can be obtained by function x2y_df2list. Function x2y_df2list take a data.frame which has two columns (one column contains disease ids and one column contains gene ids, each row declares an association between a disease and a gene) as a input. See an example below:

    options(stringsAsFactors = FALSE) #this may be neccessary

    d2g_fundo_sample<-read.table(text = "DOID:5218    IL6
    DOID:8649  EGFR
    DOID:8649   PTGS2
    DOID:8649   VHL
    DOID:8649   ERBB2
    DOID:8649   PDCD1
    DOID:8649   KLRC1
    DOID:5214   MPZ
    DOID:5214   EGR2
    DOID:5210   AMH")

    d2g_fundo_list<-x2y_df2list(d2g_fundo_sample)
    d2g_fundo_list

    ## $`DOID:5218`
    ## [1] "IL6"
    ##
    ## $`DOID:8649`
    ## [1] "EGFR"  "PTGS2" "VHL"   "ERBB2" "PDCD1" "KLRC1"
    ##
    ## $`DOID:5214`
    ## [1] "MPZ"  "EGR2"
    ##
    ## $`DOID:5210`
    ## [1] "AMH"

Function Normalize normalize a matrix or a vector as the following formula: \[NormScore=\frac{OrigScore-MinScore}{MaxScore-MinScore}\]

Here’s an example:

    m<-matrix(1:9,3,3)
    m

    ##      [,1] [,2] [,3]
    ## [1,]    1    4    7
    ## [2,]    2    5    8
    ## [3,]    3    6    9

    Normalize(m)

    ##       [,1]  [,2]  [,3]
    ## [1,] 0.000 0.375 0.750
    ## [2,] 0.125 0.500 0.875
    ## [3,] 0.250 0.625 1.000

## 4.2 PSB

PSB [5] uses not only disease-gene associations but also GO-gene associations. We designed function PSB to implement this method. Function PSB needs disease-GO associations which can be obtained by function HypergeometricTest.

Here’s an example for PSB:

    ## get the data
    data(go2g_sample)
    data(d2go_sample)

    ds<-names(d2go_sample)
    sim<-PSB(ds,ds,d2go_sample,go2g_sample)
    sim

    ##            DOID:5652 DOID:10005  DOID:2290
    ## DOID:5652  4.1743210 0.44099253 0.51055413
    ## DOID:10005 0.4409925 5.82708131 0.09897865
    ## DOID:2290  0.5105541 0.09897865 5.45446576

    Normalize(sim)

    ##             DOID:5652 DOID:10005  DOID:2290
    ## DOID:5652  0.71146461 0.05970806 0.07185197
    ## DOID:10005 0.05970806 1.00000000 0.00000000
    ## DOID:2290  0.07185197 0.00000000 0.93494957

## 4.3 FunSim

FunSim [3] is a method that takes advantage of gene function network data from HumanNet [6]. First we got the raw data from HumanNet, then we normalized the associated log likelihood score of gene pairs. Then we can use function FunSim to mearsure similarity between diseases (note that we use function LLSn2List to convert HumanNet data from data.frame to list, for more efficient calculating):

    ## in this method, we must use disease-gene associations
    ## which genes are represented by entrez ids because of
    ## HumanNet
    data(d2g_fundo_entrezid) ##get disease-gene associations
    data(HumanNet_sample)
    ## we specified 5 DOIDs to match Human_sample
    ds<-c("DOID:8176","DOID:2394","DOID:3744","DOID:8466","DOID:5679")
    llsnlist<-LLSn2List(HumanNet_sample)
    FunSim(ds,ds,d2g_fundo_entrezid,llsnlist)

    ##              DOID:8176  DOID:2394    DOID:3744    DOID:8466 DOID:5679
    ## DOID:8176 1.0000000000 0.43350044 0.4476822789 0.0002666029 0.1457867
    ## DOID:2394 0.4335004444 1.00000000 0.4222353572 0.0166884115 0.1592188
    ## DOID:3744 0.4476822789 0.42223536 1.0000000000 0.0001286379 0.1293250
    ## DOID:8466 0.0002666029 0.01668841 0.0001286379 1.0000000000 0.1349979
    ## DOID:5679 0.1457866621 0.15921884 0.1293250308 0.1349979009 1.0000000

## 4.4 ICod

ICod [7] mearsures disease-disease similarities based on disease-related PPIs. We used an R graph igraph to import PPI data into R. For example:

    ## get disease-gene associations and HPRD PPI data
    data(d2g_fundo_symbol)
    data(PPI_HPRD)

    graph_hprd<-graph.data.frame(PPI_HPRD,directed=FALSE) #get a igraph object based on HPRD PPI data

    ds<-sample(names(d2g_fundo_symbol),5)
    ICod(ds,ds,d2g_fundo_symbol,graph_hprd)

    ##              DOID:4415   DOID:3298  DOID:6536   DOID:1564  DOID:12053
    ## DOID:4415  1.000000000 0.005277377 0.03186202 0.000000000 0.000000000
    ## DOID:3298  0.005277377 1.000000000 0.01307318 0.005701660 0.002857012
    ## DOID:6536  0.031862020 0.013073175 1.00000000 0.000000000 0.000000000
    ## DOID:1564  0.000000000 0.005701660 0.00000000 1.000000000 0.006596573
    ## DOID:12053 0.000000000 0.002857012 0.00000000 0.006596573 1.000000000

## 4.5 Sun’s measures

Sun [8] proposed three measures which use different biological information. These three measures are: annotation-baesd, function-based and topological-based.

### 4.5.1 Sun’s annotation-based measure

Sun’s annotation-based measure used the information of disease-gene association data. We implemented function Sun_annotation to calculate disease-disease similarity:

    data(d2g_separation) ## get disease-gene associations

    ds<-sample(names(d2g_separation),5)
    Sun_annotation(ds,ds,d2g_separation)

    ##                                     neuroendocrine tumors
    ## neuroendocrine tumors                         1.000000000
    ## skin and connective tissue diseases           0.005639098
    ## anemia                                        0.000000000
    ## coronary artery disease                       0.000000000
    ## parkinsonian disorders                        0.012658228
    ##                                     skin and connective tissue diseases
    ## neuroendocrine tumors                                       0.005639098
    ## skin and connective tissue diseases                         1.000000000
    ## anemia                                                      0.010695187
    ## coronary artery disease                                     0.003656307
    ## parkinsonian disorders                                      0.001798561
    ##                                          anemia coronary artery disease
    ## neuroendocrine tumors               0.000000000             0.000000000
    ## skin and connective tissue diseases 0.010695187             0.003656307
    ## anemia                              1.000000000             0.009708738
    ## coronary artery disease             0.009708738             1.000000000
    ## parkinsonian disorders              0.000000000             0.000000000
    ##                                     parkinsonian disorders
    ## neuroendocrine tumors                          0.012658228
    ## skin and connective tissue diseases            0.001798561
    ## anemia                                         0.000000000
    ## coronary artery disease                        0.000000000
    ## parkinsonian disorders                         1.000000000

### 4.5.2 Sun’s function-based measure

Sun’s function-based measure uses both GO term annotations and disease-gene associations to estimate the disease similarity scores. We implemented function Sun_function to perform this method like follows:

    ## get a sample of disease-GO associations
    data(d2go_sample)
    ds<-names(d2go_sample)
    Sun_function(ds,ds,d2go_sample)

    ##             DOID:5652 DOID:10005  DOID:2290
    ## DOID:5652  1.00000000          0 0.02672606
    ## DOID:10005 0.00000000          1 0.00000000
    ## DOID:2290  0.02672606          0 1.00000000

### 4.5.3 Sun’s topology-based measure

Sun’s topology-based measure takes advantage of the topology of PPI network and disease-gene association data to measure disease similarity scores. Futhurmore Function Sun_topology was implemented for this method. And in this method, the graphlet signature of nodes in PPI were calculated by a tool orca [9] (see details in [8]).

Here is an example:

    data(d2g_fundo_symbol)
    data(graphlet_sig_hprd) #get graphlet signatures of genes in HPRD PPI network
    data(weight)
    ds<-sample(names(d2g_fundo_symbol),5)
    Sun_topology(ds,ds,d2g_fundo_symbol,graphlet_sig_hprd,weight)

    ##           DOID:5289  DOID:114  DOID:235 DOID:5603 DOID:3151
    ## DOID:5289 1.0000000 0.3495684 0.4314708 0.4299963 0.5000000
    ## DOID:114  0.3495684 1.0000000 0.5000000 0.4596756 0.3932415
    ## DOID:235  0.4314708 0.5000000 1.0000000 0.4653077 0.4710476
    ## DOID:5603 0.4299963 0.4596756 0.4653077 1.0000000 0.4614479
    ## DOID:3151 0.5000000 0.3932415 0.4710476 0.4614479 1.0000000

## 4.6 Separation

Method Separation is actually a method measuring a netowrk-based separation of disease pairs [10]. But the result can also be turned into similarity scores. And we implemented function Separation2Similarity for this purpose as the following formula: \[SimScore=\frac{MaxSepScore-SepScore}{MaxSepScore-MinSepScore}\]

Here is an example:

    ## get the disease-gene association data and interactome data
    data(d2g_separation)
    data(interactome)

    ## import ppi data to R by igraph
    graph_interactome<-graph.data.frame(interactome,directed=FALSE)

    ## calculate separation of 5 sample diseases
    ds<-sample(names(d2g_separation),5)
    sep<-Separation(ds,ds,d2g_separation,graph_interactome)

    ## convert separation into simialrity
    sim<-Separation2Similarity(sep)
    sim

    ##                                  cerebrovascular disorders uveal diseases
    ## cerebrovascular disorders                        0.9384614      0.1355756
    ## uveal diseases                                   0.1355756      1.0000000
    ## cranial nerve diseases                           0.2295326      0.1583017
    ## bacterial infections and mycoses                 0.1003662      0.1285421
    ## leukemia, b-cell                                 0.2179475      0.1487166
    ##                                  cranial nerve diseases
    ## cerebrovascular disorders                     0.2295326
    ## uveal diseases                                0.1583017
    ## cranial nerve diseases                        0.9067598
    ## bacterial infections and mycoses              0.0000000
    ## leukemia, b-cell                              0.2108146
    ##                                  bacterial infections and mycoses
    ## cerebrovascular disorders                              0.10036623
    ## uveal diseases                                         0.12854206
    ## cranial nerve diseases                                 0.00000000
    ## bacterial infections and mycoses                       0.75808981
    ## leukemia, b-cell                                       0.08796229
    ##                                  leukemia, b-cell
    ## cerebrovascular disorders              0.21794750
    ## uveal diseases                         0.14871662
    ## cranial nerve diseases                 0.21081462
    ## bacterial infections and mycoses       0.08796229
    ## leukemia, b-cell                       0.97948715

# 5 Visualization

## 5.1 Visualization of disease-gene associations

Disease-gene associations are the most widely used information to measure disease similarity in function-based methods. Here we provide function plot_bipartite for users to observe associations between diseases and genes more intuitively. This function can also visualize other associations like disease-GO term associations. Here’s an example:

    data(d2g_fundo_symbol)
    d2g_sample<-d2g_fundo_symbol[1:10]
    plot_bipartite(d2g_sample)

For two specific diseases, we implemented function plot_topo to visualize the topological relationship of the two diseases’ gene sets in gene network. The following is an example:

    data("PPI_HPRD")
    g<-graph.data.frame(PPI_HPRD,directed = FALSE) #get an igraph graph

    data(d2g_fundo_symbol)
    a<-d2g_fundo_symbol[["DOID:8242"]] # get gene set a
    b<-d2g_fundo_symbol[["DOID:4914"]] # get gene set b

    plot_topo(a,b,g)

## 5.2 Visualization of disease similarity network

We implemented two functions plot_heatmap and plot_net for the disease similarity network’s visualization. Function plot_heatmap is a reuse of function simplot in package DOSE [11] which shows the heatmap of disease similarity network. Given a cutoff, function plot_net will show the relationships among diseases in a graph. For example:

    data(d2g_separation)
    data(interactome)

    graph_interactome<-graph.data.frame(interactome,directed=FALSE)
    ds<-c("myocardial ischemia","myocardial infarction","coronary artery disease",
     "cerebrovascular disorders","arthritis, rheumatoid","diabetes mellitus, type 1",
     "autoimmune diseases of the nervous system","demyelinating autoimmune diseases, cns",
     "respiratory hypersensitivity","asthma","retinitis pigmentosa",
     "retinal degeneration","macular degeneration")

    sep<-Separation(ds,ds,d2g_separation,graph_interactome)
    sim<-Separation2Similarity(sep)
    plot_heatmap(sim,font.size = 3)

    plot_net(sim,cutoff=0.2)

# 6 References

[1] Zhou X Z, Menche J, Barabasi A L, et al. Human symptoms-disease network[J]. Nature communications, 2014, 5.

[2] Van Driel M A, Bruggeman J, Vriend G, et al. A text-mining analysis of the human phenome[J]. European journal of human genetics, 2006, 14(5): 535-542.

[3] Cheng L, Li J, Ju P, et al. SemFunSim: a new method for measuring disease similarity by integrating semantic and gene functional association[J]. PloS one, 2014, 9(6): e99415.

[4] Mathur S, Dinakarpandian D. Automated ontological gene annotation for computing disease similarity[J]. AMIA Summits on Translational Science Proceedings, 2010, 2010: 12.

[5] Mathur S, Dinakarpandian D. Finding disease similarity based on implicit semantic similarity[J]. Journal of biomedical informatics, 2012, 45(2): 363-371.

[6] Lee I, Blom U M, Wang P I, et al. Prioritizing candidate disease genes by network-based boosting of genome-wide association data[J]. Genome research, 2011, 21(7): 1109-1121.

[7] Paik H, Heo HS, Ban H, et al. Unraveling human protein interaction networks underlying co-occurrences of diseases and pathological conditions[J]. Journal of translational medicine, 2014, 12(1): 99.

[8] Sun K, Gonçalves JP, Larminie C. Predicting disease associations via biological network analysis[J]. BMC bioinformatics, 2014, 15(1): 304.

[9] Hočevar T, Demšar J. A combinatorial approach to graphlet counting[J]. Bioinformatics, 2014, 30(4): 559-565.

[10] Menche J, Sharma A, Kitsak M, et al. Uncovering disease-disease relationships through the incomplete interactome[J]. Science, 2015, 347(6224): 1257601.

[11] Yu G, Wang L G, Yan G R, et al. DOSE: an R/Bioconductor package for disease ontology semantic and enrichment analysis[J]. Bioinformatics, 2015, 31(4): 608-609.