TREDataMapper: Constructor for the 'TREDataMapper' class, which maps from...

View source: R/TREDataMapper-class.R

TREDataMapperR Documentation

Constructor for the TREDataMapper class, which maps from one or more raw experimental data files to the slots of a LongTable object.

Description

Constructor for the TREDataMapper class, which maps from one or more raw experimental data files to the slots of a LongTable object.

Usage

TREDataMapper(
  rawdata = data.frame(),
  rowDataMap = list(character(), character()),
  colDataMap = list(character(), character()),
  assayMap = list(list(character(), character())),
  metadataMap = list(character())
)

Arguments

rawdata

A data.frame of raw data from a treatment response experiment. This will be coerced to a data.table internally. We recommend using joins to aggregate your raw data if it is not present in a single file.

rowDataMap

A list-like object containing two character vectors. The first is column names in rawdata needed to uniquely identify each row, the second is additional columns which map to rows, but are not required to uniquely identify them. Rows should be treatments.

colDataMap

A list-like object containing two character vectors. The first is column names in rawdata needed to uniquely identify each column, the second is additional columns which map to rows, but are not required to uniquely identify them. Columns should be samples.

assayMap

A list-like where each item is a list with two character vectors defining an assay, the first containing the identifier columns in rawdata needed to uniquely identify each row an assay, and the second the rawdata columns to be mapped to that assay. The names of assayMap will be the names of the assays in the TreatmentResponseExperiment that is created when calling metaConstruct on this DataMapper object. If the character vectors have names, the value columns will be renamed accordingly.

metadataMap

A list-like where each item is a character vector of rawdata column names to assign to the ⁠@metadata⁠ of the LongTable, where the name of that assay is the name of the list item. If names are omitted, assays will be numbered by their index in the list.

Details

The guessMapping method can be used to test hypotheses about the cardinality of one or more sets of identifier columns. This is helpful to determine the id columns for rowDataMap and colDataMap, as well as identify columns mapping to assays or metadata.

To attach metadata not associated with rawdata, please use the metadata assignment method on your TREDataMapper. This metadata will be merge with any metadata from metadataMap and added to the LongTable which this object ultimately constructs.

Value

A TREDataMapper object, with columns mapped to it's slots according to the various maps in the LongTableDataMapper object.

See Also

guessMapping


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