This template appends sample metadata from an input table to a Seurat object, creating new metadata columns labeling all cells from each sample by the new metadata values.

appendMetadataToSeuratObject(object, metadata.to.append, sample.name.column)

Arguments

object

The input Seurat Object or list of Seurat Objects to which you wish to add metadata.

metadata.to.append

A table of sample metadata that you want to append to the already-existing metadata within the input Seurat Object(s).

sample.name.column

The column of the input metadata.to.append table that contains sample names matching the orig.idents in the input object(s).

Value

Function returns a Seurat Object or Objects with additional metadata columns containing the appended metadata now annotated each cell by sample name (orig.ident).

Details

This template appends sample metadata from an input table to a Seurat object, creating new metadata columns labeling all cells from each sample by the new metadata values.