meta | R Documentation |
Returns the values of a meta.data for all cells/samples
meta(meta, object, adjustment = NULL, adj.fxn = NULL)
meta |
String, the name of the "metadata" slot to grab. OR "ident" to retireve the clustering of a Seurat |
object |
A Seurat, SingleCellExperiment, or SummarizedExperiment object. |
adjustment |
A recognized string indicating whether numeric metadata should be used directly (default) versus adjusted to be
Ignored if the target metadata is not numeric. |
adj.fxn |
A function which takes a vector (of metadata values) and returns a vector of the same length. For example, |
Retrieves the values of a metadata slot from object
, or the clustering slot if meta = "ident"
and the object
is a Seurat.
If adjustment
or adj.fxn
are provided, then these requested adjustments are applied to these values (adjustment
first).
Note: Alterations via adjustment
are only applied when metadata is numeric, but adj.fxn
alterations are applied to metadata of any type.
Lastly, outputs these values are named as the cells'/samples' names.
A named vector.
Daniel Bunis
metaLevels
for returning just the unique discrete identities that exist within a metadata slot
getMetas
for returning all metadata slots of an object
isMeta
for testing whether something is the name of a metadata slot
example(importDittoBulk, echo = FALSE)
meta("groups", object = myRNA)
myRNA$numbers <- seq_len(ncol(myRNA))
meta("numbers", myRNA, adjustment = "z-score")
meta("numbers", myRNA, adj.fxn = as.factor)
meta("numbers", myRNA, adj.fxn = function(x) {log2(x)})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.