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

CoreSet-utilsR Documentation

Utility methods for a CoreSet object.

Description

Documentation for utility methods for a CoreSet 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 'CoreSet'
subsetBySample(x, samples)

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

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

Arguments

x

A CoreSet 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 CoreSet object by sample identifier.

  • value: a CoreSet object containing only samples.

subset methods

subsetByTreatment: Subset a CoreSet object by treatment identifier.

  • value: a CoreSet object containing only treatments.

subset methods

subsetByFeature: Subset a CoreSet object by molecular feature identifier.

  • value: a CoreSet object containing only features.

Value

See details.

Examples

data(clevelandSmall_cSet)

## subset methods

### subsetBySample
samples <- sampleInfo(clevelandSmall_cSet)$sampleid[seq_len(10)]
clevelandSmall_cSet_sub <- subsetBySample(clevelandSmall_cSet, samples)


## subset methods

### subsetByTreatment
#treatments <- treatmentInfo(clevelandSmall_cSet)$treatmentid[seq_len(10)]
#clevelandSmall_cSet_sub <- subsetByTreatment(clevelandSmall_cSet, treatments)


## subset methods

### subsetByFeature
features <- fNames(clevelandSmall_cSet, 'rna')[seq_len(5)]
clevelandSmall_cSet_sub <- subsetByFeature(clevelandSmall_cSet, features, 'rna')


bhklab/CoreGx documentation built on March 14, 2024, 3:04 a.m.