prepareDrugSets {cTRAP} | R Documentation

## Prepare drug sets from a table with compound descriptors

### Description

Create a list of drug sets for each character and numeric column. For each character column, drugs are split across that column's unique values (see argument `maxUniqueElems`). For each numeric column, drugs are split across evenly-distributed bins.

### Usage

    prepareDrugSets(
      table,
      id = 1,
      maxUniqueElems = 15,
      maxBins = 15,
      k = 5,
      minPoints = NULL
    )

### Arguments

`table` | Data frame: drug descriptors
`id` | Integer or character: index or name of the identifier column
`maxUniqueElems` | Numeric: ignore character columns with more unique elements than `maxUniqueElems`
`maxBins` | Numeric: maximum number of bins for numeric columns
`k` | Numeric: constant; the higher the constant, the smaller the bin size (check `minpts`)
`minPoints` | Numeric: minimum number of points in a bin (if `NULL`, the minimum number of points is the number of non-missing values divided by `maxBins` divided by `k`)

### Value

Named list of characters: named drug sets with respective compound identifiers as list elements

### See Also

Other functions for drug set enrichment analysis: `analyseDrugSetEnrichment()`, `loadDrugDescriptors()`, `plotDrugSetEnrichment()`

### Examples

    descriptors <- loadDrugDescriptors("NCI60")
    prepareDrugSets(descriptors)

[Package cTRAP version 1.10.1 Index]