Seurat (version 2.3.4)

AddSamples: Add samples into existing Seurat object.

Description

Add samples into existing Seurat object.

Usage

AddSamples(object, new.data, project = NULL, min.cells = 0, min.genes = 0,
  is.expr = 0, do.normalize = TRUE, scale.factor = 10000,
  do.scale = FALSE, do.center = FALSE, names.field = 1,
  names.delim = "_", meta.data = NULL, add.cell.id = NULL)

Arguments

object

Seurat object

new.data

Data matrix for samples to be added

project

Project name (string)

min.cells

Include genes with detected expression in at least this many cells

min.genes

Include cells where at least this many genes are detected

is.expr

Expression threshold for 'detected' gene

do.normalize

Normalize the data after merging. Default is TRUE. If set, will perform the same normalization strategy as stored in the object

scale.factor

scale factor in the log normalization

do.scale

In object@scale.data, perform row-scaling (gene-based z-score)

do.center

In object@scale.data, perform row-centering (gene-based centering)

names.field

For the initial identity class for each cell, choose this field from the cell's column name

names.delim

For the initial identity class for each cell, choose this delimiter from the cell's column name

meta.data

Additional metadata to add to the Seurat object. Should be a data frame where the rows are cell names, and the columns are additional metadata fields

add.cell.id

String to be appended to the names of all cells in new.data. E.g. if add.cell.id = "rep1", "cell1" becomes "cell1.rep1"

Examples

Run this code
# NOT RUN {
pbmc1 <- SubsetData(object = pbmc_small, cells.use = pbmc_small@cell.names[1:40])
pbmc1
pbmc2 <- SubsetData(object = pbmc_small, cells.use = pbmc_small@cell.names[41:80])
pbmc2_data <- pbmc2@data
dim(pbmc2_data)
pbmc_added <- AddSamples(object = pbmc1, new.data = pbmc2_data)
pbmc_added

# }

Run the code above in your browser using DataLab