TreatmentResponseExperiment: TreatmentResponseExperiment constructor method

View source: R/TreatmentResponseExperiment-class.R

TreatmentResponseExperimentR Documentation

TreatmentResponseExperiment constructor method

Description

Builds a TreatmentResponseExperiment object from rectangular objects. The rowData argument should contain row level metadata, while the colData argument should contain column level metadata, for the experimental assays in the assays list. The rowIDs and colIDs lists are used to configure the internal keys mapping rows or columns to rows in the assays. Each list should contain at minimum one character vector, specifying which columns in rowData or colData are required to uniquely identify each row. An optional second character vector can be included, specifying any metadata columns for either dimension. These should contain information about each row but NOT be required to uniquely identify a row in the colData or rowData objects. Additional metadata can be attached to a TreatmentResponseExperiment by passing a list to the metadata argument.

Usage

TreatmentResponseExperiment(
  rowData,
  rowIDs,
  colData,
  colIDs,
  assays,
  assayIDs,
  metadata = list(),
  keep.rownames = FALSE
)

Arguments

rowData

data.table, data.frame, matrix A table like object coercible to a data.table containing the a unique rowID column which is used to key assays, as well as additional row metadata to subset on.

rowIDs

character, integer A vector specifying the names or integer indexes of the row data identifier columns. These columns will be pasted together to make up the rownames of the TreatmentResponseExperiment object.

colData

data.table, data.frame, matrix A table like object coercible to a data.table containing the a unique colID column which is used to key assays, as well as additional column metadata to subset on.

colIDs

character, integer A vector specifying the names or integer indexes of the column data identifier columns. These columns will be pasted together to make up the colnames of the TreatmentResponseExperiment object.

assays

A list containing one or more objects coercible to a data.table, and keyed by rowIDs and colIDs corresponding to the rowID and colID columns in colData and rowData.

assayIDs

list A list of character vectors specifying the columns needed to uniquely identify each row in an assay. Names must match the assays list.

metadata

A list of metadata associated with the TreatmentResponseExperiment object being constructed

keep.rownames

logical, character Logical: whether rownames should be added as a column if coercing to a data.table, default is FALSE. If TRUE, rownames are added to the column 'rn'. Character: specify a custom column name to store the rownames in.

Details

For now this class is simply a wrapper around a LongTable class. In the future we plan to refactor CoreGx such that the LongTable class is in a separate pacakge. We can then specialize the implementation of TreatmentResponseExperiment to better capture the biomedical nature of this object.

Value

A TreatmentResponseExperiment object containing the data for a treatment response experiment configured according to the rowIDs and colIDs arguments.


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