Learn R Programming

BioMedR (version 1.2.1)

getCPI: Generating Interaction Descriptors

Description

Generating Interaction Descriptors

Usage

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

getPPI(protmat1, protmat2, type = c("combine", "tensorprod", "entrywise"))

getDDI(DNAmat1, DNAmat2, type = c("combine", "tensorprod", "entrywise"))

getDPI(DNAmat, protmat, type = c("combine", "tensorprod"))

getCCI(drugmat1, drugmat2, type = c("combine", "tensorprod", "entrywise"))

getCDI(drugmat, DNAmat, type = c("combine", "tensorprod"))

Arguments

drugmat

The compound descriptor matrix.

protmat

The protein descriptor matrix.

type

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

protmat1

The first protein descriptor matrix, must have the same ncol with protmat2.

protmat2

The second protein descriptor matrix, must have the same ncol with protmat1.

DNAmat1

The first DNA descriptor matrix, must have the same ncol with DNAmat2.

DNAmat2

The second DNA descriptor matrix, must have the same ncol with DNAmat1.

DNAmat

The DNA descriptor matrix.

drugmat1

The first compound descriptor matrix, must have the same ncol with drugmat2.

drugmat2

The second compound descriptor matrix, must have the same ncol with drugmat1.

Value

A matrix containing the interaction descriptors

Details

This function calculates the 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

  • entrywise - calculate entrywise product and entrywise sum of the two matrices, then combine them, result has (p + p) columns

Examples

Run this code
# NOT RUN {
x = matrix(1:10, ncol = 2)
y = matrix(1:15, ncol = 3)
# getCPI 
getCPI(x, y, 'combine')
# getCDI
getCDI(x, y, 'tensorprod')
# getDPI
getDPI(x, y, type = c('combine', 'tensorprod'))
getDPI(x, y, type = c('tensorprod', 'combine'))

x = matrix(1:10, ncol = 2)
y = matrix(5:14, ncol = 2)

# getPPI 
getPPI(x, y, type = 'combine')
getPPI(x, y, type = 'tensorprod')
# getDDI
getDDI(x, y, type = 'entrywise')
getDDI(x, y, type = c('combine', 'tensorprod'))
# getCCI
getCCI(x, y, type = c('combine', 'entrywise'))
getCCI(x, y, type = c('entrywise', 'tensorprod'))
getCCI(x, y, type = c('combine', 'entrywise', 'tensorprod'))
# }

Run the code above in your browser using DataLab