View source: R/preparation_functions.R
recodeBarcode | R Documentation |
Recode (i.e., relabel) metadata in Seurat object. If old label is specified as NA, treated as wildcard that captures all remaining barcodes that have not been relabeled.
recodeBarcode(
object,
barcode.recode,
old.field.name = "Barcode",
new.field.name = "Barcode",
exact.match = F
)
object |
Seurat Object |
barcode.recode |
Named list where names are new labels, entries are old labels (can be vector of characters). E.g., barcode.recode <- list(in.vitro = c("invitro"), in.vivo = NA) |
old.field.name |
name of field in which meta dat for recoding is stored. Default is "Barcode". |
new.field.name |
name of new field in meta data where recoded data will be stored. Default is "Barcode". |
exact.match |
specify whether entries for old labels in ‘barcode.recode' are matched exactly. For example, with exact matching, ’5' would retrieve '5' but not '15', but without exact matching, '5' would retrieve '5' and '15'. Default is F. |
Seurat Object with relabeled metadata
Nicholas Mikolajewicz
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.