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 PharmacoSet
subsetBySample(x, samples)
# S4 method for PharmacoSet
subsetByTreatment(x, treatments)
# S4 method for PharmacoSet
subsetByFeature(x, features, mDataTypes)
Arguments
- x
A
PharmacoSet
object.- samples
character()
vector of sample names. Must be valid rownames fromsampleInfo(x)
.- treatments
character()
vector of treatment names. Must be valid rownames fromtreatmentInfo(x)
. This method does not work withCoreSet
objects yet.- features
character()
vector of feature names. Must be valid feature names for a givenmDataType
- 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 onlysamples
.
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')