sampleData | R Documentation |
Metadata that describes the samples.
sampleData(object, ...)
sampleData(object, ...) <- value
## S4 method for signature 'SingleCellExperiment'
sampleData(
object,
clean = TRUE,
ignoreCols = c("^description$", "^genomeBuild$", "^qualityFormat$", "^samRef$"),
denylistCols = c("^ident$", "^g2mScore$", "^sScore$", "^phase$", "^oldIdent$",
"^origIdent$", "^res[0-9]+")
)
## S4 replacement method for signature 'SingleCellExperiment,DFrame'
sampleData(object) <- value
object |
Object. |
clean |
|
ignoreCols |
|
denylistCols |
|
value |
Value to assign. |
... |
Additional arguments. |
This is a complement to the standard
colData()
function, but improves support
for accessing sample metadata for datasets where multiple items in the
columns map to a single sample (e.g. cells for a single-cell RNA-seq
experiment).
DataFrame
.
Recommended colData
:
sampleId
: factor
defining cell-to-sample mappings. These mappings
should use syntactically valid names. Note that this is not currently
required as we're supporting SingleCellExperiment
objects from 1 sample,
but it's required for working with multiple samples in a single object.
Updated 2023-03-27.
data(SingleCellExperiment_splatter, package = "AcidTest")
## SingleCellExperiment ====
object <- SingleCellExperiment_splatter
sampleData(object)
## Assignment support.
sampleData(object)[["batch"]] <- 1L
## `batch` column should be now defined.
sampleData(object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.