Skip to contents

This function takes the post-translational modification table and runs it through three calculations of distance: Euclidean Distance, Spearman Dissimilarity (1 - |Spearman Correlation|), and the average of the two of these. These calculations find the 'distance' between ptms based upon under what conditions they occur. These matricies are then run through t-SNE in order to put them into a 3-dimensional space. Additionally, the intersection of these 3 clusters is also created. A correlation table is also produced based on the Spearman Correlation table.

Usage

MakeClusterList(
  ptmtable,
  correlation.matrix.name = "ptm.correlation.matrix",
  clusters.list.name = "clusters.list",
  tsne.coords.name = "all.tsne.coords",
  common.clusters.name = "common.clusters",
  keeplength = 2,
  toolong = 3.5
)

Arguments

ptmtable

A dataset for post-translational modifications. Formatted with numbered rows, and the first column containing PTM names. The rest of the column names should be drugs. Values are numeric values that represent how much the PTM has reacted to the drug.

correlation.matrix.name

Desired name for the correlation matrix to be saved as; defaults to "ptm.correlation.matrix"

clusters.list.name

Desired name for the lists of clusters to be saved as; defaults to clusters.list

tsne.coords.name

Desired name for the lists of tsne coords to be saved as; defaults to tsne.coords

common.clusters.name

Desired name for the clusters that all 3 methods found in common; defaults to common.clusters

keeplength

Only keep clusters of ptms whose size is larger than this parameter. (I.e keeplength = 2 then keep ("AARS", "ARMS", "AGRS") but not ("AARS", "ARMS")); default is 2

toolong

A numeric threshold for cluster separation, defaults to 3.5.

Value

The correlation matrix: A data frame showing the correlation between ptms (as the rows and the columns) with NAs placed along the diagonal; and A list of three-dimensional data frames used to represent ptms in space to show relationships between them based on distances. Based on Euclidean Distance, Spearman Dissimilarity, and SED (the average between the two)

Details

Please note: t-SNE involves an element of randomness; in order to get the same results, set.seed(#) must be called.

Examples

ex.ptm.cor <- "ex.ptm.correlation.matrix"
ex.clusters <- "ex.clusters.list"
ex.tsnes <- "ex.all.tsne.coords"
ex.commons <- "ex.common.clusters"
MakeClusterList(ex.ptmtable, ex.ptm.cor, ex.clusters, ex.tsnes, ex.commons)
#> species scores not available

#> species scores not available

#> species scores not available

utils::head(ex.ptm.correlation.matrix[, c(1,2,3,4,5)])
#>               ABLIM1 p Y357 ABLIM1 p Y373 ABLIM1 p Y383 ABLIM1 p Y406
#> ABLIM1 p Y357            NA     0.8857143     0.6428571          -0.5
#> ABLIM1 p Y373     0.8857143            NA     0.8000000          -0.8
#> ABLIM1 p Y383     0.6428571     0.8000000            NA          -1.0
#> ABLIM1 p Y406    -0.5000000    -0.8000000    -1.0000000            NA
#> ABLIM1 p Y410     0.9000000     1.0000000     0.5000000          -0.5
#> ABLIM1 p Y461     0.8000000     0.8857143     1.0000000          -1.0
#>               ABLIM1 p Y410
#> ABLIM1 p Y357           0.9
#> ABLIM1 p Y373           1.0
#> ABLIM1 p Y383           0.5
#> ABLIM1 p Y406          -0.5
#> ABLIM1 p Y410            NA
#> ABLIM1 p Y461           1.0
print(ex.clusters.list[[1]][1])
#> $`1`
#>                                                                         PTMnames
#> 1                                                                  ABLIM1 p Y357
#> 2                                                                  ABLIM1 p Y373
#> 3                                                                ATP5PO ack K162
#> 4                                                                    CTTN p T401
#> 5                                                                HNRNPU ubi K524
#> 6                                                                     LCK p Y394
#> 7                                                                    MET p Y1003
#> 8                                                                    MET p Y1235
#> 9                                                                     MYH9 p Y11
#> 10                                                                 PARD3 p Y1127
#> 11                                                                 PIK3R2 p Y464
#> 12                                                                  PKP4 p Y1156
#> 13                                                                   PKP4 p Y470
#> 14                                                                   PKP4 p Y478
#> 15                                                                  PTPRK p Y858
#> 16                                                                 RASSF8 p Y418
#> 17                                                                 SCRIB p Y1268
#> 18                                                              SUPT16H ack K674
#> 19                                                                TMEM192 p Y213
#> 20      TUBA1B p Y103; TUBA4A p Y103; TUBA1A p Y103; TUBA1C p Y103; TUBA8 p Y103
#> 21                                   TUBA1B p Y272; TUBA4A p Y272; TUBA1A p Y272
#> 22                             TUBA1B ubi K112; TUBA1A ubi K112; TUBA1C ubi K112
#> 23                             TUBA1B ubi K326; TUBA1A ubi K326; TUBA1C ubi K326
#> 24                             TUBA1B ubi K336; TUBA1A ubi K336; TUBA1C ubi K336
#> 25                             TUBA1B ubi K338; TUBA1A ubi K338; TUBA1C ubi K338
#> 26                                              TUBA1B ubi K370; TUBA4A ubi K370
#> 27                                TUBA1B ubi K60; TUBA1A ubi K60; TUBA1C ubi K60
#> 28 TUBA1B ubi K96; TUBA4A ubi K96; TUBA1A ubi K96; TUBA1C ubi K96; TUBA8 ubi K96
#> 29                                                                 ZDHHC5 p Y533
#>    group
#> 1      1
#> 2      1
#> 3      1
#> 4      1
#> 5      1
#> 6      1
#> 7      1
#> 8      1
#> 9      1
#> 10     1
#> 11     1
#> 12     1
#> 13     1
#> 14     1
#> 15     1
#> 16     1
#> 17     1
#> 18     1
#> 19     1
#> 20     1
#> 21     1
#> 22     1
#> 23     1
#> 24     1
#> 25     1
#> 26     1
#> 27     1
#> 28     1
#> 29     1
#> 
print(ex.clusters.list[[2]][1])
#> $`1`
#>           PTMnames group
#> 1    ABLIM1 p Y357     1
#> 2    ABLIM1 p Y373     1
#> 3    DCBLD1 p Y589     1
#> 4    DCBLD1 p Y600     1
#> 5  HSPA1B ubi K126     1
#> 6      MET p Y1003     1
#> 7    PIK3R2 p Y460     1
#> 8     PKP4 p Y1156     1
#> 9     PSMC1 p Y439     1
#> 10    USP15 p Y263     1
#> 
print(ex.clusters.list[[3]][1])
#> $`1`
#>           PTMnames group
#> 1    ABLIM1 p Y357     1
#> 2    ABLIM1 p Y373     1
#> 3    DCBLD1 p Y589     1
#> 4    DCBLD1 p Y600     1
#> 5  HSPA1B ubi K126     1
#> 6      MET p Y1003     1
#> 7    PIK3R2 p Y460     1
#> 8     PKP4 p Y1156     1
#> 9     PSMC1 p Y439     1
#> 10    USP15 p Y263     1
#>