Remove any columns from new meta_data data.frame in preparation for adding back to Seurat Object

Meta_Remove_Seurat(
  meta_data,
  seurat_object,
  barcodes_to_rownames = FALSE,
  barcodes_colname = "barcodes"
)

Arguments

meta_data

data.frame containing meta data.

seurat_object

object name.

barcodes_to_rownames

logical, are barcodes present as column and should they be moved to rownames (to be compatible with Seurat::AddMetaData). Default is FALSE.

barcodes_colname

name of barcodes column in meta_data. Required if barcodes_to_rownames = TRUE.

Value

data.frame with only new columns.

Examples

if (FALSE) {
new_meta <- Meta_Remove_Seurat(meta_data = meta_data_df, seurat_object = object)
object <- AddMetaData(object = object, metadata = new_meta)
}