Accessor method for rowData from subsets in ExperimentSubset objects
Source:R/allGenerics.R, R/SubsetRangedSummarizedExperiment.R, R/SubsetSingleCellExperiment.R, and 3 more
subsetRowData.RdGet rowData from a subset.
Set rowData to a subset.
Usage
subsetRowData(x, subsetName, parentRowData)
subsetRowData(x, subsetName) <- value
# S4 method for class 'SubsetRangedSummarizedExperiment'
subsetRowData(x, subsetName, parentRowData)
# S4 method for class 'SubsetRangedSummarizedExperiment'
subsetRowData(x, subsetName) <- value
# S4 method for class 'SubsetSingleCellExperiment'
subsetRowData(x, subsetName, parentRowData)
# S4 method for class 'SubsetSingleCellExperiment'
subsetRowData(x, subsetName) <- value
# S4 method for class 'SubsetSummarizedExperiment'
subsetRowData(x, subsetName) <- value
# S4 method for class 'SubsetSummarizedExperiment'
subsetRowData(x, subsetName, parentRowData)
# S4 method for class 'SubsetSpatialExperiment'
subsetRowData(x, subsetName, parentRowData)
# S4 method for class 'SubsetSpatialExperiment'
subsetRowData(x, subsetName) <- value
# S4 method for class 'SubsetTreeSummarizedExperiment'
subsetRowData(x, subsetName, parentRowData)Arguments
- x
ExperimentSubsetInputExperimentSubsetobject.- subsetName
character(1)Name of the subset to setrowDatato.- parentRowData
logical(1)Logical value indicating if parent rowData should be combined or not. A subset's own column hides the main object's column of the same name, with a message if their values differ. DefaultFALSE.- value
Input
DataFrameto store; adata.frameis converted to one, andNULLremoves the subset's ownrowDatacolumns. Its rownames must beNULLor the subset's row names, in the same order; other rownames are an error, since rows are matched by position. To store a table with other rownames, such as gene IDs for rows named by symbol, put its rows in the subset's order and setrownames(value) <- NULLfirst.
Examples
data(sce_chcl, package = "scds")
es <- ExperimentSubset(sce_chcl)
es <- createSubset(es,
"subset1",
rows = c(10,11,50,56,98,99,102,105,109, 200),
cols = c(20,21,40,45,90,99,100,123,166,299),
parentAssay = "counts")
subsetRowData(es, "subset1")
#> DataFrame with 10 rows and 0 columns