merge.Seurat | R Documentation |
Merge Seurat Objects
## S3 method for class 'Seurat'
merge(
x = NULL,
y = NULL,
add.cell.ids = NULL,
collapse = FALSE,
merge.data = TRUE,
merge.dr = FALSE,
project = getOption(x = "Seurat.object.project", default = "SeuratProject"),
...
)
x |
A |
y |
A single |
add.cell.ids |
A character vector of |
collapse |
If |
merge.data |
Merge the data slots instead of just merging the counts (which requires renormalization); this is recommended if the same normalization approach was applied to all objects |
merge.dr |
Choose how to handle merging dimensional reductions:
|
project |
Project name for the |
... |
Arguments passed to other methods |
merge
: Merged object
When merging Seurat objects, the merge procedure will merge the Assay level
counts and potentially the data slots (depending on the merge.data parameter).
It will also merge the cell-level meta data that was stored with each object
and preserve the cell identities that were active in the objects pre-merge.
The merge will optionally merge reductions depending on the values passed to
merge.dr
if they have the same name across objects. Here the
embeddings slots will be merged and if there are differing numbers of
dimensions across objects, only the first N shared dimensions will be merged.
The feature loadings slots will be filled by the values present in the first
object.The merge will not preserve graphs, logged commands, or feature-level
metadata that were present in the original objects. If add.cell.ids isn't
specified and any cell names are duplicated, cell names will be appended
with _X, where X is the numeric index of the object in c(x, y).
Seurat object, validity, and interaction methods
$.Seurat()
,
Seurat-class
,
Seurat-validity
,
[[.Seurat()
,
[[<-,Seurat
,
[[<-,Seurat,NULL
,
dim.Seurat()
,
dimnames.Seurat()
,
names.Seurat()
,
subset.Seurat()
# `merge' examples
# merge two objects
merge(pbmc_small, y = pbmc_small)
# to merge more than two objects, pass one to x and a list of objects to y
merge(pbmc_small, y = c(pbmc_small, pbmc_small))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.