intersectPSet {PharmacoGx} | R Documentation

## Intersects objects of the PharmacoSet class, subsetting them to the common drugs and/or cell lines as selected by the user.

### Description

Given a list of PharmacoSets, the function will find the common drugs, and/or cell lines, and return PharmacoSets that contain data only pertaining to the common drugs, and/or cell lines. The mapping between dataset drug and cell names is done using annotations found in the PharmacoSet object's internal curation slot

### Usage

    intersectPSet(pSets, intersectOn = c("drugs", "cell.lines", "concentrations"),
      cells, drugs, strictIntersect = FALSE, verbose = TRUE, nthread = 1)

### Arguments

`pSets` | [list] a list of PharmacoSet objects, of which the function should find the intersection
`intersectOn` | [character] which identifiers to intersect on, drugs or cell lines
`cells` | a vector of common cell lines between pSets. In case user is intersted on getting intersection on certain cell lines, they can provide their list of cell lines
`drugs` | a vector of common drugs between pSets. In case user is intersted on getting intersection on certain drugs, they can provide their list of drugs.
`strictIntersect` | [boolean] Should the intersection keep only the drugs and cell lines that have been tested on together?
`verbose` | [boolean] Should the function announce its key steps?
`nthread` | [numeric] The number of cores to use to run intersection on concentrations

### Value

[list] a list of pSets, contatining only the intersection

### Examples

    data(GDSCsmall)
    data(CCLEsmall)
    common <- intersectPSet(list('GDSC'=GDSCsmall,
      'CCLE'=CCLEsmall), intersectOn = c("drugs", "cell.lines"))
    common$CGP
    common$CCLE

[Package PharmacoGx version 1.8.3 Index]