subsetTo-PharmacoSet-method: A function to subset a PharmacoSet to data containing only...

Description Usage Arguments Value Examples

Description

This is the prefered method of subsetting a PharmacoSet. This function allows abstraction of the data to the level of biologically relevant objects: drugs and cells. The function will automatically go through all of the combined data in the PharmacoSet and ensure only the requested drugs and cell lines are found in any of the slots. This allows quickly picking out all the experiments for a drug or cell of interest, as well removes the need to keep track of all the metadata conventions between different datasets.

Usage

1
2
3
4
5
6
7
8
9
## S4 method for signature 'PharmacoSet'
subsetTo(
  object,
  cells = NULL,
  drugs = NULL,
  molecular.data.cells = NULL,
  keep.controls = TRUE,
  ...
)

Arguments

object

A PharmacoSet to be subsetted

cells

A list or vector of cell names as used in the dataset to which the object will be subsetted. If left blank, then all cells will be left in the dataset.

drugs

A list or vector of drug names as used in the dataset to which the object will be subsetted. If left blank, then all drugs will be left in the dataset.

molecular.data.cells

A list or vector of cell names to keep in the molecular data

keep.controls

If the dataset has perturbation type experiments, should the controls be kept in the dataset? Defaults to true.

...

Other arguments passed by other function within the package

Value

A PharmacoSet with only the selected drugs and cells

Examples

1
2
3
4
5
data(CCLEsmall)
CCLEdrugs  <- drugNames(CCLEsmall)
CCLEcells <- cellNames(CCLEsmall)
pSet <- subsetTo(CCLEsmall, drugs = CCLEdrugs[1], cells = CCLEcells[1])
pSet

PharmacoGx documentation built on Feb. 28, 2021, 2 a.m.