TREDataMapper-accessors: Accessing and modifying data in a 'TREDataMapper' object.

TREDataMapper-accessorsR Documentation

Accessing and modifying data in a TREDataMapper object.

Description

Documentation for the various setters and getters which allow manipulation of data in the slots of a TREDataMapper object.

Usage

## S4 replacement method for signature 'TREDataMapper,list'
rawdata(object) <- value

## S4 method for signature 'TREDataMapper'
rowDataMap(object)

## S4 replacement method for signature 'TREDataMapper,list_OR_List'
rowDataMap(object) <- value

## S4 method for signature 'TREDataMapper'
colDataMap(object)

## S4 replacement method for signature 'TREDataMapper,list_OR_List'
colDataMap(object) <- value

## S4 method for signature 'TREDataMapper'
assayMap(object)

## S4 replacement method for signature 'TREDataMapper,list_OR_List'
assayMap(object) <- value

## S4 method for signature 'TREDataMapper'
metadataMap(object)

## S4 replacement method for signature 'TREDataMapper,list_OR_List'
metadataMap(object) <- value

Arguments

object

A TREDataMapper object to get or set data from.

value

See details.

Details

rawdata: Get the raw data slot from a TREDataMapper object. Returns a list-like containing one or more raw data inputs to the TREDataMapper object.

rawdata: Set the raw data slot from a TREDataMapper object. value: The list-like object to set for the rawdata slot. Note: this currently only supports data.frame or data.table objects.

rowDataMap: list of two character vectors, the first are the columns required to uniquely identify each row of a TREDataMapper and the second any additional row-level metadata. If the character vectors have names, the resulting columns are automatically renamed to the item name of the specified column.

rowDataMap<-: Update the ⁠@rowDataMap⁠ slot of a TREDataMapper object, returning an invisible NULL. Arguments:

  • value: A list or List where the first item is the names of the identifier columns – columns needed to uniquely identify each row in rowData – and the second item is the metadata associated with those the identifier columns, but not required to uniquely identify rows in the object rowData.

colDataMap: list of two character vectors, the first are the columns required to uniquely identify each row of a TREDataMapper and the second any additional col-level metadata. If the character vectors have names, the resulting columns are automatically renamed to the item name of the specified column.

colDataMap<-: Update the ⁠@colDataMap⁠ slot of a TREDataMapper object, returning an invisible NULL. Arguments:

  • value: A list or List where the first item is the names of the identifier columns – columns needed to uniquely identify each row in colData – and the second item is the metadata associated with those the identifier columns, but not required to uniquely identify rows in the object rowData.

assayMap: A list of character vectors. The name of each list item will be the assay in a LongTableDataMapper object that the columns in the character vector will be assigned to. Column renaming occurs automatically when the character vectors have names (from the value to the name).

assayMap<-: Updates the ⁠@assayMap⁠ slot of a TREDataMapper object, returning an invisible NULL. Arguments:

  • value: A list of character vectors, where the name of each list item is the name of an assay and the values of each character vector specify the columns mapping to the assay in the S4 object the TREDataMapper constructs.

metadataMap: A list of character vectors. Each item is an element of the constructed objects ⁠@metadata⁠ slot.

metadataMap<-: Updates TREDataMapper object in-place, then returns an invisible(NULL). Arguments:

  • value: A list of character vectors. The name of each list item is the name of the item in the ⁠@metadata⁠ slot of the TREDataMapper object created when metaConstruct is called on the DataMapper, and a character vector specifies the columns of ⁠@rawdata⁠ to assign to each item.

Value

Accessors: See details

Setters: An update TREDataMapper object, returned invisibly.

See Also

Other DataMapper-accessors: DataMapper-accessors, LongTableDataMapper-accessors

Examples

rowDataMap(exampleDataMapper)

rowDataMap(exampleDataMapper) <- list(c('treatmentid'), c())

colDataMap(exampleDataMapper)

colDataMap(exampleDataMapper) <- list(c('sampleid'), c())

assayMap(exampleDataMapper)

assayMap(exampleDataMapper) <- list(sensitivity=c(viability1='viability'))

metadataMap(exampleDataMapper)

metadataMap(exampleDataMapper) <- list(object_metadata=c('metadata'))


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