Meta_Remove_Seurat {scCustomize}R Documentation

Remove meta data columns containing Seurat Defaults

Description

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

Usage

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

## Not run: 
new_meta <- Meta_Remove_Seurat(meta_data = meta_data_df, seurat_object = object)
object <- AddMetaData(object = object, metadata = new_meta)

## End(Not run)


[Package scCustomize version 2.1.2 Index]