Description Usage Arguments Value Methods (by generic) Slots Examples
Define a private constructor method to be used to build a 'LongTable' object.
Select an assay from within a LongTable object.
This is used as an alternative to R attributes for storing structural metadata of S4 objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ## S4 method for signature 'LongTable'
rowIDs(object, data = FALSE, key = FALSE)
## S4 method for signature 'LongTable'
rowMeta(object, data = FALSE, key = FALSE)
## S4 method for signature 'LongTable'
colIDs(object, data = FALSE, key = FALSE)
## S4 method for signature 'LongTable'
colMeta(object, data = FALSE, key = FALSE)
## S4 method for signature 'LongTable'
assayCols(object, i)
## S4 method for signature 'LongTable,ANY,ANY'
x[[i, withDimnames = TRUE, metadata = withDimnames, keys = !withDimnames]]
## S4 method for signature 'LongTable,ANY'
assay(x, i, withDimnames = FALSE, metadata = withDimnames, key = !withDimnames)
## S4 replacement method for signature 'LongTable,character'
assay(x, i) <- value
## S4 method for signature 'LongTable'
assayNames(x)
## S4 method for signature 'LongTable'
assays(x, withDimnames = FALSE, metadata = withDimnames, key = !withDimnames)
## S4 replacement method for signature 'LongTable,list'
assays(x) <- value
## S4 method for signature 'data.frame'
buildLongTable(from, rowDataCols, colDataCols, assayCols)
## S4 method for signature 'character'
buildLongTable(from, rowDataCols, colDataCols, assayCols)
## S4 method for signature 'LongTable'
colData(x, key = FALSE)
## S4 replacement method for signature 'LongTable,ANY'
colData(x) <- value
## S4 method for signature 'LongTable'
dim(x)
## S4 method for signature 'LongTable'
colnames(x)
## S4 method for signature 'LongTable'
rownames(x)
## S4 method for signature 'LongTable'
dimnames(x)
## S4 method for signature 'LongTable,character'
getIntern(object, x, ...)
## S4 method for signature 'LongTable'
rowData(x, key = FALSE, use.names = FALSE)
## S4 replacement method for signature 'LongTable'
rowData(x) <- value
|
object |
['LongTable'] |
data |
['logical'] Should the colData for the metadata columns be returned instead of the column names? Default is FALSE. |
key |
['logical'] Should the rowKey column also be returned? Defaults to FALSE. |
i |
['integer'] or ['character'] vector containing the index or name of the assay to update. |
x |
A ['LongTable'] object to modify. |
withDimnames |
['logical'] Should the returned assays be joined to the row and column identifiers (i.e., the pseudo dimnames of the object). |
metadata |
['logical'] Should row and column metadata also be joined to the returned assays. This is useful for modifying assays before reconstructing a new LongTable. |
keys |
['logical'] Should the row and column keys also be returned? Defaults to !withDimnames. |
value |
A ['data.table'] or ['data.frame'] to update |
from |
['character'] Path to the .csv file containing the data and metadata from which to build the 'LongTable'. |
rowDataCols |
['list'] List with two 'character' vectors, the first specifying one or more columns to be used as cell identifiers (e.g., cell-line name columns) and the second containing any additional metadata columns related to the cell identifiers. |
colDataCols |
['list'] List with two 'character' vectors, the first specifying one or more columns to be used as column identifiers (e.g., drug name columns) and the second containing any additional metadata columns related to the column identifiers. |
assayCols |
['list'] A named list of character vectors specifying how to parse assay columns into a list of 'data.table's. Each list data.table will be named for the name of corresponding list item and contain the columns specified in the character vector of column names in each list item. |
... |
['pairlist'] Addtional arguments to get or mget inside of the function. |
use.names |
['logical'] This parameter is just here to stop matching the key argument to use.names from the rowData generic. It doesn't do anything at this time and can be ignored. |
['LongTable'] object containing the assay data from a treatment response experiment
A ['character'] vector of rowData column names if data is FALSE, otherwise a ['data.table'] with the data from the rowData id columns.
A ['character'] vector of rowData column names if data is FALSE, otherwise a ['data.table'] with the data from the rowData metadta columns.
A ['character'] vector of colData column names if data is FALSE, otherwise a ['data.table'] with the data from the colData id columns.
A ['character'] vector of colData column names if data is FALSE, otherwise a ['data.table'] with the data from the colData metadta columns.
A ['list'] of 'character' vectors containing the value column names for each assay if i is missing, otherwise a 'character' vector of value column names for the selected assay.
['LongTable'] With updated assays slot.
['character'] Names of the assays contained in the 'LongTable'.
A ['list'] of 'data.table' objects, one per assay in the object.
A copy of the ['LongTable'] with the assays modified.
A ['LongTable'] object containing one or more assays, indexed by rowID and colID.
A ['LongTable'] object containing one or more assays, indexed by rowID and colID.
A ['data.table'] containing row identifiers and metadata.
A copy of the ['LongTable'] object with the 'colData' slot updated.
['numeric'] Vector of object dimensions.
['character'] Vector of column names.
['character'] Vector of row names.
['list'] List with two character vectors, one for row and one for column names.
value of x if length(x) == 1 else named list of values for all symbols in x
A ['data.table'] containing rowID, row identifiers, and row metadata.
A copy of the ['LongTable'] object with the 'rowData' slot updated.
rowIDs
: Get the names of the rowData columns required to
uniquely identify each row.
rowMeta
: Get the names of the non-id columns from rowData.
colIDs
: Get the names of the columns in colData required to
uniquely identify each row.
colMeta
: Get the names of the non-id columns in the colData
'data.table'.
assayCols
: Get a list of column names for each assay in a
'LongTable'.
[[
: Get an assay from a LongTable object. This method
returns the row and column annotations by default to make assignment
and aggregate operations easiers.
assay
: Retrieve an assay 'data.table' object from the
'assays' slot of a 'LongTable' object.
assay<-
: Add or replace an assay in a LongTable by name. Currently
this function only works when the assay has all columns in row and column
data tables (i.e., when assays is retured withDimnames=TRUE). This will
be fixed in future updates.
assayNames
: Return the names of the assays contained in a
'LongTable'
assays
: Get a list containing all the assays in a 'LongTable'.
assays<-
: Update the assays in a LongTable object. The rowIDs
and colIDs must be present in all assays to allow successfully remapping
the keys. We recommend modifying the list returned by
assays(longTable, withDimnames=TRUE) and the reassigning to the 'LongTable'.
buildLongTable
: Create a LongTable object from a single data.table or
data.frame object
buildLongTable
: Create a LongTable object from a single .csv file
colData
: Get the column level annotations for a LongTable
object.
colData<-
: Upadte the colData of a LongTable object. Currently
requires that all of the colIDs(longTable) be in the value object.
dim
: Get the number of row annotations by the number of
column annotations from a LongTable object. Please note that row x columns
does not necessarily equal the number of rows in an assay, since it is
not required for each assay to have every row or column present.
colnames
: Retrieve the pseudo-colnames of a LongTable object,
these are constructed by pasting together the colIDs(longTable) and
can be used in the subset method for regex based queries.
rownames
: Retrieve the pseudo-rownames of a LongTable object,
these are constructed by pasting together the rowIDs(longTable) and
can be used in the subset method for regex based queries.
dimnames
: Get the pseudo-dimnames for a LongTable object. See
colnames and rownames for more information.
getIntern
: Access structural metadata present within a
LongTable object. This is mostly for developmer use.
rowData
: Get the row level annotations for a 'LongTable' object.
rowData<-
: Update the row annotations for a 'LongTable' object.
Currently requires that all columns in rowIDs(longTable) be present in
value.
rowData
A ['data.table'] containing the metadata associated with the row dimension of a 'LongTable'.
colData
A ['data.table'] containing the metadata associated with the column dimension of a 'LongTable'.
assays
A ['list'] of ['data.table's], one for each assay in a 'LongTable'.
metadata
An optional ['list'] of additional metadata for a 'LongTable' which doesn't map to one of the dimensions.
.intern
An ['enivornment'] that holds internal structural metadata about a LongTable object, such as which columns are required to key the object. An environment has been used to allow locking items, which can prevent accidental modification of a property required for the class to work.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | rowIDs(merckLongTable)
rowMeta(merckLongTable)
colIDs(merckLongTable)
colMeta(merckLongTable)
assayCols(merckLongTable)
merckLongTable[['viability']]
# Default annotations, just the key columns
assay(merckLongTable, 'viability')
assay(merckLongTable, 1)
# With identifiers joined
assay(merckLongTable, 'viability', withDimnames=TRUE)
# With identifiers and metadata
assay(merckLongTable, 'viability_summary', withDimnames=TRUE, metadata=TRUE)
assay(merckLongTable, 'viability') <- assay(merckLongTable, 'viability', withDimnames=TRUE)
assay(merckLongTable, 'viability') <- merckLongTable$viability
assayNames(merckLongTable)
assays(merckLongTable)
assays(merckLongTable) <- assays(merckLongTable, withDimnames=TRUE)
colData(merckLongTable)
# Get the keys as well, mostly for internal use
colData(merckLongTable, key=TRUE)
colData(merckLongTable) <- colData(merckLongTable)
dim(merckLongTable)
dim(merckLongTable)
head(colnames(merckLongTable))
head(rownames(merckLongTable))
lapply(dimnames(merckLongTable), head)
getIntern(merckLongTable, 'rowIDs')
getIntern(merckLongTable, c('colIDs', 'colMeta'))
rowData(merckLongTable)
rowData(merckLongTable) <- rowData(merckLongTable)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.