metaConstruct: Generic for preprocessing complex data before being used in...

metaConstructR Documentation

Generic for preprocessing complex data before being used in the constructor of an S4 container object.

Description

This method is intended to abstract away complex constructor arguments and data preprocessing steps needed to transform raw data, such as that produced in a treatment-response or next-gen sequencing experiment, and automate building of the appropriate S4 container object. This is is intended to allow mapping between different experimental designs, in the form of an S4 configuration object, and various S4 class containers in the Bioconductor community and beyond.

Usage

metaConstruct(mapper, ...)

## S4 method for signature 'LongTableDataMapper'
metaConstruct(mapper)

## S4 method for signature 'TREDataMapper'
metaConstruct(mapper)

Arguments

mapper

An TREDataMapper object abstracting arguments to an the TreatmentResponseExperiment constructor.

...

Allow new arguments to be defined for this generic.

Value

An S4 object for which the class corresponds to the type of the build configuration object passed to this method.

A LongTable object, as specified in the mapper.

A TreatmentResponseExperiment object, as specified in the mapper.

Examples

data(exampleDataMapper)
rowDataMap(exampleDataMapper) <- list(c('treatmentid'), c())
colDataMap(exampleDataMapper) <- list(c('sampleid'), c())
assayMap(exampleDataMapper) <- list(sensitivity=list(c("treatmentid", "sampleid"), c('viability')))
metadataMap(exampleDataMapper) <- list(experiment_metadata=c('metadata'))
longTable <- metaConstruct(exampleDataMapper)
longTable

data(exampleDataMapper)
exampleDataMapper <- as(exampleDataMapper, "TREDataMapper")
rowDataMap(exampleDataMapper) <- list(c('treatmentid'), c())
colDataMap(exampleDataMapper) <- list(c('sampleid'), c())
assayMap(exampleDataMapper) <- list(sensitivity=list(c("treatmentid", "sampleid"), c('viability')))
metadataMap(exampleDataMapper) <- list(experiment_metadata=c('metadata'))
tre <- metaConstruct(exampleDataMapper)
tre


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