PharmacoSet-utils: Utility methods for a 'PharmacoSet' object.

PharmacoSet-utilsR Documentation

Utility methods for a PharmacoSet object.

Description

Documentation for utility methods for a PharmacoSet object, such as set operations like subset and intersect. See @details for information on different types of methods and their implementations.

Usage

## S4 method for signature 'PharmacoSet'
subsetBySample(x, samples)

## S4 method for signature 'PharmacoSet'
subsetByTreatment(x, treatments)

## S4 method for signature 'PharmacoSet'
subsetByFeature(x, features, mDataTypes)

Arguments

x

A PharmacoSet object.

samples

character() vector of sample names. Must be valid rownames from sampleInfo(x).

treatments

character() vector of treatment names. Must be valid rownames from treatmentInfo(x). This method does not work with CoreSet objects yet.

features

character() vector of feature names. Must be valid feature names for a given mDataType

mDataTypes

character() One or more molecular data types to to subset features by. Must be valid rownames for the selected SummarizedExperiment mDataTypes.

Details

subset methods

subsetBySample: Subset a PharmacoSet object by sample identifier.

  • value: a PharmacoSet object containing only samples.

subset methods

subsetByTreatment: Subset a PharmacoSet object by treatment identifier.

  • value: a PharmacoSet object containing only treatments.

subset methods

subsetByFeature: Subset a PharmacoSet object by molecular feature identifier.

  • value: a PharmacoSet object containing only features.

Value

See details.

Examples

data(CCLEsmall)

## subset methods

### subsetBySample
samples <- sampleInfo(CCLEsmall)$sampleid[seq_len(10)]
CCLEsmall_sub <- subsetBySample(CCLEsmall, samples)


## subset methods

### subsetByTreatment
#treatments <- drugInfo(CCLEsmall)$drugid[seq_len(10)]
#CCLEsmall_sub <- subsetByTreatment(CCLEsmall, treatments)


## subset methods

### subsetByFeature
features <- fNames(CCLEsmall, 'rna')[seq_len(5)]
CCLEsmall_sub <- subsetByFeature(CCLEsmall, features, 'rna')


bhklab/PharmacoGx documentation built on April 18, 2024, 3:13 a.m.