Generating Protein-Protein Interaction Descriptors
Usage
getPPI(protmat1, protmat2, type = c("combine", "tensorprod", "entrywise"))
Details
This function calculates the protein-protein interaction descriptors by three types of interaction:
combine
- combine the two descriptor matrix, result has(p + p)
columnstensorprod
- calculate column-by-column (pseudo)-tensor product type interactions, result has(p * p)
columnsentrywise
- calculate entrywise product and entrywise sum of the two matrices, then combine them, result has(p + p)
columns
See also
See getCPI
for generating
compound-protein interaction descriptors.
Examples
x = matrix(1:10, ncol = 2)
y = matrix(5:14, ncol = 2)
getPPI(x, y, type = 'combine')
#> [,1] [,2] [,3] [,4]
#> [1,] 1 6 5 10
#> [2,] 2 7 6 11
#> [3,] 3 8 7 12
#> [4,] 4 9 8 13
#> [5,] 5 10 9 14
getPPI(x, y, type = 'tensorprod')
#> [,1] [,2] [,3] [,4]
#> [1,] 5 30 10 60
#> [2,] 12 42 22 77
#> [3,] 21 56 36 96
#> [4,] 32 72 52 117
#> [5,] 45 90 70 140
getPPI(x, y, type = 'entrywise')
#> [,1] [,2] [,3] [,4]
#> [1,] 5 60 6 16
#> [2,] 12 77 8 18
#> [3,] 21 96 10 20
#> [4,] 32 117 12 22
#> [5,] 45 140 14 24
getPPI(x, y, type = c('combine', 'tensorprod'))
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 1 6 5 10 5 30 10 60
#> [2,] 2 7 6 11 12 42 22 77
#> [3,] 3 8 7 12 21 56 36 96
#> [4,] 4 9 8 13 32 72 52 117
#> [5,] 5 10 9 14 45 90 70 140
getPPI(x, y, type = c('combine', 'entrywise'))
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 1 6 5 10 5 60 6 16
#> [2,] 2 7 6 11 12 77 8 18
#> [3,] 3 8 7 12 21 96 10 20
#> [4,] 4 9 8 13 32 117 12 22
#> [5,] 5 10 9 14 45 140 14 24
getPPI(x, y, type = c('entrywise', 'tensorprod'))
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 5 30 10 60 5 60 6 16
#> [2,] 12 42 22 77 12 77 8 18
#> [3,] 21 56 36 96 21 96 10 20
#> [4,] 32 72 52 117 32 117 12 22
#> [5,] 45 90 70 140 45 140 14 24
getPPI(x, y, type = c('combine', 'entrywise', 'tensorprod'))
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
#> [1,] 1 6 5 10 5 30 10 60 5 60 6 16
#> [2,] 2 7 6 11 12 42 22 77 12 77 8 18
#> [3,] 3 8 7 12 21 56 36 96 21 96 10 20
#> [4,] 4 9 8 13 32 72 52 117 32 117 12 22
#> [5,] 5 10 9 14 45 90 70 140 45 140 14 24