View source: R/operations_external_annotate_seurat.R
| annotate_seurat | R Documentation |
Copy selected columns from idata$annotations to Seurat metadata using
the cell barcode. This is the simplest way to transfer data from immundata
to Seurat object, e.g., for plotting data on UMAP.
annotate_seurat(idata, sdata, cols)
idata |
An ImmunData object. |
sdata |
A Seurat object (cells are columns; barcodes are |
cols |
Character vector with column names to transfer from |
See functions annotate_clonality_rank and annotate_clonality_prop in immunarch package.
The updated Seurat object with new metadata columns.
ImmunData, SeuratObject::AddMetaData
## Not run:
# After annotating receptors:
idata <- annotate_clonality_prop(idata)
# Transfer the clonality bin to Seurat and plot:
sdata <- annotate_seurat(idata, sdata, cols = "clonal_prop_bin")
Seurat::DimPlot(sdata, reduction = "umap", group.by = "clonal_prop_bin", shuffle = TRUE)
# Alternative: rank bins
idata <- annotate_clonality_rank(idata, bins = c(10, 100))
sdata <- annotate_seurat(idata, sdata, cols = "clonal_rank_bin")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.