Skip to contents

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 LongTableDataMapper
metaConstruct(mapper)

# S4 method for 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)
#> 2024-03-25 15:58:26 Building assay index...
#> 2024-03-25 15:58:26 Joining rowData to assayIndex...
#> 2024-03-25 15:58:27 Joining colData to assayIndex...
#> 2024-03-25 15:58:27 Joining assays to assayIndex...
#> 2024-03-25 15:58:28 Setting assayIndex key...
#> 2024-03-25 15:58:29 Building LongTable...
#> 
longTable
#> <LongTable> 
#>    dim:  1 1 
#>    assays(1): sensitivity 
#>    rownames(1): drug1 
#>    rowData(1): treatmentid 
#>    colnames(1): cell1 
#>    colData(1): sampleid 
#>    metadata(1): experiment_metadata 

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)
#> 2024-03-25 15:58:29 Building assay index...
#> 2024-03-25 15:58:29 Joining rowData to assayIndex...
#> 2024-03-25 15:58:30 Joining colData to assayIndex...
#> 2024-03-25 15:58:30 Joining assays to assayIndex...
#> 2024-03-25 15:58:31 Setting assayIndex key...
#> 2024-03-25 15:58:32 Building LongTable...
#> 
tre
#> <TreatmentResponseExperiment> 
#>    dim:  1 1 
#>    assays(1): sensitivity 
#>    rownames(1): drug1 
#>    rowData(1): treatmentid 
#>    colnames(1): cell1 
#>    colData(1): sampleid 
#>    metadata(1): experiment_metadata