forked from satijalab/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddMetaData.Rd
53 lines (44 loc) · 1.48 KB
/
AddMetaData.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R, R/objects.R
\name{AddMetaData}
\alias{AddMetaData}
\alias{SeuratAccess}
\alias{AddMetaData.Assay}
\alias{AddMetaData.Seurat}
\alias{[[<-,Assay-method}
\alias{[[<-,Seurat-method}
\title{Add in metadata associated with either cells or features.}
\usage{
AddMetaData(object, metadata, col.name = NULL)
\method{AddMetaData}{Assay}(object, metadata, col.name = NULL)
\method{AddMetaData}{Seurat}(object, metadata, col.name = NULL)
\S4method{[[}{Assay}(x, i, j, ...) <- value
\S4method{[[}{Seurat}(x, i, j, ...) <- value
}
\arguments{
\item{x, object}{An object}
\item{i, col.name}{Name to store metadata or object as}
\item{j}{Ignored}
\item{...}{Arguments passed to other methods}
\item{value, metadata}{Metadata or object to add}
}
\value{
An object with metadata or and object added
}
\description{
Adds additional data to the object. Can be any piece of information
associated with a cell (examples include read depth, alignment rate,
experimental batch, or subpopulation identity) or feature (ENSG name,
variance). To add cell level information, add to the Seurat object. If adding
feature-level metadata, add to the Assay object (e.g. object[["RNA"]]))
}
\examples{
cluster_letters <- LETTERS[Idents(object = pbmc_small)]
names(cluster_letters) <- colnames(x = pbmc_small)
pbmc_small <- AddMetaData(
object = pbmc_small,
metadata = cluster_letters,
col.name = 'letter.idents'
)
head(x = pbmc_small[[]])
}