Accessing and modifying data in a TREDataMapper
object.
TREDataMapper-accessors.Rd
Documentation for the various setters and getters which allow manipulation
of data in the slots of a TREDataMapper
object.
Usage
# S4 method for TREDataMapper,list
rawdata(object) <- value
# S4 method for TREDataMapper
rowDataMap(object)
# S4 method for TREDataMapper,list_OR_List
rowDataMap(object) <- value
# S4 method for TREDataMapper
colDataMap(object)
# S4 method for TREDataMapper,list_OR_List
colDataMap(object) <- value
# S4 method for TREDataMapper
assayMap(object)
# S4 method for TREDataMapper,list_OR_List
assayMap(object) <- value
# S4 method for TREDataMapper
metadataMap(object)
# S4 method for TREDataMapper,list_OR_List
metadataMap(object) <- value
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
orList
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
orList
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 theS4
object theTREDataMapper
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
ofcharacter
vectors. The name of each list item is the name of the item in the@metadata
slot of theTREDataMapper
object created whenmetaConstruct
is called on theDataMapper
, and a character vector specifies the columns of@rawdata
to assign to each item.
See also
Other DataMapper-accessors:
DataMapper-accessors
,
LongTableDataMapper-accessors
Examples
rowDataMap(exampleDataMapper)
#> list()
rowDataMap(exampleDataMapper) <- list(c('treatmentid'), c())
colDataMap(exampleDataMapper)
#> list()
colDataMap(exampleDataMapper) <- list(c('sampleid'), c())
assayMap(exampleDataMapper)
#> list()
assayMap(exampleDataMapper) <- list(sensitivity=c(viability1='viability'))
metadataMap(exampleDataMapper)
#> list()
metadataMap(exampleDataMapper) <- list(object_metadata=c('metadata'))