Skip to contents

Generating Compound-Protein Interaction Descriptors

Usage

getCPI(drugmat, protmat, type = c("combine", "tensorprod"))

Arguments

drugmat

The compound descriptor matrix.

protmat

The protein descriptor matrix.

type

The interaction type, one or two of "combine" and "tensorprod".

Value

A matrix containing the compound-protein interaction descriptors

Details

This function calculates the compound-protein interaction descriptors by three types of interaction:

  • combine - combine the two descriptor matrix, result has (p1 + p2) columns

  • tensorprod - calculate column-by-column (pseudo)-tensor product type interactions, result has (p1 * p2) columns

See also

See getPPI for generating protein-protein interaction descriptors.

Examples

x = matrix(1:10, ncol = 2)
y = matrix(1:15, ncol = 3)

getCPI(x, y, 'combine')
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]    1    6    1    6   11
#> [2,]    2    7    2    7   12
#> [3,]    3    8    3    8   13
#> [4,]    4    9    4    9   14
#> [5,]    5   10    5   10   15
getCPI(x, y, 'tensorprod')
#>      [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,]    1    6    6   36   11   66
#> [2,]    4   14   14   49   24   84
#> [3,]    9   24   24   64   39  104
#> [4,]   16   36   36   81   56  126
#> [5,]   25   50   50  100   75  150
getCPI(x, y, type = c('combine', 'tensorprod'))
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
#> [1,]    1    6    1    6   11    1    6    6   36    11    66
#> [2,]    2    7    2    7   12    4   14   14   49    24    84
#> [3,]    3    8    3    8   13    9   24   24   64    39   104
#> [4,]    4    9    4    9   14   16   36   36   81    56   126
#> [5,]    5   10    5   10   15   25   50   50  100    75   150
getCPI(x, y, type = c('tensorprod', 'combine'))
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
#> [1,]    1    6    1    6   11    1    6    6   36    11    66
#> [2,]    2    7    2    7   12    4   14   14   49    24    84
#> [3,]    3    8    3    8   13    9   24   24   64    39   104
#> [4,]    4    9    4    9   14   16   36   36   81    56   126
#> [5,]    5   10    5   10   15   25   50   50  100    75   150